mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update video player
This commit is contained in:
parent
e5119016fc
commit
353d62846e
6 changed files with 68 additions and 35 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.451",
|
||||
"_release": "1.4.451",
|
||||
"version": "1.4.453",
|
||||
"_release": "1.4.453",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.451",
|
||||
"commit": "521e1c545a373b8768307a3d895bf1544fcbefa5"
|
||||
"tag": "1.4.453",
|
||||
"commit": "26b21ef107f8d0042c200bb825b85492beeafe80"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
.guideHeaderDateSelection {
|
||||
font-size: 86%;
|
||||
padding: .4em 0 .2em;
|
||||
padding: .4em 0;
|
||||
}
|
||||
|
||||
.guideHeaderTimeslots {
|
||||
|
|
|
@ -527,12 +527,12 @@
|
|||
else if (program.IsSeries && program.IsRepeat && options.showRepeatIndicator) {
|
||||
indicatorHtml = '<span class="repeatTvProgram guideProgramIndicator">' + globalize.translate('sharedcomponents#Repeat') + '</span>';
|
||||
}
|
||||
if (indicatorHtml || program.EpisodeTitle) {
|
||||
if (indicatorHtml || (program.EpisodeTitle && options.showEpisodeTitle)) {
|
||||
html += '<div class="guideProgramSecondaryInfo">';
|
||||
|
||||
html += indicatorHtml || '';
|
||||
|
||||
if (program.EpisodeTitle) {
|
||||
if (program.EpisodeTitle && options.showEpisodeTitle) {
|
||||
html += '<span class="programSecondaryTitle">' + program.EpisodeTitle + '</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
|
@ -578,7 +578,8 @@
|
|||
showLiveIndicator: allowIndicators && userSettings.get('guide-indicator-live') !== 'false',
|
||||
showPremiereIndicator: allowIndicators && userSettings.get('guide-indicator-premiere') !== 'false',
|
||||
showNewIndicator: allowIndicators && userSettings.get('guide-indicator-new') === 'true',
|
||||
showRepeatIndicator: allowIndicators && userSettings.get('guide-indicator-repeat') === 'true'
|
||||
showRepeatIndicator: allowIndicators && userSettings.get('guide-indicator-repeat') === 'true',
|
||||
showEpisodeTitle: layoutManager.tv ? false : true
|
||||
};
|
||||
|
||||
for (var i = 0, length = channels.length; i < length; i++) {
|
||||
|
@ -625,7 +626,7 @@
|
|||
|
||||
html += '<h3 class="' + cssClass + '">' + channel.Number + '</h3>';
|
||||
|
||||
if (!hasChannelImage) {
|
||||
if (!hasChannelImage && channel.Name) {
|
||||
html += '<div class="guideChannelName">' + channel.Name + '</div>';
|
||||
}
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
|
|||
break;
|
||||
case Hls.ErrorTypes.MEDIA_ERROR:
|
||||
console.log("fatal media error encountered, try to recover");
|
||||
hls.recoverMediaError();
|
||||
handleMediaError();
|
||||
break;
|
||||
default:
|
||||
// cannot recover
|
||||
|
@ -280,6 +280,36 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
|
|||
}
|
||||
}
|
||||
|
||||
var recoverDecodingErrorDate, recoverSwapAudioCodecDate;
|
||||
|
||||
function handleMediaError() {
|
||||
|
||||
if (!hlsPlayer) {
|
||||
return;
|
||||
}
|
||||
|
||||
var now = Date.now();
|
||||
|
||||
if (window.performance && window.performance.now) {
|
||||
now = performance.now();
|
||||
}
|
||||
|
||||
if (!recoverDecodingErrorDate || (now - recoverDecodingErrorDate) > 3000) {
|
||||
recoverDecodingErrorDate = now;
|
||||
console.log('try to recover media Error ...');
|
||||
hlsPlayer.recoverMediaError();
|
||||
} else {
|
||||
if (!recoverSwapAudioCodecDate || (now - recoverSwapAudioCodecDate) > 3000) {
|
||||
recoverSwapAudioCodecDate = now;
|
||||
console.log('try to swap Audio Codec and recover media Error ...');
|
||||
hlsPlayer.swapAudioCodec();
|
||||
hlsPlayer.recoverMediaError();
|
||||
} else {
|
||||
console.error('cannot recover, last media error recovery failed ...');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function applySrc(elem, src) {
|
||||
|
||||
if (window.Windows) {
|
||||
|
@ -306,7 +336,10 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
|
|||
// Chrome now returns a promise
|
||||
return promise.catch(function (e) {
|
||||
|
||||
if ((e.name || '').toLowerCase() === 'notallowederror') {
|
||||
var errorName = (e.name || '').toLowerCase();
|
||||
// safari uses aborterror
|
||||
if (errorName === 'notallowederror' ||
|
||||
errorName === 'aborterror') {
|
||||
// swallow this error because the user can still click the play button on the video element
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
@ -646,10 +679,8 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
|
|||
|
||||
function onError() {
|
||||
|
||||
destroyCustomTrack(this);
|
||||
var errorCode = this.error ? this.error.code : '';
|
||||
errorCode = (errorCode || '').toString();
|
||||
console.log('Media element error code: ' + errorCode);
|
||||
var errorCode = this.error ? (this.error.code || 0) : 0;
|
||||
console.log('Media element error code: ' + errorCode.toString());
|
||||
|
||||
var type;
|
||||
|
||||
|
@ -664,12 +695,15 @@ define(['browser', 'pluginManager', 'events', 'apphost', 'loading', 'playbackMan
|
|||
break;
|
||||
case 3:
|
||||
// MEDIA_ERR_DECODE
|
||||
break;
|
||||
handleMediaError();
|
||||
return;
|
||||
case 4:
|
||||
// MEDIA_ERR_SRC_NOT_SUPPORTED
|
||||
break;
|
||||
}
|
||||
|
||||
destroyCustomTrack(this);
|
||||
|
||||
//events.trigger(self, 'error', [
|
||||
//{
|
||||
// type: type
|
||||
|
|
|
@ -1185,13 +1185,13 @@ var AppInfo = {};
|
|||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
paths.sharingMenu = "cordova/sharingwidget";
|
||||
paths.wakeonlan = "cordova/wakeonlan";
|
||||
} else {
|
||||
paths.wakeonlan = apiClientBowerPath + "/wakeonlan";
|
||||
|
||||
define("sharingMenu", [embyWebComponentsBowerPath + "/sharing/sharingmenu"], returnFirstDependency);
|
||||
}
|
||||
|
||||
paths.wakeonlan = apiClientBowerPath + "/wakeonlan";
|
||||
|
||||
define("libjass", [bowerPath + "/libjass/libjass.min", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency);
|
||||
|
||||
if (window.IntersectionObserver) {
|
||||
|
@ -1278,7 +1278,7 @@ var AppInfo = {};
|
|||
|
||||
// hack for an android test before browserInfo is loaded
|
||||
if (Dashboard.isRunningInCordova() && window.MainActivity) {
|
||||
define("shell", ["cordova/android/shell"], returnFirstDependency);
|
||||
define("shell", ["cordova/shell"], returnFirstDependency);
|
||||
} else {
|
||||
define("shell", [embyWebComponentsBowerPath + "/shell"], returnFirstDependency);
|
||||
}
|
||||
|
@ -1293,7 +1293,7 @@ var AppInfo = {};
|
|||
|
||||
// hack for an android test before browserInfo is loaded
|
||||
if (Dashboard.isRunningInCordova() && window.MainActivity) {
|
||||
paths.appStorage = "cordova/android/appstorage";
|
||||
paths.appStorage = "cordova/appstorage";
|
||||
paths.filesystem = 'cordova/filesystem';
|
||||
} else {
|
||||
paths.appStorage = getAppStorage(apiClientBowerPath);
|
||||
|
@ -1559,12 +1559,8 @@ var AppInfo = {};
|
|||
var apiClientBowerPath = bowerPath + "/emby-apiclient";
|
||||
var embyWebComponentsBowerPath = bowerPath + '/emby-webcomponents';
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
if (window.MainActivity && window.MainActivity.getAndroidBuildVersion() >= 24) {
|
||||
define("actionsheet", ["webActionSheet"], returnFirstDependency);
|
||||
} else {
|
||||
if (Dashboard.isRunningInCordova() && browser.safari) {
|
||||
define("actionsheet", ["cordova/actionsheet"], returnFirstDependency);
|
||||
}
|
||||
} else {
|
||||
define("actionsheet", ["webActionSheet"], returnFirstDependency);
|
||||
}
|
||||
|
@ -1618,7 +1614,7 @@ var AppInfo = {};
|
|||
define("multi-download", [embyWebComponentsBowerPath + '/multidownload'], returnFirstDependency);
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browser.android) {
|
||||
define("fileDownloader", ['cordova/android/filedownloader'], returnFirstDependency);
|
||||
define("fileDownloader", ['cordova/filedownloader'], returnFirstDependency);
|
||||
define("localassetmanager", ["cordova/localassetmanager"], returnFirstDependency);
|
||||
} else {
|
||||
define("fileDownloader", [embyWebComponentsBowerPath + '/filedownloader'], returnFirstDependency);
|
||||
|
@ -1635,12 +1631,10 @@ var AppInfo = {};
|
|||
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||
|
||||
window.VlcAudio = true;
|
||||
define("audiorenderer", ["cordova/android/vlcplayer"]);
|
||||
define("videorenderer", ["cordova/android/vlcplayer"]);
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova() && browserInfo.android) {
|
||||
define("localsync", ["cordova/android/localsync"], returnFirstDependency);
|
||||
define("localsync", ["cordova/localsync"], returnFirstDependency);
|
||||
}
|
||||
else {
|
||||
define("localsync", ["scripts/localsync"], returnFirstDependency);
|
||||
|
@ -2664,7 +2658,7 @@ var AppInfo = {};
|
|||
deps.push('registrationServices');
|
||||
|
||||
if (browserInfo.android) {
|
||||
deps.push('cordova/android/androidcredentials');
|
||||
deps.push('cordova/androidcredentials');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2697,8 +2691,8 @@ var AppInfo = {};
|
|||
if (Dashboard.isRunningInCordova()) {
|
||||
|
||||
if (browserInfo.android) {
|
||||
postInitDependencies.push('cordova/android/mediasession');
|
||||
postInitDependencies.push('cordova/android/chromecast');
|
||||
postInitDependencies.push('cordova/mediasession');
|
||||
postInitDependencies.push('cordova/chromecast');
|
||||
|
||||
} else if (browserInfo.safari) {
|
||||
|
||||
|
|
|
@ -155,15 +155,19 @@
|
|||
position: fixed;
|
||||
}
|
||||
|
||||
@media all and (max-width:600px) {
|
||||
@media all and (max-width:480px) {
|
||||
.osdPoster {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width:540px) {
|
||||
.videoOsdBottom .paper-icon-button-light {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width:600px) {
|
||||
.videoOsdBottom .volumeButtons {
|
||||
display: none !important;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue