@saooti/octopus-sdk 31.0.54 → 31.0.56
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
package/package.json
CHANGED
package/src/api/classicCrud.ts
CHANGED
|
@@ -14,6 +14,11 @@ enum ModuleApi {
|
|
|
14
14
|
}
|
|
15
15
|
/* eslint-disable */
|
|
16
16
|
export default {
|
|
17
|
+
async fetchData<Type>(state: StoreState,moduleName: ModuleApi,wsPath:string, forceRefresh?:boolean): Promise<Type>{
|
|
18
|
+
console.log(state,moduleName,wsPath,forceRefresh);
|
|
19
|
+
const response = await axios.get('/mock');
|
|
20
|
+
return response.data;
|
|
21
|
+
},
|
|
17
22
|
async postData<Type>(state: StoreState,moduleName: ModuleApi,wsPath:string, elementToCreate: unknown): Promise<Type>{
|
|
18
23
|
console.log(state,moduleName,wsPath);
|
|
19
24
|
const response = await axios.post('/mock', elementToCreate, {
|
|
@@ -35,7 +35,13 @@ export const playerLive = defineComponent({
|
|
|
35
35
|
'/index.m3u8';
|
|
36
36
|
try {
|
|
37
37
|
this.audioElement = (document.getElementById('audio-player') as HTMLAudioElement);
|
|
38
|
-
if
|
|
38
|
+
if(!this.audioElement){
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
this.playLive();
|
|
41
|
+
}, 1000);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (this.audioElement.canPlayType('application/vnd.apple.mpegurl')) {
|
|
39
45
|
this.audioElement.src = hlsStreamUrl;
|
|
40
46
|
await this.initLiveDownloadId();
|
|
41
47
|
await (this.audioElement as HTMLAudioElement).play();
|
|
@@ -63,10 +63,12 @@ export const playerLogic = defineComponent({
|
|
|
63
63
|
},
|
|
64
64
|
live: {
|
|
65
65
|
deep: true,
|
|
66
|
-
|
|
67
|
-
this
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
handler(){
|
|
67
|
+
this.$nextTick(async () => {
|
|
68
|
+
this.hlsReady = false;
|
|
69
|
+
this.reInitPlayer();
|
|
70
|
+
await this.playLive();
|
|
71
|
+
});
|
|
70
72
|
}
|
|
71
73
|
},
|
|
72
74
|
async listenTime(newVal): Promise<void> {
|