1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

merge branch master into comic-reader

This commit is contained in:
dkanada 2020-08-30 14:58:37 +09:00
commit 5c2ec66420
21 changed files with 1894 additions and 1878 deletions

View file

@ -931,9 +931,9 @@ class ChromecastPlayer {
return state.VolumeLevel == null ? 100 : state.VolumeLevel;
}
isPlaying() {
isPlaying(mediaType) {
const state = this.lastPlayerData || {};
return state.NowPlayingItem != null;
return state.NowPlayingItem != null && (state.NowPlayingItem.MediaType === mediaType || !mediaType);
}
isPlayingVideo() {
@ -950,12 +950,12 @@ class ChromecastPlayer {
currentTime(val) {
if (val != null) {
return this.seek(val);
return this.seek(val * 10000);
}
let state = this.lastPlayerData || {};
state = state.PlayState || {};
return state.PositionTicks;
return state.PositionTicks / 10000;
}
duration() {

View file

@ -132,10 +132,7 @@ class HtmlAudioPlayer {
return new Promise(function (resolve, reject) {
requireHlsPlayer(function () {
const hls = new Hls({
manifestLoadingTimeOut: 20000,
xhrSetup: function (xhr, url) {
xhr.withCredentials = true;
}
manifestLoadingTimeOut: 20000
});
hls.loadSource(val);
hls.attachMedia(elem);

View file

@ -393,10 +393,7 @@ function tryRemoveElement(elem) {
return new Promise((resolve, reject) => {
requireHlsPlayer(() => {
const hls = new Hls({
manifestLoadingTimeOut: 20000,
xhrSetup(xhr) {
xhr.withCredentials = true;
}
manifestLoadingTimeOut: 20000
});
hls.loadSource(url);
hls.attachMedia(elem);

View file

@ -322,12 +322,12 @@ class SessionPlayer {
currentTime(val) {
if (val != null) {
return this.seek(val);
return this.seek(val * 10000);
}
let state = this.lastPlayerData || {};
state = state.PlayState || {};
return state.PositionTicks;
return state.PositionTicks / 10000;
}
duration() {
@ -466,9 +466,9 @@ class SessionPlayer {
sendCommandByName(this, 'DisplayContent', options);
}
isPlaying() {
isPlaying(mediaType) {
const state = this.lastPlayerData || {};
return state.NowPlayingItem != null;
return state.NowPlayingItem != null && (state.NowPlayingItem.MediaType === mediaType || !mediaType);
}
isPlayingVideo() {