mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
support timeshifting with safari mac and edge mobile
This commit is contained in:
parent
db6a9f6ed5
commit
d61fcea76c
6 changed files with 50 additions and 25 deletions
|
@ -195,13 +195,8 @@
|
|||
//return false;
|
||||
}
|
||||
|
||||
// For now don't do this in edge because we lose some native audio support
|
||||
if (browser.edge && browser.mobile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// hls.js is only in beta. needs more testing.
|
||||
if (browser.safari) {
|
||||
if (browser.safari && !browser.osx) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -225,17 +220,20 @@
|
|||
// Safari often displays the poster under the video and it doesn't look good
|
||||
var poster = !browser.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
||||
|
||||
// playsinline new for iOS 10
|
||||
// https://developer.apple.com/library/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html
|
||||
|
||||
// Can't autoplay in these browsers so we need to use the full controls
|
||||
if (requiresNativeControls && AppInfo.isNativeApp && browser.android) {
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay"' + poster + ' webkit-playsinline>';
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay"' + poster + ' webkit-playsinline playsinline>';
|
||||
}
|
||||
else if (requiresNativeControls) {
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay"' + poster + ' controls="controls" webkit-playsinline>';
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay"' + poster + ' controls="controls" webkit-playsinline playsinline>';
|
||||
}
|
||||
else {
|
||||
|
||||
// Chrome 35 won't play with preload none
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay"' + poster + ' webkit-playsinline>';
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay"' + poster + ' webkit-playsinline playsinline>';
|
||||
}
|
||||
|
||||
html += '</video>';
|
||||
|
@ -605,15 +603,6 @@
|
|||
currentAssRenderer = null;
|
||||
}
|
||||
|
||||
function fetchSubtitles(track) {
|
||||
|
||||
return ApiClient.ajax({
|
||||
url: track.url.replace('.vtt', '.js'),
|
||||
type: 'GET',
|
||||
dataType: 'json'
|
||||
});
|
||||
}
|
||||
|
||||
function setTrackForCustomDisplay(videoElement, track) {
|
||||
|
||||
if (!track) {
|
||||
|
@ -819,7 +808,7 @@
|
|||
|
||||
if (AppInfo.isNativeApp && browser.safari) {
|
||||
|
||||
if (navigator.userAgent.toLowerCase().indexOf('ipad') != -1) {
|
||||
if (browser.ipad) {
|
||||
// Need to disable it in order to support picture in picture
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue