Releases: thelevicole/youtube-to-html5-loader
Releases · thelevicole/youtube-to-html5-loader
5.0.0
4.0.1
Updated API endpoint to fix CORS errors. API response is already decoded.
4.0.0
Breaking changes:
parseYoutubeMeta()
method now returns an array (previously an object). This will break any filter hooks attached to'video.stream'
New:
- Added a new
withAudio
option, when set totrue
only streams with audio channels will be returned. - Added
_raw
property to returned stream object containing the raw stream data from the YouTube api. - Added
itag
property to returned stream object (used to be object key). - Added
hasAudio
property to returned stream objecttrue
if stream has audio channel,false
if not. - Added
browserSupport
property to returned stream object. Includes values "probably", "maybe", "no", "unknown" based on: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType
3.1.1
Improved hook inheritance.
Added the ability to set global hooks that apply to all instances or local hooks that apply to the current instance only.
Global hook example:
var player = new YouTubeToHtml5();
var myCallback = function() { console.log('example'); };
var hookPriority = 10;
var isGlobal = true;
player.addAction('api.end', myCallback, hookPriority, isGlobal);
3.0.1
Fixed issue when with option inheritance when having multiple instances with different options.
3.0.0
Breaking changes:
- Renamed
youtube.api.endpoint
filter toapi.endpoint
. - Renamed
youtube.meta
filter toapi.response
. - Added new argument to
video.source
filter, breaking previous argument order.
New:
- Added new filter
api.results
for the extracted video source from the api response. - Added new filter
video.stream
for modifying the default stream object.
2.0.0
- The
selector
option now accepts either of the following:
NodeList
HTMLCollection
string
- Or a single DOM element.
-
A breaking change has been made to the
api.end
action which has now been renamed toapi.after
. -
A new method
loadSingle()
has been added. This takes two parameters, the first being a single DOM element and the second being an optional attribute name for reading the YouTube data from the element.
1.1.1
YouTube URLs now accepted aswell as YouTube ID values.
For example:
<video data-yt2html5="https://www.youtube.com/embed/ScMzIvxBSi4" controls></video>
And:
<video data-yt2html5="ScMzIvxBSi4" controls></video>
1.0.0
gitignore update