@saooti/octopus-sdk 40.1.0-SNAPSHOT → 40.1.1-SNAPSHOT
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/usePlayerLogic.ts +1 -1
- package/src/components/composable/player/usePlayerLogicProgress.ts +1 -1
- package/src/components/composable/player/usePlayerStitching.ts +1 -1
- package/src/components/composable/player/usePlayerTranscript.ts +1 -1
- package/src/components/composable/radio/usefetchRadioData.ts +1 -82
- package/src/components/composable/useInit.ts +1 -1
- package/src/components/composable/useOrganisationFilter.ts +1 -1
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
|
7
7
|
import { useAuthStore } from "../../../stores/AuthStore";
|
|
8
8
|
import { useGeneralStore } from "../../../stores/GeneralStore";
|
|
9
9
|
import { useVastStore } from "../../../stores/VastStore";
|
|
10
|
-
import classicApi from "
|
|
10
|
+
import classicApi from "../../../api/classicApi";
|
|
11
11
|
import dayjs from "dayjs";
|
|
12
12
|
import { FetchParam } from "@/stores/class/general/fetchParam";
|
|
13
13
|
export const usePlayerLogic = (forceHide: Ref<boolean, boolean>)=>{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
2
2
|
import { useAuthStore } from "../../../stores/AuthStore";
|
|
3
3
|
import { onMounted, Ref, ref, watch} from 'vue';
|
|
4
|
-
import classicApi from "
|
|
4
|
+
import classicApi from "../../../api/classicApi";
|
|
5
5
|
|
|
6
6
|
export const usePlayerLogicProgress = ()=>{
|
|
7
7
|
const listenTime= ref(0);
|
|
@@ -7,7 +7,7 @@ import fetchHelper from "../../../helper/fetchHelper";
|
|
|
7
7
|
import {computed, onMounted, Ref, ref, watch} from 'vue';
|
|
8
8
|
import { useRoute } from "vue-router";
|
|
9
9
|
import dayjs from "dayjs";
|
|
10
|
-
import classicApi from "
|
|
10
|
+
import classicApi from "../../../api/classicApi";
|
|
11
11
|
import { AdserverOtherEmission } from "@/stores/class/adserver/adserverOtherEmission";
|
|
12
12
|
import { AdPosition } from "@/stores/class/adserver/adPosition";
|
|
13
13
|
import { AdserverTiming } from "@/stores/class/adserver/adserverTiming";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
2
2
|
import { useVastStore } from "../../../stores/VastStore";
|
|
3
|
-
import classicApi from "
|
|
3
|
+
import classicApi from "../../../api/classicApi";
|
|
4
4
|
import { AdserverOtherEmission } from "@/stores/class/adserver/adserverOtherEmission";
|
|
5
5
|
export const usePlayerTranscript = ()=>{
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import classicApi from
|
|
1
|
+
import classicApi from "../../../api/classicApi";
|
|
2
2
|
import { MediaRadio, MetadataRadio, NextAdvertising } from '@/stores/class/general/player';
|
|
3
3
|
import { Podcast } from '@/stores/class/general/podcast';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
@@ -73,84 +73,3 @@ export const useFetchRadio = ()=>{
|
|
|
73
73
|
displayTitle
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
|
|
77
|
-
/*
|
|
78
|
-
|
|
79
|
-
import { defineComponent } from "vue";
|
|
80
|
-
import { MediaRadio, MetadataRadio, NextAdvertising } from "@/stores/class/general/player";
|
|
81
|
-
import classicApi from "../../../api/classicApi";
|
|
82
|
-
import dayjs from "dayjs";
|
|
83
|
-
import { Podcast } from "@/stores/class/general/podcast";
|
|
84
|
-
export const fetchRadioData = defineComponent({
|
|
85
|
-
data() {
|
|
86
|
-
return {
|
|
87
|
-
radioInterval: undefined as ReturnType<typeof setTimeout> | undefined,
|
|
88
|
-
};
|
|
89
|
-
},
|
|
90
|
-
unmounted() {
|
|
91
|
-
clearInterval(this.radioInterval as unknown as number);
|
|
92
|
-
},
|
|
93
|
-
methods: {
|
|
94
|
-
async fetchRadioMetadata(
|
|
95
|
-
canalId: number,
|
|
96
|
-
previousTitle: string,
|
|
97
|
-
callbackMetadata: (
|
|
98
|
-
metadata: MediaRadio,
|
|
99
|
-
podcast: Podcast | undefined,
|
|
100
|
-
history: Array<MediaRadio>
|
|
101
|
-
) => void,
|
|
102
|
-
callbackAdvertising?: (
|
|
103
|
-
nextAdvertising: NextAdvertising
|
|
104
|
-
) => void,
|
|
105
|
-
): Promise<void> {
|
|
106
|
-
const metadata = await classicApi.fetchData<MetadataRadio>({
|
|
107
|
-
api: 14,
|
|
108
|
-
path: "player/playing/" + canalId,
|
|
109
|
-
});
|
|
110
|
-
if(callbackAdvertising){
|
|
111
|
-
callbackAdvertising(metadata.nextAdvertising);
|
|
112
|
-
}
|
|
113
|
-
const arrayMetadata = metadata.previously;
|
|
114
|
-
arrayMetadata.unshift(metadata.currently);
|
|
115
|
-
for (let index = 0, len = arrayMetadata.length; index < len; index++) {
|
|
116
|
-
if (
|
|
117
|
-
dayjs().valueOf() - 18000 >
|
|
118
|
-
dayjs(arrayMetadata[index].startDate).valueOf()
|
|
119
|
-
) {
|
|
120
|
-
await this.useCallbackIfNewMetadata(previousTitle, arrayMetadata, index, len,callbackMetadata);
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
async useCallbackIfNewMetadata(previousTitle: string, arrayMetadata: Array<MediaRadio>, index:number, len: number, callbackMetadata: (
|
|
126
|
-
metadata: MediaRadio,
|
|
127
|
-
podcast: Podcast | undefined,
|
|
128
|
-
history: Array<MediaRadio>
|
|
129
|
-
) => void){
|
|
130
|
-
if (previousTitle !== arrayMetadata[index].title) {
|
|
131
|
-
const historyIndex = index + 1 < len ? index + 1 : index;
|
|
132
|
-
const history = arrayMetadata.slice(historyIndex, len);
|
|
133
|
-
if (arrayMetadata[index].podcastId) {
|
|
134
|
-
const data: Podcast = await classicApi.fetchData<Podcast>({
|
|
135
|
-
api: 0,
|
|
136
|
-
path: "podcast/" + arrayMetadata[index].podcastId,
|
|
137
|
-
});
|
|
138
|
-
callbackMetadata(arrayMetadata[index], data, history);
|
|
139
|
-
} else {
|
|
140
|
-
callbackMetadata(arrayMetadata[index], undefined, history);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
displayTitle(metadata: MediaRadio): string {
|
|
145
|
-
let title = "";
|
|
146
|
-
if (metadata.title) {
|
|
147
|
-
title += metadata.title;
|
|
148
|
-
}
|
|
149
|
-
if (metadata.artist) {
|
|
150
|
-
title += " - " + metadata.artist;
|
|
151
|
-
}
|
|
152
|
-
return title;
|
|
153
|
-
},
|
|
154
|
-
},
|
|
155
|
-
});
|
|
156
|
-
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import classicApi from "
|
|
2
|
+
import classicApi from "../../api/classicApi";
|
|
3
3
|
import { useAuthStore } from "../../stores/AuthStore";
|
|
4
4
|
import { useGeneralStore } from "../../stores/GeneralStore";
|
|
5
5
|
import { Category } from "@/stores/class/general/category";
|
|
@@ -2,7 +2,7 @@ import {useErrorHandler} from "./useErrorHandler";
|
|
|
2
2
|
import { useFilterStore } from "../../stores/FilterStore";
|
|
3
3
|
import { useSaveFetchStore } from "../../stores/SaveFetchStore";
|
|
4
4
|
import { state } from "../../stores/ParamSdkStore";
|
|
5
|
-
import classicApi from "
|
|
5
|
+
import classicApi from "../../api/classicApi";
|
|
6
6
|
import { Rubriquage } from "@/stores/class/rubrique/rubriquage";
|
|
7
7
|
import { useRoute, useRouter } from "vue-router";
|
|
8
8
|
import { AxiosError } from "axios";
|