merge branch master into comic-reader

This commit is contained in:
dkanada
2020-08-30 14:58:37 +09:00
21 changed files with 1894 additions and 1878 deletions
+4 -4
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() {
+1 -4
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);
+1 -4
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);
+4 -4
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() {