mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
resolve live tv with ios
This commit is contained in:
parent
1ad8c6e955
commit
77fb2070f5
3 changed files with 33 additions and 40 deletions
|
@ -931,6 +931,31 @@
|
|||
|
||||
var streamInfo = self.createStreamInfo('Video', item, mediaSource, startPosition);
|
||||
|
||||
// Huge hack alert. Safari doesn't seem to like if the segments aren't available right away when playback starts
|
||||
// This will start the transcoding process before actually feeding the video url into the player
|
||||
if ($.browser.safari && !mediaSource.RunTimeTicks) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.ajax({
|
||||
type: 'GET',
|
||||
url: streamInfo.url.replace('master.m3u8', 'live.m3u8')
|
||||
}).always(function () {
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
|
||||
}).done(function () {
|
||||
self.playVideoInternal(item, mediaSource, startPosition, streamInfo);
|
||||
});
|
||||
|
||||
} else {
|
||||
self.playVideoInternal(item, mediaSource, startPosition, streamInfo);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
self.playVideoInternal = function (item, mediaSource, startPosition, streamInfo) {
|
||||
|
||||
var videoUrl = streamInfo.url;
|
||||
var contentType = streamInfo.contentType;
|
||||
var startPositionInSeekParam = streamInfo.startPositionInSeekParam;
|
||||
|
@ -975,8 +1000,9 @@
|
|||
|
||||
// Can't autoplay in these browsers so we need to use the full controls
|
||||
if (requiresNativeControls) {
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="none" autoplay="autoplay" crossorigin="anonymous" controls="controls"' + posterCode + '>';
|
||||
} else {
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay" crossorigin="anonymous" controls="controls"' + posterCode + '>';
|
||||
}
|
||||
else {
|
||||
|
||||
// Chrome 35 won't play with preload none
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" crossorigin="anonymous" autoplay' + posterCode + '>';
|
||||
|
@ -1167,7 +1193,10 @@
|
|||
|
||||
$('body').addClass('bodyWithPopupOpen');
|
||||
|
||||
return video[0];
|
||||
self.currentMediaElement = video[0];
|
||||
self.currentDurationTicks = self.currentMediaSource.RunTimeTicks;
|
||||
|
||||
self.updateNowPlayingInfo(item);
|
||||
};
|
||||
|
||||
self.updatePlaylistUi = function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue