@saooti/octopus-sdk 31.0.56 → 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/README.md CHANGED
@@ -647,3 +647,4 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
647
647
  * 31.0.54 Test live ios
648
648
  * 31.0.55 Test live ios
649
649
  * 31.0.56 Test live ios
650
+ * 31.0.57 Test live ios
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "31.0.56",
3
+ "version": "31.0.58",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -35,7 +35,7 @@ export const playerLive = defineComponent({
35
35
  '/index.m3u8';
36
36
  try {
37
37
  this.audioElement = (document.getElementById('audio-player') as HTMLAudioElement);
38
- if(!this.audioElement){
38
+ if(null===this.audioElement){
39
39
  setTimeout(() => {
40
40
  this.playLive();
41
41
  }, 1000);
@@ -44,6 +44,7 @@ export const playerLive = defineComponent({
44
44
  if (this.audioElement.canPlayType('application/vnd.apple.mpegurl')) {
45
45
  this.audioElement.src = hlsStreamUrl;
46
46
  await this.initLiveDownloadId();
47
+ console.log("ios avant play");
47
48
  await (this.audioElement as HTMLAudioElement).play();
48
49
  this.onPlay();
49
50
  }else{
@@ -69,6 +70,7 @@ export const playerLive = defineComponent({
69
70
  } catch (error) {
70
71
  console.log('ERROR downloadId');
71
72
  }
73
+ this.hlsReady = true;
72
74
  },
73
75
  async initHls(hlsStreamUrl: string): Promise<void> {
74
76
  return new Promise<void>(async(resolve, reject) => {
@@ -95,7 +97,6 @@ export const playerLive = defineComponent({
95
97
  } */
96
98
  hls.on(Hls.Events.MANIFEST_PARSED, async () => {
97
99
  await this.initLiveDownloadId();
98
- this.hlsReady = true;
99
100
  hls.attachMedia((this.audioElement as HTMLAudioElement));
100
101
  await (this.audioElement as HTMLAudioElement).play();
101
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) {