mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update subtitles in edge
This commit is contained in:
parent
68bd2a782c
commit
f5ea8f49e9
3 changed files with 19 additions and 34 deletions
|
@ -16,6 +16,7 @@
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
||||||
|
<option value="nextup">${HeaderNextUp}</option>
|
||||||
<option value="librarytiles">${OptionMyMedia}</option>
|
<option value="librarytiles">${OptionMyMedia}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
||||||
|
@ -30,6 +31,7 @@
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
||||||
|
<option value="nextup">${HeaderNextUp}</option>
|
||||||
<option value="librarytiles">${OptionMyMedia}</option>
|
<option value="librarytiles">${OptionMyMedia}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
||||||
|
@ -45,6 +47,7 @@
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
||||||
|
<option value="nextup">${HeaderNextUp}</option>
|
||||||
<option value="librarytiles">${OptionMyMedia}</option>
|
<option value="librarytiles">${OptionMyMedia}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
||||||
|
@ -60,6 +63,7 @@
|
||||||
<option value="latestmedia">${OptionLatestMedia}</option>
|
<option value="latestmedia">${OptionLatestMedia}</option>
|
||||||
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
<option value="latestchannelmedia">${OptionLatestChannelMedia}</option>
|
||||||
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
<option value="latesttvrecordings">${OptionLatestTvRecordings}</option>
|
||||||
|
<option value="nextup">${HeaderNextUp}</option>
|
||||||
<option value="librarytiles">${OptionMyMedia}</option>
|
<option value="librarytiles">${OptionMyMedia}</option>
|
||||||
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
<option value="smalllibrarytiles">${OptionMyMediaSmall}</option>
|
||||||
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
<option value="librarybuttons">${OptionMyMediaButtons}</option>
|
||||||
|
@ -100,9 +104,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br/>
|
<br />
|
||||||
<label class="checkboxContainer">
|
<label class="checkboxContainer">
|
||||||
<input class="chkHidePlayedFromLatest" type="checkbox" is="emby-checkbox"/>
|
<input class="chkHidePlayedFromLatest" type="checkbox" is="emby-checkbox" />
|
||||||
<span>${OptionHideWatchedContentFromLatestMedia}</span>
|
<span>${OptionHideWatchedContentFromLatestMedia}</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define([], function () {
|
define(['browser'], function (browser) {
|
||||||
|
|
||||||
var supportsTextTracks;
|
var supportsTextTracks;
|
||||||
var hlsPlayer;
|
var hlsPlayer;
|
||||||
|
@ -123,7 +123,7 @@
|
||||||
// Appending #t=xxx to the query string doesn't seem to work with HLS
|
// Appending #t=xxx to the query string doesn't seem to work with HLS
|
||||||
if (startPositionInSeekParam && currentSrc.indexOf('.m3u8') != -1) {
|
if (startPositionInSeekParam && currentSrc.indexOf('.m3u8') != -1) {
|
||||||
|
|
||||||
var delay = browserInfo.safari ? 2500 : 0;
|
var delay = browser.safari ? 2500 : 0;
|
||||||
if (delay) {
|
if (delay) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
element.currentTime = startPositionInSeekParam;
|
element.currentTime = startPositionInSeekParam;
|
||||||
|
@ -193,10 +193,10 @@
|
||||||
var requiresNativeControls = !self.enableCustomVideoControls();
|
var requiresNativeControls = !self.enableCustomVideoControls();
|
||||||
|
|
||||||
// Safari often displays the poster under the video and it doesn't look good
|
// Safari often displays the poster under the video and it doesn't look good
|
||||||
var poster = !browserInfo.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
var poster = !browser.safari && options.poster ? (' poster="' + options.poster + '"') : '';
|
||||||
|
|
||||||
// Can't autoplay in these browsers so we need to use the full controls
|
// Can't autoplay in these browsers so we need to use the full controls
|
||||||
if (requiresNativeControls && AppInfo.isNativeApp && browserInfo.android) {
|
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>';
|
||||||
}
|
}
|
||||||
else if (requiresNativeControls) {
|
else if (requiresNativeControls) {
|
||||||
|
@ -324,7 +324,7 @@
|
||||||
elem.src = "";
|
elem.src = "";
|
||||||
|
|
||||||
// When the browser regains focus it may start auto-playing the last video
|
// When the browser regains focus it may start auto-playing the last video
|
||||||
if (browserInfo.safari) {
|
if (browser.safari) {
|
||||||
elem.src = 'files/dummy.mp4';
|
elem.src = 'files/dummy.mp4';
|
||||||
elem.play();
|
elem.play();
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@
|
||||||
elem.crossOrigin = getCrossOriginValue(mediaSource);
|
elem.crossOrigin = getCrossOriginValue(mediaSource);
|
||||||
var val = streamInfo.url;
|
var val = streamInfo.url;
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && browserInfo.safari) {
|
if (AppInfo.isNativeApp && browser.safari) {
|
||||||
val = val.replace('file://', '');
|
val = val.replace('file://', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -503,16 +503,12 @@
|
||||||
|
|
||||||
function enableNativeTrackSupport(track) {
|
function enableNativeTrackSupport(track) {
|
||||||
|
|
||||||
if (browserInfo.safari && browserInfo.mobile) {
|
if (browser.safari && browser.mobile) {
|
||||||
// Leave it to apple to have different behavior between safari on ios vs osx
|
// Leave it to apple to have different behavior between safari on ios vs osx
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (browserInfo.edge || browserInfo.msie) {
|
if (browser.firefox) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (browserInfo.firefox) {
|
|
||||||
if ((currentSrc || '').toLowerCase().indexOf('.m3u8') != -1) {
|
if ((currentSrc || '').toLowerCase().indexOf('.m3u8') != -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -642,7 +638,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (browserInfo.edge || browserInfo.msie) {
|
if (browser.edge || browser.msie) {
|
||||||
fetchSubtitles(track).then(function (data) {
|
fetchSubtitles(track).then(function (data) {
|
||||||
currentTrackEvents = data.TrackEvents;
|
currentTrackEvents = data.TrackEvents;
|
||||||
});
|
});
|
||||||
|
@ -773,7 +769,7 @@
|
||||||
console.log('expectedId: ' + expectedId + '--currentTrack.Id:' + currentTrack.id);
|
console.log('expectedId: ' + expectedId + '--currentTrack.Id:' + currentTrack.id);
|
||||||
|
|
||||||
// IE doesn't support track id
|
// IE doesn't support track id
|
||||||
if (browserInfo.msie || browserInfo.edge) {
|
if (browser.msie || browser.edge) {
|
||||||
if (trackIndex == i) {
|
if (trackIndex == i) {
|
||||||
mode = 1; // show this track
|
mode = 1; // show this track
|
||||||
} else {
|
} else {
|
||||||
|
@ -860,7 +856,7 @@
|
||||||
|
|
||||||
self.enableCustomVideoControls = function () {
|
self.enableCustomVideoControls = function () {
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && browserInfo.safari) {
|
if (AppInfo.isNativeApp && browser.safari) {
|
||||||
|
|
||||||
if (navigator.userAgent.toLowerCase().indexOf('ipad') != -1) {
|
if (navigator.userAgent.toLowerCase().indexOf('ipad') != -1) {
|
||||||
// Need to disable it in order to support picture in picture
|
// Need to disable it in order to support picture in picture
|
||||||
|
@ -879,7 +875,7 @@
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (browserInfo.mobile) {
|
if (browser.mobile) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,22 +4,7 @@
|
||||||
|
|
||||||
return ApiClient.getUserViews({}, userId).then(function (result) {
|
return ApiClient.getUserViews({}, userId).then(function (result) {
|
||||||
|
|
||||||
var items = result.Items;
|
return result.Items;
|
||||||
|
|
||||||
var list = [];
|
|
||||||
|
|
||||||
for (var i = 0, length = items.length; i < length; i++) {
|
|
||||||
|
|
||||||
var view = items[i];
|
|
||||||
|
|
||||||
if (AppInfo.isNativeApp && browserInfo.safari && view.CollectionType == 'livetv') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
list.push(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue