mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
change browser object
This commit is contained in:
parent
27c3bdc042
commit
7b5f61d2d2
32 changed files with 106 additions and 106 deletions
|
@ -137,7 +137,7 @@
|
|||
// Appending #t=xxx to the query string doesn't seem to work with HLS
|
||||
if (startPositionInSeekParam && src.indexOf('.m3u8') != -1) {
|
||||
|
||||
var delay = $.browser.safari ? 2500 : 0;
|
||||
var delay = browserInfo.safari ? 2500 : 0;
|
||||
var element = this;
|
||||
if (delay) {
|
||||
setTimeout(function () {
|
||||
|
@ -202,10 +202,10 @@
|
|||
var requiresNativeControls = !self.enableCustomVideoControls();
|
||||
|
||||
// Safari often displays the poster under the video and it doesn't look good
|
||||
var poster = !$.browser.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
||||
var poster = !browserInfo.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
||||
|
||||
// Can't autoplay in these browsers so we need to use the full controls
|
||||
if (requiresNativeControls && AppInfo.isNativeApp && $.browser.android) {
|
||||
if (requiresNativeControls && AppInfo.isNativeApp && browserInfo.android) {
|
||||
html += '<video class="itemVideo" id="itemVideo" preload="metadata" autoplay="autoplay" crossorigin="anonymous"' + poster + ' webkit-playsinline>';
|
||||
}
|
||||
else if (requiresNativeControls) {
|
||||
|
@ -321,7 +321,7 @@
|
|||
elem.src = "";
|
||||
|
||||
// When the browser regains focus it may start auto-playing the last video
|
||||
if ($.browser.safari) {
|
||||
if (browserInfo.safari) {
|
||||
elem.src = 'files/dummy.mp4';
|
||||
elem.play();
|
||||
}
|
||||
|
@ -331,7 +331,7 @@
|
|||
|
||||
var val = streamInfo.url;
|
||||
|
||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||
val = val.replace('file://', '');
|
||||
}
|
||||
|
||||
|
@ -558,7 +558,7 @@
|
|||
|
||||
self.enableCustomVideoControls = function () {
|
||||
|
||||
if (AppInfo.isNativeApp && $.browser.safari) {
|
||||
if (AppInfo.isNativeApp && browserInfo.safari) {
|
||||
|
||||
if (navigator.userAgent.toLowerCase().indexOf('iphone') != -1) {
|
||||
return true;
|
||||
|
@ -568,7 +568,7 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
return self.canAutoPlayVideo() && !$.browser.mobile;
|
||||
return self.canAutoPlayVideo() && !browserInfo.mobile;
|
||||
};
|
||||
|
||||
self.canAutoPlayVideo = function () {
|
||||
|
@ -577,7 +577,7 @@
|
|||
return true;
|
||||
}
|
||||
|
||||
if ($.browser.mobile) {
|
||||
if (browserInfo.mobile) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue