@saooti/octopus-sdk 40.2.19 → 41.0.0
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/index.ts +2 -1
- package/package.json +4 -3
- package/src/App.vue +71 -95
- package/src/components/composable/player/usePlayerLive.ts +13 -4
- package/src/components/composable/player/usePlayerLogic.ts +6 -6
- package/src/components/composable/player/usePlayerVast.ts +7 -7
- package/src/components/composable/podcasts/usePodcastView.ts +3 -3
- package/src/components/composable/route/useAdvancedParamInit.ts +1 -1
- package/src/components/composable/route/useRouteUpdateParams.ts +4 -4
- package/src/components/composable/route/useSimplePageParam.ts +15 -8
- package/src/components/composable/useInit.ts +2 -2
- package/src/components/composable/useMetaTitleWatch.ts +2 -2
- package/src/components/display/accessibility/AccessibilityModal.vue +56 -68
- package/src/components/display/categories/CategoryChooser.vue +144 -145
- package/src/components/display/categories/CategoryFilter.vue +172 -198
- package/src/components/display/categories/CategoryList.vue +122 -147
- package/src/components/display/comments/CommentInput.vue +100 -122
- package/src/components/display/comments/CommentList.vue +169 -191
- package/src/components/display/comments/CommentName.vue +35 -45
- package/src/components/display/comments/CommentParentInfo.vue +28 -34
- package/src/components/display/comments/CommentPlayer.vue +38 -50
- package/src/components/display/comments/CommentSection.vue +85 -103
- package/src/components/display/comments/item/CommentBasicView.vue +48 -61
- package/src/components/display/comments/item/CommentItem.vue +104 -115
- package/src/components/display/comments/item/CommentMoreActions.vue +174 -189
- package/src/components/display/comments/item/CommentMoreActionsAdmin.vue +1 -3
- package/src/components/display/comments/like/LikeButton.vue +36 -41
- package/src/components/display/comments/like/LikeSection.vue +128 -136
- package/src/components/display/comments/modal/CheckIdentityModal.vue +35 -40
- package/src/components/display/comments/modal/EditCommentModal.vue +72 -78
- package/src/components/display/comments/modal/RecaptchaModal.vue +58 -63
- package/src/components/display/comments/modal/ReportAbuseModal.vue +59 -66
- package/src/components/display/edit/EditBox.vue +9 -8
- package/src/components/display/edit/EditBoxRadio.vue +1 -5
- package/src/components/display/emission/EmissionInlineList.vue +82 -97
- package/src/components/display/emission/EmissionItem.vue +57 -69
- package/src/components/display/emission/EmissionList.vue +189 -218
- package/src/components/display/emission/EmissionPlayerItem.vue +47 -64
- package/src/components/display/emission/EmissionPresentationItem.vue +44 -54
- package/src/components/display/emission/EmissionPresentationList.vue +51 -61
- package/src/components/display/filter/AdvancedSearch.vue +151 -176
- package/src/components/display/filter/CategorySearchFilter.vue +43 -46
- package/src/components/display/filter/DateFilter.vue +76 -91
- package/src/components/display/filter/MonetizableFilter.vue +27 -30
- package/src/components/display/filter/ProductorSearch.vue +87 -90
- package/src/components/display/filter/RubriqueChoice.vue +58 -63
- package/src/components/display/filter/RubriqueFilter.vue +154 -169
- package/src/components/display/filter/SearchOrder.vue +35 -35
- package/src/components/display/list/ListPaginate.vue +72 -93
- package/src/components/display/list/PaginateParams.vue +36 -40
- package/src/components/display/list/PaginateSection.vue +113 -124
- package/src/components/display/list/SwiperList.vue +97 -109
- package/src/components/display/live/CountDown.vue +15 -9
- package/src/components/display/live/CountdownOctopus.vue +16 -10
- package/src/components/display/live/LiveHorizontalList.vue +95 -103
- package/src/components/display/live/LiveItem.vue +64 -73
- package/src/components/display/live/LiveList.vue +125 -137
- package/src/components/display/live/RadioCurrently.vue +66 -73
- package/src/components/display/live/RadioImage.vue +39 -50
- package/src/components/display/live/RadioItem.vue +9 -14
- package/src/components/display/live/RadioList.vue +39 -53
- package/src/components/display/live/RadioPlanning.vue +210 -222
- package/src/components/display/organisation/OrganisationChooser.vue +116 -122
- package/src/components/display/organisation/OrganisationChooserLight.vue +44 -52
- package/src/components/display/participant/ParticipantInlineList.vue +42 -58
- package/src/components/display/participant/ParticipantItem.vue +66 -74
- package/src/components/display/participant/ParticipantList.vue +116 -141
- package/src/components/display/playlist/PlaylistItem.vue +33 -46
- package/src/components/display/playlist/PlaylistList.vue +115 -144
- package/src/components/display/playlist/PodcastList.vue +90 -103
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +58 -70
- package/src/components/display/podcastmaker/PodcastmakerHeader.vue +21 -22
- package/src/components/display/podcasts/AnimatorsItem.vue +15 -16
- package/src/components/display/podcasts/DownloadPodcastButton.vue +21 -29
- package/src/components/display/podcasts/ParticipantDescription.vue +22 -24
- package/src/components/display/podcasts/PodcastFilterList.vue +62 -56
- package/src/components/display/podcasts/PodcastImage.vue +96 -99
- package/src/components/display/podcasts/PodcastInlineList.vue +30 -28
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +107 -114
- package/src/components/display/podcasts/PodcastIsPlaying.vue +4 -12
- package/src/components/display/podcasts/PodcastItem.vue +48 -63
- package/src/components/display/podcasts/PodcastItemInfo.vue +19 -35
- package/src/components/display/podcasts/PodcastList.vue +182 -206
- package/src/components/display/podcasts/PodcastModuleBox.vue +100 -137
- package/src/components/display/podcasts/PodcastPlannedSpinner.vue +4 -6
- package/src/components/display/podcasts/PodcastPlayBar.vue +50 -61
- package/src/components/display/podcasts/PodcastPlayBasicButton.vue +38 -41
- package/src/components/display/podcasts/PodcastPlayButton.vue +164 -175
- package/src/components/display/podcasts/PodcastRawTranscript.vue +69 -80
- package/src/components/display/podcasts/PodcastRubriqueList.vue +35 -38
- package/src/components/display/podcasts/PodcastSwiperList.vue +100 -110
- package/src/components/display/podcasts/TagList.vue +48 -50
- package/src/components/display/podcasts/VideoModuleBox.vue +13 -24
- package/src/components/display/rubriques/RubriqueChooser.vue +135 -140
- package/src/components/display/rubriques/RubriqueList.vue +140 -160
- package/src/components/display/sharing/ChooseEpisodesNumber.vue +34 -33
- package/src/components/display/sharing/FormatSwitch.vue +16 -11
- package/src/components/display/sharing/PlayerAnonymousModal.vue +24 -27
- package/src/components/display/sharing/PlayerCommonParameters.vue +20 -13
- package/src/components/display/sharing/PlayerParameters.vue +69 -71
- package/src/components/display/sharing/QrCode.vue +55 -67
- package/src/components/display/sharing/ShareAnonymous.vue +160 -178
- package/src/components/display/sharing/ShareDistribution.vue +103 -117
- package/src/components/display/sharing/ShareNewsletter.vue +154 -161
- package/src/components/display/sharing/SharePlayer.vue +273 -295
- package/src/components/display/sharing/SharePlayerColors.vue +25 -16
- package/src/components/display/sharing/SharePlayerRadio.vue +61 -69
- package/src/components/display/sharing/SharePlayerTypes.vue +176 -176
- package/src/components/display/sharing/ShareSocialsButtons.vue +63 -75
- package/src/components/display/sharing/SubscribeButtons.vue +184 -207
- package/src/components/display/studio/RecordingItemButton.vue +1 -4
- package/src/components/form/ClassicCheckbox.vue +26 -30
- package/src/components/form/ClassicContentEditable.vue +37 -33
- package/src/components/form/ClassicCopyButton.vue +40 -44
- package/src/components/form/ClassicDatePicker.vue +114 -114
- package/src/components/form/ClassicEmojiPicker.vue +20 -28
- package/src/components/form/ClassicInputText.vue +116 -120
- package/src/components/form/ClassicLoading.vue +7 -12
- package/src/components/form/ClassicMultiselect.vue +115 -117
- package/src/components/form/ClassicRadio.vue +21 -16
- package/src/components/form/ClassicRadioLabel.vue +23 -22
- package/src/components/form/ClassicSearch.vue +24 -19
- package/src/components/form/ClassicSelect.vue +47 -38
- package/src/components/form/ClassicWysiwyg.vue +116 -123
- package/src/components/icons/AmazonMusicIcon.vue +7 -10
- package/src/components/icons/ApplePodcastIcon.vue +7 -11
- package/src/components/icons/BlueSkyIcon.vue +8 -11
- package/src/components/icons/DeezerIcon.vue +8 -11
- package/src/components/icons/EditFtpIcon.vue +8 -11
- package/src/components/icons/IHeartIcon.vue +8 -11
- package/src/components/icons/PlayVideoIcon.vue +7 -10
- package/src/components/icons/PlayerFmIcon.vue +7 -10
- package/src/components/icons/PocketCastIcon.vue +8 -11
- package/src/components/icons/PodcastAddictIcon.vue +7 -10
- package/src/components/icons/RadiolineIcon.vue +8 -11
- package/src/components/icons/TuninIcon.vue +8 -11
- package/src/components/icons/XIcon.vue +7 -10
- package/src/components/misc/AcpmImage.vue +6 -7
- package/src/components/misc/ClassicAccordion.vue +26 -31
- package/src/components/misc/ClassicLazy.vue +86 -90
- package/src/components/misc/ClassicNav.vue +16 -20
- package/src/components/misc/ClassicPopover.vue +271 -282
- package/src/components/misc/ClassicSpinner.vue +5 -27
- package/src/components/misc/ErrorMessage.vue +11 -12
- package/src/components/misc/FooterGarSection.vue +33 -41
- package/src/components/misc/FooterSection.vue +94 -131
- package/src/components/misc/HomeDropdown.vue +83 -105
- package/src/components/misc/MobileMenu.vue +101 -111
- package/src/components/misc/ProgressBar.vue +53 -62
- package/src/components/misc/TopBar.vue +98 -120
- package/src/components/misc/TopBarMainContent.vue +114 -133
- package/src/components/misc/modal/ClassicModal.vue +40 -33
- package/src/components/misc/modal/ClassicModalInBody.vue +34 -28
- package/src/components/misc/modal/ClipboardModal.vue +27 -30
- package/src/components/misc/modal/ContractPreviewModal.vue +64 -62
- package/src/components/misc/modal/MessageModal.vue +50 -47
- package/src/components/misc/modal/NewsletterModal.vue +30 -31
- package/src/components/misc/modal/QrCodeModal.vue +21 -21
- package/src/components/misc/modal/ShareModalPlayer.vue +43 -52
- package/src/components/misc/player/PlayerCompact.vue +6 -4
- package/src/components/misc/player/PlayerComponent.vue +8 -9
- package/src/components/misc/player/PlayerLarge.vue +9 -8
- package/src/components/misc/player/ads/AdsProgressBar.vue +8 -11
- package/src/components/misc/player/ads/AdsSkipButton.vue +24 -30
- package/src/components/misc/player/chaptering/ChapteringModal.vue +44 -54
- package/src/components/misc/player/chaptering/PlayerChaptering.vue +50 -62
- package/src/components/misc/player/elements/PlayerImage.vue +51 -57
- package/src/components/misc/player/elements/PlayerPlayButton.vue +81 -92
- package/src/components/misc/player/elements/PlayerSpeedButton.vue +23 -27
- package/src/components/misc/player/elements/PlayerTitle.vue +85 -111
- package/src/components/misc/player/progressbar/PlayerProgressBar.vue +18 -29
- package/src/components/misc/player/progressbar/PodcastProgressBar.vue +45 -56
- package/src/components/misc/player/radio/RadioHistory.vue +80 -99
- package/src/components/misc/player/radio/RadioProgressBar.vue +43 -54
- package/src/components/misc/player/video/PlayerVideo.vue +27 -40
- package/src/components/misc/player/video/PlayerVideoDigiteka.vue +32 -37
- package/src/components/misc/player/video/PlayerVideoHls.vue +199 -198
- package/src/components/misc/player/video/PlayerYoutubeEmbed.vue +10 -12
- package/src/components/pages/CategoryPage.vue +28 -33
- package/src/components/pages/EmissionPage.vue +113 -132
- package/src/components/pages/EmissionsPage.vue +2 -0
- package/src/components/pages/Error403Page.vue +21 -20
- package/src/components/pages/HomePage.vue +91 -100
- package/src/components/pages/LivesPage.vue +35 -37
- package/src/components/pages/MapPage.vue +209 -241
- package/src/components/pages/PageLogout.vue +8 -11
- package/src/components/pages/PageNotFound.vue +9 -5
- package/src/components/pages/ParticipantPage.vue +96 -110
- package/src/components/pages/ParticipantsPage.vue +3 -0
- package/src/components/pages/PlaylistPage.vue +112 -117
- package/src/components/pages/PlaylistsPage.vue +9 -2
- package/src/components/pages/PodcastPage.vue +224 -238
- package/src/components/pages/PodcastsPage.vue +9 -2
- package/src/components/pages/RadioPage.vue +56 -70
- package/src/components/pages/RubriquePage.vue +7 -3
- package/src/components/pages/SearchPage.vue +31 -36
- package/src/components/pages/TagPage.vue +11 -9
- package/src/components/pages/VideoPage.vue +14 -11
- package/src/helper/displayHelper.ts +1 -1
- package/src/helper/loadScript.ts +4 -4
- package/src/i18n.ts +2 -2
- package/src/main.ts +1 -1
- package/src/router/router.ts +17 -4
- package/src/stores/AuthStore.ts +12 -12
- package/src/stores/FilterStore.ts +1 -1
- package/src/stores/VastStore.ts +2 -2
- package/src/stores/class/general/player.ts +1 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +0 -113
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/icomoon.woff2 +0 -0
- package/public/css/fonts/style.css +0 -352
- package/sonarqube-scanner.js +0 -10
package/index.ts
CHANGED
|
@@ -108,7 +108,7 @@ import {useMetaTitleWatch} from "./src/components/composable/useMetaTitleWatch.t
|
|
|
108
108
|
import {useOrganisationFilter} from "./src/components/composable/useOrganisationFilter.ts";
|
|
109
109
|
import {useInit} from "./src/components/composable/useInit.ts";
|
|
110
110
|
import {useErrorHandler} from "./src/components/composable/useErrorHandler.ts";
|
|
111
|
-
|
|
111
|
+
import { useSimplePageParam } from "./src/components/composable/route/useSimplePageParam";
|
|
112
112
|
|
|
113
113
|
|
|
114
114
|
//helper
|
|
@@ -157,6 +157,7 @@ export {
|
|
|
157
157
|
useOrganisationFilter,
|
|
158
158
|
useInit,
|
|
159
159
|
useErrorHandler,
|
|
160
|
+
useSimplePageParam,
|
|
160
161
|
debounce,
|
|
161
162
|
useVastStore,
|
|
162
163
|
useSaveFetchStore,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "41.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
"serve": "vite preview",
|
|
9
9
|
"build": "vite build",
|
|
10
10
|
"dev": "vite",
|
|
11
|
+
"bundle":"vite-bundle-visualizer",
|
|
11
12
|
"proxy_authentifié": "node proxy.ts",
|
|
12
13
|
"proxy_non_authentifié": "node proxy.ts false",
|
|
13
14
|
"lint": "eslint --fix src",
|
|
14
15
|
"stylelint": "stylelint **/*.{scss,vue} --fix",
|
|
15
|
-
"sonar": "
|
|
16
|
+
"sonar": "sonar -Dsonar.host.url=http://localhost:9000"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
19
|
"@multiformats/murmur3": "^2.1.8",
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
"qrcode.vue": "^3.6.0",
|
|
42
43
|
"sass": "^1.89.2",
|
|
43
44
|
"sockjs-client": "^1.6.1",
|
|
44
|
-
"sonarqube-scanner": "^3.3.0",
|
|
45
45
|
"stylelint": "^16.20.0",
|
|
46
46
|
"stylelint-config-recommended-scss": "^15.0.1",
|
|
47
47
|
"stylelint-config-recommended-vue": "^1.6.0",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"video.js": "^8.23.3",
|
|
55
55
|
"videojs-quality-selector-hls": "^1.1.1",
|
|
56
56
|
"vite": "^6.3.5",
|
|
57
|
+
"vite-bundle-visualizer": "^1.2.1",
|
|
57
58
|
"vue": "^3.5.16",
|
|
58
59
|
"vue-i18n": "^11.1.5",
|
|
59
60
|
"vue-material-design-icons": "^5.3.1",
|
package/src/App.vue
CHANGED
|
@@ -8,118 +8,94 @@
|
|
|
8
8
|
<router-view />
|
|
9
9
|
<PlayerComponent />
|
|
10
10
|
</main>
|
|
11
|
-
<
|
|
12
|
-
<FooterOctopus />
|
|
13
|
-
</ClassicLazy>
|
|
11
|
+
<FooterOctopus />
|
|
14
12
|
</template>
|
|
15
13
|
</div>
|
|
16
14
|
</template>
|
|
17
|
-
<script lang="ts">
|
|
15
|
+
<script setup lang="ts">
|
|
18
16
|
import TopBar from "@/components/misc/TopBar.vue";
|
|
17
|
+
import FooterOctopus from "@/components/misc/FooterSection.vue";
|
|
19
18
|
import PlayerComponent from "@/components/misc/player/PlayerComponent.vue";
|
|
20
|
-
import ClassicLazy from "@/components/misc/ClassicLazy.vue";
|
|
21
19
|
import {useInit} from "./components/composable/useInit";
|
|
22
20
|
import {useMetaTitle} from "./components/composable/useMetaTitle";
|
|
23
21
|
import {useOrganisationFilter} from "./components/composable/useOrganisationFilter";
|
|
24
22
|
import { useAuthStore } from "./stores/AuthStore";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
|
|
29
|
-
const FooterOctopus = defineAsyncComponent(
|
|
30
|
-
() => import("@/components/misc/FooterSection.vue"),
|
|
31
|
-
);
|
|
23
|
+
import { defineAsyncComponent, getCurrentInstance, onBeforeMount, ref, watch } from "vue";
|
|
24
|
+
import { useRoute } from "vue-router";
|
|
25
|
+
import { useI18n } from "vue-i18n";
|
|
26
|
+
|
|
32
27
|
const CategoryFilter = defineAsyncComponent(
|
|
33
28
|
() => import("@/components/display/categories/CategoryFilter.vue"),
|
|
34
29
|
);
|
|
35
|
-
export default defineComponent({
|
|
36
|
-
name: "App",
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
PlayerComponent,
|
|
43
|
-
ClassicLazy
|
|
44
|
-
},
|
|
31
|
+
//Data
|
|
32
|
+
const reload = ref(false);
|
|
33
|
+
const pageFullyLoad = ref(false);
|
|
34
|
+
const firstDisplayCategoryFilter = ref(false);
|
|
45
35
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
36
|
+
//Composables
|
|
37
|
+
const {locale} = useI18n();
|
|
38
|
+
const { updateMetaTitle } = useMetaTitle();
|
|
39
|
+
const {initSdk} = useInit();
|
|
40
|
+
const {selectOrganisation} = useOrganisationFilter();
|
|
41
|
+
const authStore = useAuthStore();
|
|
42
|
+
const route = useRoute();
|
|
52
43
|
|
|
53
|
-
data() {
|
|
54
|
-
return {
|
|
55
|
-
reload: false as boolean,
|
|
56
|
-
pageFullyLoad: false as boolean,
|
|
57
|
-
firstDisplayCategoryFilter: false as boolean,
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
44
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
this.$route.name?.toString() ?? "",
|
|
85
|
-
);
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
"$i18n.locale"() {
|
|
89
|
-
this.updateMetaTitle();
|
|
90
|
-
this.$forceUpdate();
|
|
91
|
-
this.reload = !this.reload;
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
created() {
|
|
95
|
-
this.initApp();
|
|
96
|
-
setTimeout(() => {
|
|
97
|
-
this.pageFullyLoad = true;
|
|
98
|
-
}, 2000);
|
|
99
|
-
},
|
|
100
|
-
methods: {
|
|
101
|
-
...mapActions(useFilterStore, ["filterUpdateRubrique"]),
|
|
102
|
-
async initApp() {
|
|
103
|
-
await this.initSdk();
|
|
104
|
-
await this.handleOrganisationFilter();
|
|
105
|
-
},
|
|
106
|
-
async handleOrganisationFilter() {
|
|
107
|
-
let orgaId = "";
|
|
108
|
-
if (
|
|
109
|
-
this.$route.query.productor &&
|
|
110
|
-
"string" === typeof this.$route.query.productor
|
|
111
|
-
) {
|
|
112
|
-
orgaId = this.$route.query.productor;
|
|
113
|
-
} else if (this.authOrgaId) {
|
|
114
|
-
orgaId = this.authOrgaId;
|
|
115
|
-
}
|
|
116
|
-
if ("" === orgaId) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
await this.selectOrganisation(orgaId);
|
|
120
|
-
},
|
|
121
|
-
},
|
|
45
|
+
//Watch
|
|
46
|
+
watch(route, async () => {
|
|
47
|
+
updateMetaTitle();
|
|
48
|
+
if (firstDisplayCategoryFilter.value) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const namesRouteWithCategoryFilter = [
|
|
52
|
+
"homePriv",
|
|
53
|
+
"home",
|
|
54
|
+
"podcasts",
|
|
55
|
+
"emissions",
|
|
56
|
+
"participants",
|
|
57
|
+
"playlists",
|
|
58
|
+
];
|
|
59
|
+
firstDisplayCategoryFilter.value = namesRouteWithCategoryFilter.includes(
|
|
60
|
+
route.name?.toString() ?? "",
|
|
61
|
+
);
|
|
62
|
+
}, {immediate: true});
|
|
63
|
+
watch(locale,() => {
|
|
64
|
+
updateMetaTitle();
|
|
65
|
+
const instance = getCurrentInstance();
|
|
66
|
+
instance?.proxy?.$forceUpdate();
|
|
67
|
+
reload.value = !reload.value;
|
|
122
68
|
});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
onBeforeMount(()=>{
|
|
72
|
+
initApp();
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
pageFullyLoad.value = true;
|
|
75
|
+
}, 2000);
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
//Methods
|
|
80
|
+
async function initApp() {
|
|
81
|
+
await initSdk();
|
|
82
|
+
await handleOrganisationFilter();
|
|
83
|
+
}
|
|
84
|
+
async function handleOrganisationFilter() {
|
|
85
|
+
let orgaId = "";
|
|
86
|
+
if (
|
|
87
|
+
route.query.productor &&
|
|
88
|
+
"string" === typeof route.query.productor
|
|
89
|
+
) {
|
|
90
|
+
orgaId = route.query.productor;
|
|
91
|
+
} else if (authStore.authOrgaId) {
|
|
92
|
+
orgaId = authStore.authOrgaId;
|
|
93
|
+
}
|
|
94
|
+
if ("" === orgaId) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
await selectOrganisation(orgaId);
|
|
98
|
+
}
|
|
123
99
|
</script>
|
|
124
100
|
|
|
125
101
|
<style lang="scss" src="@/style/octopus-library.scss"></style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import stringHelper from "../../../helper/stringHelper";
|
|
2
2
|
import { usePlayerLogicProgress } from "./usePlayerLogicProgress";
|
|
3
|
-
import { Ref, ref } from "vue";
|
|
3
|
+
import { computed, Ref, ref } from "vue";
|
|
4
4
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
5
5
|
import { useApiStore } from "../../../stores/ApiStore";
|
|
6
6
|
import dayjs from "dayjs";
|
|
@@ -16,7 +16,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
16
16
|
const audioElement: Ref<HTMLAudioElement | null>= ref(null);
|
|
17
17
|
const hls: Ref<any>= ref(null);
|
|
18
18
|
const hlsRetryTimeout: Ref<ReturnType<typeof setTimeout> | undefined>= ref(undefined);
|
|
19
|
-
const playPromise: Ref<
|
|
19
|
+
const playPromise: Ref<Promise<void>|undefined>= ref(undefined);
|
|
20
20
|
const errorHls= ref(false);
|
|
21
21
|
|
|
22
22
|
|
|
@@ -24,6 +24,12 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
24
24
|
const apiStore = useApiStore();
|
|
25
25
|
const authStore = useAuthStore();
|
|
26
26
|
|
|
27
|
+
const needToAddToken = computed(() => {
|
|
28
|
+
return authStore.authParam.accessToken && ("SECURED" === playerStore.playerLive?.organisation?.privacy || playerStore.playerRadio?.secured);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
27
33
|
|
|
28
34
|
function onPlay(): void {
|
|
29
35
|
playerStore.playerChangeStatus("PAUSED"===playerStore.playerStatus);
|
|
@@ -69,7 +75,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
69
75
|
audioElement.value.canPlayType("application/vnd.apple.mpegurl") &&
|
|
70
76
|
!isAndroid
|
|
71
77
|
) {
|
|
72
|
-
if
|
|
78
|
+
if(needToAddToken.value) {
|
|
73
79
|
audioElement.value.src = playerStore.playerHlsUrl+"?access_token="+authStore.authParam.accessToken;
|
|
74
80
|
}else{
|
|
75
81
|
audioElement.value.src = playerStore.playerHlsUrl;
|
|
@@ -107,7 +113,7 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
107
113
|
}
|
|
108
114
|
hls.value = new Hls({
|
|
109
115
|
xhrSetup: (xhr: XMLHttpRequest) => {
|
|
110
|
-
if (
|
|
116
|
+
if (needToAddToken.value) {
|
|
111
117
|
xhr.setRequestHeader("Authorization", "Bearer " +authStore.authParam.accessToken);
|
|
112
118
|
}
|
|
113
119
|
}
|
|
@@ -140,6 +146,9 @@ export const usePlayerLive = (hlsReady: Ref<boolean>)=>{
|
|
|
140
146
|
async function endingLive(): Promise<void> {
|
|
141
147
|
clearTimeout(hlsRetryTimeout.value);
|
|
142
148
|
hlsRetryTimeout.value = undefined;
|
|
149
|
+
if(null===audioElement.value){
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
143
152
|
audioElement.value = null;
|
|
144
153
|
const audio: HTMLElement | null = document.getElementById("audio-player");
|
|
145
154
|
if (audio && hls.value) {
|
|
@@ -62,21 +62,21 @@ export const usePlayerLogic = (forceHide: Ref<boolean, boolean>)=>{
|
|
|
62
62
|
getTranscription();
|
|
63
63
|
}, {deep:true});
|
|
64
64
|
|
|
65
|
-
watch(()=>playerStore.playerLive, async () => {
|
|
65
|
+
watch(()=>playerStore.playerLive, async (_, oldLive) => {
|
|
66
66
|
if(playerStore.playerVideo){
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
nextTick(async () => {
|
|
70
70
|
hlsReady.value = false;
|
|
71
|
-
reInitPlayer();
|
|
71
|
+
reInitPlayer(oldLive!==undefined);
|
|
72
72
|
playLive();
|
|
73
73
|
});
|
|
74
74
|
}, {deep:true});
|
|
75
75
|
|
|
76
|
-
watch(()=>playerStore.playerRadio, async () => {
|
|
76
|
+
watch(()=>playerStore.playerRadio, async (_, oldRadio) => {
|
|
77
77
|
nextTick(async () => {
|
|
78
78
|
hlsReady.value = false;
|
|
79
|
-
reInitPlayer();
|
|
79
|
+
reInitPlayer(oldRadio !== undefined);
|
|
80
80
|
playRadio();
|
|
81
81
|
});
|
|
82
82
|
});
|
|
@@ -154,10 +154,10 @@ export const usePlayerLogic = (forceHide: Ref<boolean, boolean>)=>{
|
|
|
154
154
|
return playerStore.playerPodcast.podcastId + ".mp3?"+fetchHelper.getUriSearchParams(getAudioUrlParameters());
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
function reInitPlayer(): void {
|
|
157
|
+
function reInitPlayer(force=false): void {
|
|
158
158
|
setDownloadId(null);
|
|
159
159
|
listenError.value = false;
|
|
160
|
-
if (playerStore.playerLive || playerStore.playerRadio) {
|
|
160
|
+
if (force || playerStore.playerLive || playerStore.playerRadio) {
|
|
161
161
|
endingLive();
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -3,10 +3,10 @@ import { useVastStore } from "../../../stores/VastStore";
|
|
|
3
3
|
import { loadScript } from "../../../helper/loadScript";
|
|
4
4
|
import {nextTick, Ref, ref, watch} from 'vue';
|
|
5
5
|
import dayjs from "dayjs";
|
|
6
|
-
let adsLoader:
|
|
7
|
-
let adsManager:
|
|
8
|
-
let adDisplayContainer:
|
|
9
|
-
let adsRequest:
|
|
6
|
+
let adsLoader: google.ima.AdsLoader;
|
|
7
|
+
let adsManager:google.ima.AdsManager;
|
|
8
|
+
let adDisplayContainer:google.ima.AdDisplayContainer;
|
|
9
|
+
let adsRequest: google.ima.AdsRequest;
|
|
10
10
|
export const usePlayerVast = ()=>{
|
|
11
11
|
const imaLoaded = ref(false);
|
|
12
12
|
const isContentFinished = ref(false);
|
|
@@ -83,7 +83,7 @@ export const usePlayerVast = ()=>{
|
|
|
83
83
|
adsRequest.adTagUrl = vastUrl;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
function onAdsManagerLoaded(adsManagerLoadedEvent:
|
|
86
|
+
function onAdsManagerLoaded(adsManagerLoadedEvent: google.ima.AdsManagerLoadedEvent) {
|
|
87
87
|
const adsRenderingSettings = new google.ima.AdsRenderingSettings();
|
|
88
88
|
adsRenderingSettings.restoreCustomPlaybackStateOnAdBreakComplete = true;
|
|
89
89
|
adsManager = adsManagerLoadedEvent.getAdsManager(audioContainer.value, adsRenderingSettings);
|
|
@@ -117,7 +117,7 @@ export const usePlayerVast = ()=>{
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
function onAdError(adErrorEvent:
|
|
120
|
+
function onAdError(adErrorEvent: google.ima.AdErrorEvent) {
|
|
121
121
|
console.log(adErrorEvent.getError());
|
|
122
122
|
destroyAdManager();
|
|
123
123
|
}
|
|
@@ -132,7 +132,7 @@ export const usePlayerVast = ()=>{
|
|
|
132
132
|
isAdRequested.value = false;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
function onAdEvent(adEvent:
|
|
135
|
+
function onAdEvent(adEvent: google.ima.AdEvent) {
|
|
136
136
|
const ad = adEvent.getAd();
|
|
137
137
|
if(ad){
|
|
138
138
|
vastStore.updateCurrentAd(ad);
|
|
@@ -10,7 +10,7 @@ import { useI18n } from 'vue-i18n';
|
|
|
10
10
|
import {useOrgaComputed} from "../useOrgaComputed"
|
|
11
11
|
export const usePodcastView = (podcast: Ref<Podcast|undefined>, podcastConference: Ref<Conference|undefined>)=>{
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const {locale} = useI18n();
|
|
14
14
|
|
|
15
15
|
const {isEditRights, isPodcastmaker} = useOrgaComputed();
|
|
16
16
|
|
|
@@ -54,13 +54,13 @@ export const usePodcastView = (podcast: Ref<Podcast|undefined>, podcastConferen
|
|
|
54
54
|
if (!podcast.value || podcast.value.duration <= 1){return ""};
|
|
55
55
|
if (podcast.value.duration > 600000) {
|
|
56
56
|
return humanizeDuration(podcast.value.duration, {
|
|
57
|
-
language:
|
|
57
|
+
language: locale.value,
|
|
58
58
|
largest: 1,
|
|
59
59
|
round: true,
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
return humanizeDuration(podcast.value.duration, {
|
|
63
|
-
language:
|
|
63
|
+
language: locale.value,
|
|
64
64
|
largest: 2,
|
|
65
65
|
round: true,
|
|
66
66
|
});
|
|
@@ -9,7 +9,7 @@ import dayjs from "dayjs";
|
|
|
9
9
|
|
|
10
10
|
export const useAdvancedParamInit = (props: any, isEmission: boolean)=>{
|
|
11
11
|
|
|
12
|
-
const { searchPattern,organisationId, searchMinSize, paginateFirst, initSearchPattern, initOrga} = useSimplePageParam(props);
|
|
12
|
+
const { searchPattern,organisationId, searchMinSize, paginateFirst, initSearchPattern, initOrga} = useSimplePageParam(props, false, true);
|
|
13
13
|
const { isEditRights, isPodcastmaker } = useOrgaComputed();
|
|
14
14
|
const { stringifyRubriquesFilter } = useRubriquesFilterParam();
|
|
15
15
|
|
|
@@ -12,14 +12,14 @@ export const useRouteUpdateParams = ()=>{
|
|
|
12
12
|
return ['podcasts', 'emissions'].includes(route.name?.toString()??"");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
function updatePaginateSize(ps:number){
|
|
16
|
-
if(checkPage()){
|
|
15
|
+
function updatePaginateSize(ps:number, force= false){
|
|
16
|
+
if(force ||checkPage()){
|
|
17
17
|
router.push({query: {...route.query, ...{ps:ps, pr:1}}});
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
function updateRouteParam(update: {[key:string]: string|undefined}){
|
|
22
|
-
if(checkPage()){
|
|
21
|
+
function updateRouteParam(update: {[key:string]: string|undefined}, force= false){
|
|
22
|
+
if(force || checkPage()){
|
|
23
23
|
router.push({query: {...route.query, ...update}});
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -2,7 +2,7 @@ import { useFilterStore } from '../../../stores/FilterStore';
|
|
|
2
2
|
import { useRouteUpdateParams } from './useRouteUpdateParams';
|
|
3
3
|
import { computed, onMounted, Ref, ref, watch } from "vue";
|
|
4
4
|
|
|
5
|
-
export const useSimplePageParam = (props:
|
|
5
|
+
export const useSimplePageParam = (props: {readonly [key:string]: string|number}, force=false, advancedSearch=false)=>{
|
|
6
6
|
|
|
7
7
|
const { updateRouteParam } = useRouteUpdateParams();
|
|
8
8
|
|
|
@@ -12,18 +12,21 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
12
12
|
const searchPattern = ref("");
|
|
13
13
|
const organisationId: Ref<string|undefined> = ref(undefined);
|
|
14
14
|
|
|
15
|
-
const searchMinSize = computed(() =>
|
|
15
|
+
const searchMinSize = computed(() => getMinSize((props.routeQuery as string)));
|
|
16
16
|
const paginateFirst = computed(() => {
|
|
17
17
|
if(!props.pr){
|
|
18
18
|
return 0;
|
|
19
19
|
}
|
|
20
|
-
return Math.max((props.pr - 1 ) * props.ps, 0);
|
|
20
|
+
return Math.max(((props.pr as number) - 1 ) * (props.ps as number), 0);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
watch(searchPattern, () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
if(!advancedSearch){
|
|
25
|
+
const query = getMinSize(searchPattern.value);
|
|
26
|
+
updateRouteParam({
|
|
27
|
+
q: query.length ? query : undefined,
|
|
28
|
+
}, force);
|
|
29
|
+
}
|
|
27
30
|
});
|
|
28
31
|
|
|
29
32
|
onMounted(() => {
|
|
@@ -32,11 +35,14 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
32
35
|
isInit.value = true;
|
|
33
36
|
})
|
|
34
37
|
|
|
38
|
+
function getMinSize(param:string){
|
|
39
|
+
return param.length>3 ?param : ""
|
|
40
|
+
}
|
|
35
41
|
function initSearchPattern(){
|
|
36
|
-
searchPattern.value = props.routeQuery ?? "";
|
|
42
|
+
searchPattern.value = (props.routeQuery as string) ?? "";
|
|
37
43
|
}
|
|
38
44
|
function initOrga(){
|
|
39
|
-
organisationId.value = filterStore.filterOrgaId ?? props.routeOrga;
|
|
45
|
+
organisationId.value = filterStore.filterOrgaId ?? (props.routeOrga as string);
|
|
40
46
|
}
|
|
41
47
|
|
|
42
48
|
|
|
@@ -47,6 +53,7 @@ export const useSimplePageParam = (props: any)=>{
|
|
|
47
53
|
paginateFirst,
|
|
48
54
|
initSearchPattern,
|
|
49
55
|
initOrga,
|
|
56
|
+
updateRouteParam,
|
|
50
57
|
isInit
|
|
51
58
|
}
|
|
52
59
|
}
|
|
@@ -10,13 +10,13 @@ export const useInit= ()=>{
|
|
|
10
10
|
const authStore = useAuthStore();
|
|
11
11
|
const generalStore = useGeneralStore();
|
|
12
12
|
|
|
13
|
-
const
|
|
13
|
+
const {locale} = useI18n()
|
|
14
14
|
|
|
15
15
|
async function initSdk() {
|
|
16
16
|
classicApi.fetchData<Array<Category>>({
|
|
17
17
|
api: 0,
|
|
18
18
|
path:`iab/list${authStore.authOrgaId ? "/" + authStore.authOrgaId : ""}`,
|
|
19
|
-
parameters:{ lang:
|
|
19
|
+
parameters:{ lang: locale.value },
|
|
20
20
|
})
|
|
21
21
|
.then((data: Array<Category>) => {
|
|
22
22
|
if(data.length){
|
|
@@ -7,8 +7,8 @@ export const useMetaTitleWatch = ()=>{
|
|
|
7
7
|
const { updateMetaTitle } = useMetaTitle();
|
|
8
8
|
|
|
9
9
|
const route = useRoute();
|
|
10
|
-
const
|
|
10
|
+
const {locale} = useI18n();
|
|
11
11
|
|
|
12
12
|
watch(route, () => updateMetaTitle(), {immediate:true});
|
|
13
|
-
watch(
|
|
13
|
+
watch(locale, () => updateMetaTitle());
|
|
14
14
|
}
|