@saooti/octopus-sdk 38.1.11 → 38.1.13
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/display/podcasts/PodcastInlineList.vue +3 -0
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +3 -0
- package/src/components/display/podcasts/PodcastSwiperList.vue +3 -0
- package/src/components/mixins/player/playerLive.ts +16 -1
- package/src/components/mixins/player/playerLogic.ts +2 -0
- package/src/stores/class/general/player.ts +2 -0
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
:no-rubriquage-id="noRubriquageId"
|
|
16
16
|
:query="query"
|
|
17
17
|
:podcast-id="podcastId"
|
|
18
|
+
:last-three-months="lastThreeMonths"
|
|
18
19
|
@update:is-arrow="$emit('update:isArrow', $event)"
|
|
19
20
|
/>
|
|
20
21
|
<PodcastSwiperList
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
:rubriquage-id="rubriquageId"
|
|
33
34
|
:no-rubriquage-id="noRubriquageId"
|
|
34
35
|
:query="query"
|
|
36
|
+
:last-three-months="lastThreeMonths"
|
|
35
37
|
@update:is-arrow="$emit('update:isArrow', $event)"
|
|
36
38
|
/>
|
|
37
39
|
</template>
|
|
@@ -67,6 +69,7 @@ export default defineComponent({
|
|
|
67
69
|
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
68
70
|
query: { default: undefined, type: String },
|
|
69
71
|
podcastId: { default: undefined, type: Number },
|
|
72
|
+
lastThreeMonths: { default: false, type: Boolean },
|
|
70
73
|
},
|
|
71
74
|
emits: ["update:isArrow"],
|
|
72
75
|
computed: {
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
49
|
<script lang="ts">
|
|
50
|
+
import dayjs from "dayjs";
|
|
50
51
|
import PodcastInlineListTemplate from "./PodcastInlineListTemplate.vue";
|
|
51
52
|
import octopusApi from "@saooti/octopus-api";
|
|
52
53
|
import domHelper from "../../../helper/dom";
|
|
@@ -84,6 +85,7 @@ export default defineComponent({
|
|
|
84
85
|
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
85
86
|
query: { default: undefined, type: String },
|
|
86
87
|
podcastId: { default: undefined, type: Number },
|
|
88
|
+
lastThreeMonths: { default: false, type: Boolean },
|
|
87
89
|
},
|
|
88
90
|
emits: ["update:isArrow"],
|
|
89
91
|
|
|
@@ -225,6 +227,7 @@ export default defineComponent({
|
|
|
225
227
|
sort: this.popularSort ? "POPULARITY" : "DATE",
|
|
226
228
|
query: this.query,
|
|
227
229
|
includeStatus: ["READY", "PROCESSING"],
|
|
230
|
+
after: this.popularSort && this.lastThreeMonths ? dayjs().subtract(3, 'months').toISOString(): undefined
|
|
228
231
|
},
|
|
229
232
|
true,
|
|
230
233
|
);
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script lang="ts">
|
|
34
|
+
import dayjs from "dayjs";
|
|
34
35
|
import PodcastInlineListTemplate from "./PodcastInlineListTemplate.vue";
|
|
35
36
|
import octopusApi from "@saooti/octopus-api";
|
|
36
37
|
import PodcastItem from "./PodcastItem.vue";
|
|
@@ -64,6 +65,7 @@ export default defineComponent({
|
|
|
64
65
|
rubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
65
66
|
noRubriquageId: { default: () => [], type: Array as () => Array<number> },
|
|
66
67
|
query: { default: undefined, type: String },
|
|
68
|
+
lastThreeMonths: { default: false, type: Boolean },
|
|
67
69
|
},
|
|
68
70
|
emits: ["update:isArrow"],
|
|
69
71
|
|
|
@@ -129,6 +131,7 @@ export default defineComponent({
|
|
|
129
131
|
sort: this.popularSort ? "POPULARITY" : "DATE",
|
|
130
132
|
query: this.query,
|
|
131
133
|
includeStatus: ["READY", "PROCESSING"],
|
|
134
|
+
after: this.popularSort && this.lastThreeMonths ? dayjs().subtract(3, 'months').toISOString(): undefined
|
|
132
135
|
},
|
|
133
136
|
true,
|
|
134
137
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { state } from "../../../stores/ParamSdkStore";
|
|
2
|
+
import dayjs from "dayjs";
|
|
2
3
|
import { playerLogicProgress} from "./playerLogicProgress";
|
|
3
4
|
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
4
5
|
import { useAuthStore } from "@/stores/AuthStore";
|
|
@@ -6,6 +7,7 @@ import { mapState, mapActions } from "pinia";
|
|
|
6
7
|
/* eslint-disable */
|
|
7
8
|
let Hls:any = null;
|
|
8
9
|
/* eslint-enable */
|
|
10
|
+
const maxMinutesSessionId = 1;
|
|
9
11
|
import { defineComponent } from "vue";
|
|
10
12
|
export const playerLive = defineComponent({
|
|
11
13
|
mixins: [playerLogicProgress],
|
|
@@ -31,7 +33,20 @@ export const playerLive = defineComponent({
|
|
|
31
33
|
},
|
|
32
34
|
playRadio() {
|
|
33
35
|
if (!this.playerRadio) return;
|
|
34
|
-
this.
|
|
36
|
+
this.handleSessionIdRadio();
|
|
37
|
+
this.playHls(this.playerRadio.url+"?origin=octopus&sessionId="+this.playerRadio.sessionId);
|
|
38
|
+
},
|
|
39
|
+
handleSessionIdRadio(){
|
|
40
|
+
if(!this.playerRadio) return;
|
|
41
|
+
if(this.playerRadio.sessionId && dayjs().diff(dayjs(this.playerRadio.dateSessionId), 'm')<maxMinutesSessionId){
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.playerRadio.sessionId = this.uuidv4();
|
|
45
|
+
},
|
|
46
|
+
uuidv4() {
|
|
47
|
+
return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c =>
|
|
48
|
+
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
|
|
49
|
+
);
|
|
35
50
|
},
|
|
36
51
|
playLive() {
|
|
37
52
|
if (!this.playerLive) return;
|
|
@@ -9,6 +9,7 @@ import { useAuthStore } from "@/stores/AuthStore";
|
|
|
9
9
|
import { useGeneralStore } from "@/stores/GeneralStore";
|
|
10
10
|
import { usePlayerStore } from "@/stores/PlayerStore";
|
|
11
11
|
import { mapState, mapActions } from "pinia";
|
|
12
|
+
import dayjs from "dayjs";
|
|
12
13
|
export const playerLogic = defineComponent({
|
|
13
14
|
mixins: [cookies, playerLive, playerComment, playerTranscript],
|
|
14
15
|
data() {
|
|
@@ -110,6 +111,7 @@ export const playerLogic = defineComponent({
|
|
|
110
111
|
return;
|
|
111
112
|
}
|
|
112
113
|
if ("PAUSED" === this.playerStatus && this.playerRadio) {
|
|
114
|
+
this.playerRadio.dateSessionId = dayjs().toISOString();
|
|
113
115
|
this.hlsReady = false;
|
|
114
116
|
this.reInitPlayer();
|
|
115
117
|
this.endingLive();
|