@saooti/octopus-sdk 31.0.57 → 31.0.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -41,11 +41,10 @@ export const playerLive = defineComponent({
|
|
|
41
41
|
}, 1000);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
console.log(this.audioElement);
|
|
45
|
-
console.log(this.audioElement.canPlayType('application/vnd.apple.mpegurl'));
|
|
46
44
|
if (this.audioElement.canPlayType('application/vnd.apple.mpegurl')) {
|
|
47
45
|
this.audioElement.src = hlsStreamUrl;
|
|
48
46
|
await this.initLiveDownloadId();
|
|
47
|
+
console.log("ios avant play");
|
|
49
48
|
await (this.audioElement as HTMLAudioElement).play();
|
|
50
49
|
this.onPlay();
|
|
51
50
|
}else{
|
|
@@ -71,6 +70,7 @@ export const playerLive = defineComponent({
|
|
|
71
70
|
} catch (error) {
|
|
72
71
|
console.log('ERROR downloadId');
|
|
73
72
|
}
|
|
73
|
+
this.hlsReady = true;
|
|
74
74
|
},
|
|
75
75
|
async initHls(hlsStreamUrl: string): Promise<void> {
|
|
76
76
|
return new Promise<void>(async(resolve, reject) => {
|
|
@@ -97,7 +97,6 @@ export const playerLive = defineComponent({
|
|
|
97
97
|
} */
|
|
98
98
|
hls.on(Hls.Events.MANIFEST_PARSED, async () => {
|
|
99
99
|
await this.initLiveDownloadId();
|
|
100
|
-
this.hlsReady = true;
|
|
101
100
|
hls.attachMedia((this.audioElement as HTMLAudioElement));
|
|
102
101
|
await (this.audioElement as HTMLAudioElement).play();
|
|
103
102
|
this.onPlay();
|
|
@@ -173,6 +173,7 @@ export const playerLogic = defineComponent({
|
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
175
|
onTimeUpdate(event: Event): void {
|
|
176
|
+
console.log("timeupdate");
|
|
176
177
|
const mediaTarget = (event.currentTarget as HTMLMediaElement);
|
|
177
178
|
if (this.podcast || this.live) {
|
|
178
179
|
if (!this.downloadId) {
|
|
@@ -191,6 +192,7 @@ export const playerLogic = defineComponent({
|
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
const streamDuration = mediaTarget.duration;
|
|
195
|
+
console.log(mediaTarget.duration);
|
|
194
196
|
if (!streamDuration) return;
|
|
195
197
|
if (!mediaTarget.currentTime) return;
|
|
196
198
|
if (!this.live) {
|