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