@saooti/octopus-sdk 40.1.8 → 40.1.10
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 +1 -1
- package/src/components/composable/player/usePlayerDisplayTime.ts +4 -2
- package/src/components/display/list/SwiperList.vue +8 -2
- package/src/components/display/live/LiveItem.vue +10 -9
- package/src/components/display/live/RadioCurrently.vue +4 -0
- package/src/components/misc/player/elements/PlayerTitle.vue +4 -0
package/package.json
CHANGED
|
@@ -20,13 +20,15 @@ export const usePlayerDisplayTime = ()=>{
|
|
|
20
20
|
}
|
|
21
21
|
return playerStore.totalTime;
|
|
22
22
|
});
|
|
23
|
-
|
|
23
|
+
const transcriptText = computed(() => {
|
|
24
|
+
return playerStore.transcriptText;
|
|
25
|
+
});
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
return {
|
|
27
29
|
displayPlayTime,
|
|
28
30
|
displayTotalTime,
|
|
29
|
-
transcriptText
|
|
31
|
+
transcriptText,
|
|
30
32
|
radioUrl: playerStore.radioUrl,
|
|
31
33
|
isAdPlaying: vastStore.isAdPlaying,
|
|
32
34
|
}
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
@slide-change="slideChange"
|
|
15
15
|
>
|
|
16
16
|
<swiper-slide v-for="(obj, index) in listObject" :key="obj">
|
|
17
|
-
<slot name="octopusSlide" :option="obj" :index="index" />
|
|
17
|
+
<slot name="octopusSlide" :option="obj" :index="index" v-if="composableInit" />
|
|
18
18
|
</swiper-slide>
|
|
19
19
|
</swiper>
|
|
20
20
|
</template>
|
|
21
|
-
<div v-else class="element-list-inline">
|
|
21
|
+
<div v-else-if="composableInit" class="element-list-inline">
|
|
22
22
|
<div v-for="(obj, index) in listObject" :key="obj" class="element-list-item">
|
|
23
23
|
<slot name="octopusSlide" :option="obj" :index="index" />
|
|
24
24
|
</div>
|
|
@@ -60,6 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
offsetSwiper: 40 as number,
|
|
61
61
|
widthSwiperUsable: 0 as number,
|
|
62
62
|
itemSizeWithoutRecalculed: 0 as number,
|
|
63
|
+
composableInit: false as boolean,
|
|
63
64
|
};
|
|
64
65
|
},
|
|
65
66
|
computed: {
|
|
@@ -101,6 +102,11 @@ export default defineComponent({
|
|
|
101
102
|
},
|
|
102
103
|
},
|
|
103
104
|
},
|
|
105
|
+
mounted(){
|
|
106
|
+
this.$nextTick(() => {
|
|
107
|
+
this.composableInit = true;
|
|
108
|
+
});
|
|
109
|
+
},
|
|
104
110
|
|
|
105
111
|
methods: {
|
|
106
112
|
slidesUpdated() {
|
|
@@ -29,13 +29,12 @@ export default defineComponent({
|
|
|
29
29
|
data() {
|
|
30
30
|
return {
|
|
31
31
|
live: undefined as Podcast | undefined,
|
|
32
|
-
watchInterval: undefined as ReturnType<typeof
|
|
32
|
+
watchInterval: undefined as ReturnType<typeof setInterval> | undefined,
|
|
33
33
|
};
|
|
34
34
|
},
|
|
35
35
|
|
|
36
36
|
created() {
|
|
37
|
-
this.
|
|
38
|
-
this.watchStatus();
|
|
37
|
+
this.initLiveItem();
|
|
39
38
|
},
|
|
40
39
|
unmounted() {
|
|
41
40
|
this.clearWatchStatus();
|
|
@@ -45,6 +44,12 @@ export default defineComponent({
|
|
|
45
44
|
clearInterval(this.watchInterval as unknown as number);
|
|
46
45
|
this.watchInterval = undefined;
|
|
47
46
|
},
|
|
47
|
+
async initLiveItem(){
|
|
48
|
+
await this.fetchPodcastData();
|
|
49
|
+
this.watchInterval = setInterval(() => {
|
|
50
|
+
this.fetchStatus();
|
|
51
|
+
}, 5000);
|
|
52
|
+
},
|
|
48
53
|
async fetchPodcastData(): Promise<void> {
|
|
49
54
|
if (!this.fetchConference?.podcastId) return;
|
|
50
55
|
try {
|
|
@@ -62,13 +67,14 @@ export default defineComponent({
|
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
69
|
},
|
|
65
|
-
async
|
|
70
|
+
async fetchStatus(): Promise<void> {
|
|
66
71
|
if (
|
|
67
72
|
!this.fetchConference ||
|
|
68
73
|
("PLANNED" !== this.fetchConference.status &&
|
|
69
74
|
"PENDING" !== this.fetchConference.status &&
|
|
70
75
|
"RECORDING" !== this.fetchConference.status)
|
|
71
76
|
) {
|
|
77
|
+
this.clearWatchStatus();
|
|
72
78
|
return;
|
|
73
79
|
}
|
|
74
80
|
const confInfo = await classicApi.fetchData<ConferencePublicInfo>({
|
|
@@ -81,11 +87,6 @@ export default defineComponent({
|
|
|
81
87
|
...this.fetchConference,
|
|
82
88
|
...{ status: newStatus },
|
|
83
89
|
});
|
|
84
|
-
} else {
|
|
85
|
-
this.clearWatchStatus();
|
|
86
|
-
this.watchInterval = setTimeout(() => {
|
|
87
|
-
this.watchStatus();
|
|
88
|
-
}, 5000);
|
|
89
90
|
}
|
|
90
91
|
},
|
|
91
92
|
},
|
|
@@ -92,6 +92,10 @@ export default defineComponent({
|
|
|
92
92
|
this.fetchCurrentlyPlaying();
|
|
93
93
|
}, 10000);
|
|
94
94
|
},
|
|
95
|
+
unmounted(){
|
|
96
|
+
clearInterval(this.radioInterval as unknown as number);
|
|
97
|
+
this.radioInterval= undefined;
|
|
98
|
+
},
|
|
95
99
|
methods: {
|
|
96
100
|
async fetchCurrentlyPlaying(): Promise<void> {
|
|
97
101
|
if (!this.radio || this.playingRadio) {
|