player: support HLS vod for vidme (fixes #703)
- Upgrade videojs-contrib-hls to latest version
- Update VideoJSPlayer to support "auto" quality tag to delegate to
the HLS plugin for automatic quality selection
- mediaquery change:
9f5122e031
This commit is contained in:
parent
45d0e0b4c3
commit
97231e515c
4 changed files with 28 additions and 16 deletions
|
|
@ -1,5 +1,5 @@
|
|||
(function() {
|
||||
var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, GoogleDrivePlayer, GoogleDriveYouTubePlayer, HLSPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SmashcastPlayer, SoundCloudPlayer, TYPE_MAP, TwitchPlayer, UstreamPlayer, VideoJSPlayer, VimeoPlayer, YouTubePlayer, codecToMimeType, genParam, sortSources,
|
||||
var CUSTOM_EMBED_WARNING, CustomEmbedPlayer, DEFAULT_ERROR, DailymotionPlayer, EmbedPlayer, FilePlayer, GoogleDrivePlayer, GoogleDriveYouTubePlayer, HLSPlayer, ImgurPlayer, LivestreamPlayer, Player, RTMPPlayer, SmashcastPlayer, SoundCloudPlayer, TYPE_MAP, TwitchPlayer, UstreamPlayer, VideoJSPlayer, VimeoPlayer, YouTubePlayer, codecToMimeType, genParam, getSourceLabel, sortSources,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
|
|
@ -462,6 +462,7 @@
|
|||
idx = 5;
|
||||
}
|
||||
qualityOrder = qualities.slice(idx).concat(qualities.slice(0, idx).reverse());
|
||||
qualityOrder.unshift('auto');
|
||||
sourceOrder = [];
|
||||
flvOrder = [];
|
||||
for (j = 0, len = qualityOrder.length; j < len; j++) {
|
||||
|
|
@ -490,6 +491,14 @@
|
|||
});
|
||||
};
|
||||
|
||||
getSourceLabel = function(source) {
|
||||
if (source.quality === 'auto') {
|
||||
return 'auto';
|
||||
} else {
|
||||
return source.quality + "p " + (source.type.split('/')[1]);
|
||||
}
|
||||
};
|
||||
|
||||
waitUntilDefined(window, 'videojs', (function(_this) {
|
||||
return function() {
|
||||
return videojs.options.flash.swf = '/video-js.swf';
|
||||
|
|
@ -531,7 +540,7 @@
|
|||
src: source.src,
|
||||
type: source.type,
|
||||
res: source.quality,
|
||||
label: source.quality + "p " + (source.type.split('/')[1])
|
||||
label: getSourceLabel(source)
|
||||
}).appendTo(video);
|
||||
});
|
||||
if (data.meta.gdrive_subtitles) {
|
||||
|
|
|
|||
20
www/js/videojs-contrib-hls.min.js
vendored
20
www/js/videojs-contrib-hls.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue