1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

#514 - Support HLS seeking

This commit is contained in:
Luke Pulverenti 2014-07-01 17:13:32 -04:00
parent 83ada41f7e
commit 683e6f472c
5 changed files with 45 additions and 53 deletions

View file

@ -1007,36 +1007,17 @@
EnableAutoStreamCopy: false
}));
if (isStatic) webmVideoUrl += seekParam;
var hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/master.m3u8', $.extend({}, baseParams, {
maxWidth: m3U8Quality.maxWidth,
videoBitrate: m3U8Quality.videoBitrate,
audioBitrate: m3U8Quality.audioBitrate,
VideoCodec: m3U8Quality.videoCodec,
AudioCodec: m3U8Quality.audioCodec,
profile: 'baseline',
level: '3',
StartTimeTicks: 0
var hlsVideoUrl;
if (item.RunTimeTicks) {
hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/master.m3u8', $.extend({}, baseParams, {
timeStampOffsetMs: 0,
maxWidth: m3U8Quality.maxWidth,
videoBitrate: m3U8Quality.videoBitrate,
audioBitrate: m3U8Quality.audioBitrate,
VideoCodec: m3U8Quality.videoCodec,
AudioCodec: m3U8Quality.audioCodec,
profile: 'baseline',
level: '3',
StartTimeTicks: 0
})) + seekParam;
} else {
hlsVideoUrl = ApiClient.getUrl('Videos/' + item.Id + '/stream.m3u8', $.extend({}, baseParams, {
timeStampOffsetMs: 0,
maxWidth: m3U8Quality.maxWidth,
videoBitrate: m3U8Quality.videoBitrate,
audioBitrate: m3U8Quality.audioBitrate,
VideoCodec: m3U8Quality.videoCodec,
AudioCodec: m3U8Quality.audioCodec,
profile: 'baseline',
level: '3'
})) + seekParam;
}
})) + seekParam;
//======================================================================================>
@ -1199,9 +1180,7 @@
}).on("error.mediaplayerevent", function () {
self.clearPauseStop();
self.resetEnhancements();
self.stop();
var errorCode = this.error ? this.error.code : '';
console.log('Html5 Video error code: ' + errorCode);
@ -1212,11 +1191,16 @@
errorMsg += " Please ensure there is an open tuner availalble.";
}
if (errorCode) {
errorMsg += " Error code: " + errorCode;
}
Dashboard.alert({
title: 'Video Error',
message: errorMsg
});
}).on("click.mediaplayerevent", function (e) {
if (this.paused) {