@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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<section class="page-box">
|
|
3
|
-
<template v-if="loaded && !error">
|
|
3
|
+
<template v-if="loaded && !error && podcast">
|
|
4
4
|
<PodcastmakerHeader
|
|
5
5
|
v-if="isPodcastmaker"
|
|
6
6
|
:page-title="titlePage"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
@update-podcast="updatePodcast"
|
|
18
18
|
/>
|
|
19
19
|
<ShareSocialsButtons
|
|
20
|
-
v-if="
|
|
20
|
+
v-if="state.podcastPage.ShareButtons"
|
|
21
21
|
:organisation-id="podcast.organisation.id"
|
|
22
22
|
/>
|
|
23
23
|
<SharePlayer
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
<PodcastInlineList
|
|
31
31
|
:emission-id="podcast.emission.emissionId"
|
|
32
32
|
:href="'/main/pub/emission/' + podcast.emission.emissionId"
|
|
33
|
-
:title="
|
|
34
|
-
:button-text="
|
|
33
|
+
:title="t('More episodes of this emission')"
|
|
34
|
+
:button-text="t('All podcast emission button')"
|
|
35
35
|
title-tag="h3"
|
|
36
36
|
/>
|
|
37
37
|
<section v-if="!hideSuggestions">
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
class="mt-4"
|
|
41
41
|
title-tag="h3"
|
|
42
42
|
:podcast-id="podcastId"
|
|
43
|
-
:title="
|
|
43
|
+
:title="t('Suggested listening')"
|
|
44
44
|
/>
|
|
45
45
|
</ClassicLazy>
|
|
46
46
|
<ClassicLazy v-for="c in categories" :key="c.id" :min-height="550">
|
|
@@ -49,25 +49,25 @@
|
|
|
49
49
|
title-tag="h3"
|
|
50
50
|
:iab-id="c.id"
|
|
51
51
|
:href="'/main/pub/category/' + c.id"
|
|
52
|
-
:title="
|
|
53
|
-
:button-text="
|
|
52
|
+
:title="t('More episodes of this category : ', { name: c.name })"
|
|
53
|
+
:button-text="t('All podcast button', { name: c.name })"
|
|
54
54
|
/>
|
|
55
55
|
</ClassicLazy>
|
|
56
56
|
</section>
|
|
57
57
|
</div>
|
|
58
58
|
</template>
|
|
59
59
|
<ClassicLoading
|
|
60
|
-
:loading-text="!loaded ?
|
|
60
|
+
:loading-text="!loaded ? t('Loading content ...') : undefined"
|
|
61
61
|
:error-text="
|
|
62
62
|
error
|
|
63
|
-
?
|
|
63
|
+
? t(`This episode is not available for (re)listening`)
|
|
64
64
|
: undefined
|
|
65
65
|
"
|
|
66
66
|
/>
|
|
67
67
|
</section>
|
|
68
68
|
</template>
|
|
69
69
|
|
|
70
|
-
<script lang="ts">
|
|
70
|
+
<script setup lang="ts">
|
|
71
71
|
import youtubeVideoHelper from "../../helper/youtubeVideoHelper";
|
|
72
72
|
import {useOrgaComputed} from "../composable/useOrgaComputed";
|
|
73
73
|
import PodcastInlineList from "../display/podcasts/PodcastInlineList.vue";
|
|
@@ -84,13 +84,14 @@ import {
|
|
|
84
84
|
} from "@/stores/class/conference/conference";
|
|
85
85
|
import {useErrorHandler} from "../composable/useErrorHandler";
|
|
86
86
|
import {useSeoTitleUrl} from "../composable/route/useSeoTitleUrl";
|
|
87
|
-
import {
|
|
87
|
+
import { computed, defineAsyncComponent, onBeforeUnmount, ref, Ref, watch } from "vue";
|
|
88
88
|
import { Category } from "@/stores/class/general/category";
|
|
89
89
|
import { useAuthStore } from "../../stores/AuthStore";
|
|
90
90
|
import { useGeneralStore } from "../../stores/GeneralStore";
|
|
91
|
-
import { mapState, mapActions } from "pinia";
|
|
92
91
|
import { AxiosError } from "axios";
|
|
93
92
|
import { useCommentStore } from "../../stores/CommentStore";
|
|
93
|
+
import { useI18n } from "vue-i18n";
|
|
94
|
+
import { useRoute } from "vue-router";
|
|
94
95
|
const ShareSocialsButtons = defineAsyncComponent(
|
|
95
96
|
() => import("../display/sharing/ShareSocialsButtons.vue"),
|
|
96
97
|
);
|
|
@@ -103,240 +104,225 @@ const CommentSection = defineAsyncComponent(
|
|
|
103
104
|
const PodcastmakerHeader = defineAsyncComponent(
|
|
104
105
|
() => import("../display/podcastmaker/PodcastmakerHeader.vue"),
|
|
105
106
|
);
|
|
106
|
-
export default defineComponent({
|
|
107
|
-
name: "PodcastPage",
|
|
108
|
-
components: {
|
|
109
|
-
PodcastInlineList,
|
|
110
|
-
ShareSocialsButtons,
|
|
111
|
-
SharePlayer,
|
|
112
|
-
CommentSection,
|
|
113
|
-
PodcastModuleBox,
|
|
114
|
-
ClassicLoading,
|
|
115
|
-
ClassicLazy,
|
|
116
|
-
PodcastmakerHeader,
|
|
117
|
-
},
|
|
118
107
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
},
|
|
108
|
+
//Props
|
|
109
|
+
const props = defineProps({
|
|
110
|
+
updateStatus: { default: undefined, type: String },
|
|
111
|
+
playingPodcast: { default: undefined, type: Object as () => Podcast },
|
|
112
|
+
podcastId: { default: 0, type: Number },
|
|
113
|
+
});
|
|
114
|
+
|
|
124
115
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
116
|
+
//Data
|
|
117
|
+
const loaded = ref(false);
|
|
118
|
+
const error = ref(false);
|
|
119
|
+
const podcast: Ref<Podcast | undefined> = ref(undefined);
|
|
120
|
+
const fetchConference: Ref<Conference | undefined> = ref(undefined);
|
|
121
|
+
const infoReload: Ref<ReturnType<typeof setTimeout>| undefined> = ref(undefined);
|
|
122
|
+
const youtubeId: Ref<string| undefined> = ref(undefined);
|
|
131
123
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
124
|
+
//Composables
|
|
125
|
+
const route = useRoute();
|
|
126
|
+
const { t } = useI18n();
|
|
127
|
+
const { isPodcastmaker, isEditRights, authOrgaId } = useOrgaComputed();
|
|
128
|
+
const { updatePathParams } = useSeoTitleUrl();
|
|
129
|
+
const {handle403} = useErrorHandler();
|
|
130
|
+
const authStore = useAuthStore();
|
|
131
|
+
const generalStore = useGeneralStore();
|
|
132
|
+
const filterStore = useFilterStore();
|
|
133
|
+
const commentStore = useCommentStore();
|
|
134
|
+
|
|
135
|
+
//Computed
|
|
136
|
+
const hideSuggestions = computed(() =>{
|
|
137
|
+
return (
|
|
138
|
+
"true" ===
|
|
139
|
+
(podcast.value?.emission?.annotations?.["HIDE_SUGGESTIONS"] as
|
|
140
|
+
| string
|
|
141
|
+
| undefined)
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
const emissionMainCategory = computed(() =>{
|
|
145
|
+
if (!podcast.value) {
|
|
146
|
+
return 0;
|
|
147
|
+
}
|
|
148
|
+
if (podcast.value.emission.annotations?.mainIabId) {
|
|
149
|
+
return parseInt(
|
|
150
|
+
podcast.value.emission.annotations.mainIabId as string,
|
|
151
|
+
10,
|
|
152
|
+
);
|
|
153
|
+
} else if(podcast.value.emission.iabIds?.length) {
|
|
154
|
+
return podcast.value.emission.iabIds[0];
|
|
155
|
+
}
|
|
156
|
+
return 0;
|
|
157
|
+
});
|
|
142
158
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
hideSuggestions(): boolean {
|
|
159
|
+
const categories = computed(() =>{
|
|
160
|
+
if ("undefined" === typeof podcast.value) return [];
|
|
161
|
+
return generalStore.storedCategories
|
|
162
|
+
.filter((item: Category) => {
|
|
148
163
|
return (
|
|
149
|
-
|
|
150
|
-
(
|
|
151
|
-
| string
|
|
152
|
-
| undefined)
|
|
164
|
+
podcast.value?.emission.iabIds &&
|
|
165
|
+
-1 !== podcast.value.emission.iabIds.indexOf(item.id)
|
|
153
166
|
);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return
|
|
157
|
-
|
|
158
|
-
};
|
|
159
|
-
},
|
|
160
|
-
emissionMainCategory(): number {
|
|
161
|
-
if (!this.podcast) {
|
|
162
|
-
return 0;
|
|
163
|
-
}
|
|
164
|
-
if (this.podcast.emission.annotations?.mainIabId) {
|
|
165
|
-
return parseInt(
|
|
166
|
-
this.podcast.emission.annotations.mainIabId as string,
|
|
167
|
-
10,
|
|
168
|
-
);
|
|
169
|
-
} else if (this.podcast.emission.iabIds?.length) {
|
|
170
|
-
return this.podcast.emission.iabIds[0];
|
|
171
|
-
}
|
|
167
|
+
})
|
|
168
|
+
.sort((a: Category, b: Category) => {
|
|
169
|
+
if (a.id === emissionMainCategory.value) return -1;
|
|
170
|
+
if (b.id === emissionMainCategory.value) return 1;
|
|
172
171
|
return 0;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if ("undefined" === typeof this.podcast) return [];
|
|
176
|
-
return this.storedCategories
|
|
177
|
-
.filter((item: Category) => {
|
|
178
|
-
return (
|
|
179
|
-
this.podcast?.emission.iabIds &&
|
|
180
|
-
-1 !== this.podcast.emission.iabIds.indexOf(item.id)
|
|
181
|
-
);
|
|
182
|
-
})
|
|
183
|
-
.sort((a: Category, b: Category) => {
|
|
184
|
-
if (a.id === this.emissionMainCategory) return -1;
|
|
185
|
-
if (b.id === this.emissionMainCategory) return 1;
|
|
186
|
-
return 0;
|
|
187
|
-
});
|
|
188
|
-
},
|
|
189
|
-
editRight(): boolean {
|
|
190
|
-
return this.isEditRights(this.podcast?.organisation.id);
|
|
191
|
-
},
|
|
192
|
-
isLiveReadyToRecord(): boolean {
|
|
193
|
-
return (
|
|
194
|
-
undefined !== this.podcast?.conferenceId &&
|
|
195
|
-
0 !== this.podcast?.conferenceId &&
|
|
196
|
-
"READY_TO_RECORD" === this.podcast?.processingStatus
|
|
197
|
-
);
|
|
198
|
-
},
|
|
199
|
-
isOctopusAndAnimator(): boolean {
|
|
200
|
-
return !this.isPodcastmaker && this.editRight && this.isRoleLive;
|
|
201
|
-
},
|
|
202
|
-
titlePage(): string {
|
|
203
|
-
return this.isLiveReadyToRecord
|
|
204
|
-
? this.$t("Live episode")
|
|
205
|
-
: this.$t("Episode");
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
watch: {
|
|
209
|
-
updateStatus(): void {
|
|
210
|
-
if (this.fetchConference && null !== this.fetchConference) {
|
|
211
|
-
this.fetchConference.status = this.updateStatus;
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
podcastId: {
|
|
215
|
-
immediate: true,
|
|
216
|
-
async handler() {
|
|
217
|
-
await this.getPodcastDetails();
|
|
218
|
-
if (!this.podcast || this.error) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
this.initCommentUser();
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
beforeUnmount() {
|
|
226
|
-
this.contentToDisplayUpdate(null);
|
|
227
|
-
clearTimeout(this.infoReload);
|
|
228
|
-
},
|
|
172
|
+
});
|
|
173
|
+
});
|
|
229
174
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
async initConference() {
|
|
234
|
-
if (!this.podcast || undefined == this.podcast.conferenceId || "READY_TO_RECORD" !== this.podcast.processingStatus) return;
|
|
235
|
-
this.fetchConference = { conferenceId: this.podcast.conferenceId, title: "" };
|
|
236
|
-
if (this.isOctopusAndAnimator) {
|
|
237
|
-
try {
|
|
238
|
-
this.fetchConference = await classicApi.fetchData<Conference>({
|
|
239
|
-
api: 9,
|
|
240
|
-
path: "conference/" + this.podcast.conferenceId,
|
|
241
|
-
});
|
|
242
|
-
} catch {
|
|
243
|
-
await this.fetchConferenceStatus();
|
|
244
|
-
}
|
|
245
|
-
} else {
|
|
246
|
-
await this.fetchConferenceStatus();
|
|
247
|
-
}
|
|
248
|
-
if (
|
|
249
|
-
this.fetchConference &&
|
|
250
|
-
-1 !== this.fetchConference.conferenceId &&
|
|
251
|
-
"PUBLISHING" !== this.fetchConference.status &&
|
|
252
|
-
"DEBRIEFING" !== this.fetchConference.status
|
|
253
|
-
) {
|
|
254
|
-
this.fetchConferenceStatusLoop();
|
|
255
|
-
}
|
|
256
|
-
},
|
|
257
|
-
async fetchConferenceStatusLoop() {
|
|
258
|
-
if("PUBLISHING" ===this.fetchConference?.status){
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
this.infoReload = setTimeout(async () => {
|
|
262
|
-
await this.fetchConferenceStatus();
|
|
263
|
-
this.fetchConferenceStatusLoop();
|
|
264
|
-
}, 3000);
|
|
265
|
-
},
|
|
266
|
-
async fetchConferenceStatus() {
|
|
267
|
-
try {
|
|
268
|
-
const data = await classicApi.fetchData<ConferencePublicInfo>({
|
|
269
|
-
api: 9,
|
|
270
|
-
path: "conference/info/" + this.podcast?.conferenceId,
|
|
271
|
-
});
|
|
272
|
-
this.fetchConference.status = data.status;
|
|
273
|
-
} catch {
|
|
274
|
-
//Do nothing
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
updatePodcast(podcastUpdated: Podcast): void {
|
|
278
|
-
this.podcast = podcastUpdated;
|
|
279
|
-
},
|
|
280
|
-
initError(): void {
|
|
281
|
-
this.error = true;
|
|
282
|
-
this.loaded = true;
|
|
283
|
-
},
|
|
284
|
-
async getPodcastDetails(): Promise<void> {
|
|
285
|
-
this.loaded = false;
|
|
286
|
-
this.error = false;
|
|
287
|
-
try {
|
|
288
|
-
const data = await classicApi.fetchData<Podcast>({
|
|
289
|
-
api: 0,
|
|
290
|
-
path: "podcast/" + this.podcastId,
|
|
291
|
-
});
|
|
292
|
-
if (
|
|
293
|
-
"PUBLIC" !== data.organisation.privacy &&
|
|
294
|
-
this.filterOrgaId !== data.organisation.id &&
|
|
295
|
-
this.$route.query.productor !== data.organisation.id
|
|
296
|
-
) {
|
|
297
|
-
this.initError();
|
|
298
|
-
return;
|
|
299
|
-
}
|
|
300
|
-
this.podcast = data;
|
|
301
|
-
this.contentToDisplayUpdate(data);
|
|
302
|
-
if (
|
|
303
|
-
(!this.podcast.availability.visibility ||
|
|
304
|
-
("READY_TO_RECORD" !== this.podcast.processingStatus &&
|
|
305
|
-
"READY" !== this.podcast.processingStatus &&
|
|
306
|
-
"PROCESSING" !== this.podcast.processingStatus) ||
|
|
307
|
-
false === this.podcast.valid) &&
|
|
308
|
-
!this.editRight
|
|
309
|
-
) {
|
|
310
|
-
this.error = true;
|
|
311
|
-
this.loaded = true;
|
|
312
|
-
return;
|
|
313
|
-
}
|
|
314
|
-
this.podcastInProcessing();
|
|
315
|
-
this.updatePathParams(this.podcast.title);
|
|
316
|
-
await this.getCommentsConfig(this.podcast);
|
|
317
|
-
if((this.fetchConference?.videoProfile?.includes("video_") && "READY_TO_RECORD" === this.podcast.processingStatus) || undefined !== this.podcast.video?.videoId){
|
|
318
|
-
this.youtubeId = youtubeVideoHelper.getYoutubeId(this.podcast?.tags ?? []);
|
|
319
|
-
}
|
|
320
|
-
this.loaded = true;
|
|
321
|
-
} catch (error) {
|
|
322
|
-
this.handle403(error as AxiosError);
|
|
323
|
-
this.initError();
|
|
324
|
-
}
|
|
325
|
-
},
|
|
175
|
+
const editRight = computed(() =>{
|
|
176
|
+
return isEditRights(podcast.value?.organisation.id);
|
|
177
|
+
});
|
|
326
178
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
179
|
+
const isLiveReadyToRecord = computed(() =>{
|
|
180
|
+
return (
|
|
181
|
+
undefined !== podcast.value?.conferenceId &&
|
|
182
|
+
0 !== podcast.value?.conferenceId &&
|
|
183
|
+
"READY_TO_RECORD" === podcast.value?.processingStatus
|
|
184
|
+
);
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
const isOctopusAndAnimator = computed(() =>{
|
|
188
|
+
return !isPodcastmaker.value && editRight.value && authStore.isRoleLive;
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
const titlePage = computed(() =>{
|
|
192
|
+
return isLiveReadyToRecord.value? t("Live episode"): t("Episode");
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
//Watch
|
|
197
|
+
watch(()=>props.updateStatus, () => {
|
|
198
|
+
if (fetchConference.value && null !== fetchConference.value) {
|
|
199
|
+
fetchConference.value.status = props.updateStatus;
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
watch(()=>props.podcastId, async () => {
|
|
203
|
+
await getPodcastDetails();
|
|
204
|
+
if (!podcast.value || error.value) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
commentStore.initCommentUser();
|
|
208
|
+
}, {immediate: true});
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
onBeforeUnmount(() => {
|
|
212
|
+
generalStore.contentToDisplayUpdate(null);
|
|
213
|
+
clearTimeout(infoReload.value);
|
|
341
214
|
});
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
//Methods
|
|
218
|
+
async function initConference() {
|
|
219
|
+
if (!podcast.value || undefined == podcast.value.conferenceId || "READY_TO_RECORD" !== podcast.value.processingStatus) return;
|
|
220
|
+
fetchConference.value = { conferenceId: podcast.value.conferenceId, title: "" };
|
|
221
|
+
if (isOctopusAndAnimator.value) {
|
|
222
|
+
try {
|
|
223
|
+
fetchConference.value = await classicApi.fetchData<Conference>({
|
|
224
|
+
api: 9,
|
|
225
|
+
path: "conference/" + podcast.value.conferenceId,
|
|
226
|
+
});
|
|
227
|
+
} catch {
|
|
228
|
+
await fetchConferenceStatus();
|
|
229
|
+
}
|
|
230
|
+
} else {
|
|
231
|
+
await fetchConferenceStatus();
|
|
232
|
+
}
|
|
233
|
+
if (
|
|
234
|
+
fetchConference.value &&
|
|
235
|
+
-1 !== fetchConference.value.conferenceId &&
|
|
236
|
+
"PUBLISHING" !== fetchConference.value.status &&
|
|
237
|
+
"DEBRIEFING" !== fetchConference.value.status
|
|
238
|
+
) {
|
|
239
|
+
fetchConferenceStatusLoop();
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
async function fetchConferenceStatusLoop() {
|
|
244
|
+
if("PUBLISHING" ===fetchConference.value?.status){
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
infoReload.value = setTimeout(async () => {
|
|
248
|
+
await fetchConferenceStatus();
|
|
249
|
+
fetchConferenceStatusLoop();
|
|
250
|
+
}, 3000);
|
|
251
|
+
}
|
|
252
|
+
async function fetchConferenceStatus() {
|
|
253
|
+
try {
|
|
254
|
+
const data = await classicApi.fetchData<ConferencePublicInfo>({
|
|
255
|
+
api: 9,
|
|
256
|
+
path: "conference/info/" + podcast.value?.conferenceId,
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
fetchConference.value = {...fetchConference.value, ...data};
|
|
260
|
+
} catch {
|
|
261
|
+
//Do nothing
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
function updatePodcast(podcastUpdated: Podcast): void {
|
|
265
|
+
podcast.value = podcastUpdated;
|
|
266
|
+
}
|
|
267
|
+
function initError(): void {
|
|
268
|
+
error.value = true;
|
|
269
|
+
loaded.value = true;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
async function getPodcastDetails(): Promise<void> {
|
|
273
|
+
loaded.value = false;
|
|
274
|
+
error.value = false;
|
|
275
|
+
try {
|
|
276
|
+
const data = await classicApi.fetchData<Podcast>({
|
|
277
|
+
api: 0,
|
|
278
|
+
path: "podcast/" + props.podcastId,
|
|
279
|
+
});
|
|
280
|
+
if (
|
|
281
|
+
"PUBLIC" !== data.organisation.privacy &&
|
|
282
|
+
filterStore.filterOrgaId !== data.organisation.id &&
|
|
283
|
+
route.query.productor !== data.organisation.id
|
|
284
|
+
) {
|
|
285
|
+
initError();
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
podcast.value = data;
|
|
289
|
+
generalStore.contentToDisplayUpdate(data);
|
|
290
|
+
if (
|
|
291
|
+
(!podcast.value.availability.visibility ||
|
|
292
|
+
("READY_TO_RECORD" !== podcast.value.processingStatus &&
|
|
293
|
+
"READY" !== podcast.value.processingStatus &&
|
|
294
|
+
"PROCESSING" !== podcast.value.processingStatus) ||
|
|
295
|
+
false === podcast.value.valid) &&
|
|
296
|
+
!editRight.value
|
|
297
|
+
) {
|
|
298
|
+
error.value = true;
|
|
299
|
+
loaded.value = true;
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
podcastInProcessing();
|
|
303
|
+
updatePathParams(podcast.value.title);
|
|
304
|
+
await commentStore.getCommentsConfig(podcast.value);
|
|
305
|
+
if((fetchConference.value?.videoProfile?.includes("video_") && "READY_TO_RECORD" === podcast.value.processingStatus) || undefined !== podcast.value.video?.videoId){
|
|
306
|
+
youtubeId.value = youtubeVideoHelper.getYoutubeId(podcast.value?.tags ?? []);
|
|
307
|
+
}
|
|
308
|
+
loaded.value = true;
|
|
309
|
+
} catch (error) {
|
|
310
|
+
handle403(error as AxiosError);
|
|
311
|
+
initError();
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
function podcastInProcessing(){
|
|
316
|
+
if("PLANNED" !== podcast.value?.processingStatus){
|
|
317
|
+
initConference();
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
infoReload.value = setTimeout(async () => {
|
|
321
|
+
podcast.value = await classicApi.fetchData<Podcast>({
|
|
322
|
+
api: 0,
|
|
323
|
+
path: "podcast/" + props.podcastId,
|
|
324
|
+
});
|
|
325
|
+
podcastInProcessing();
|
|
326
|
+
}, 2000);
|
|
327
|
+
}
|
|
342
328
|
</script>
|
|
@@ -45,6 +45,7 @@ import AdvancedSearch from "../display/filter/AdvancedSearch.vue";
|
|
|
45
45
|
import {useAdvancedParamInit} from "../composable/route/useAdvancedParamInit";
|
|
46
46
|
import { computed, ref, watch } from "vue";
|
|
47
47
|
|
|
48
|
+
//Props
|
|
48
49
|
const props = defineProps({
|
|
49
50
|
pr: { default: 0, type: Number },
|
|
50
51
|
ps: { default: 30, type: Number },
|
|
@@ -61,6 +62,12 @@ const props = defineProps({
|
|
|
61
62
|
routeRubriques: { default: "", type: String },
|
|
62
63
|
});
|
|
63
64
|
|
|
65
|
+
|
|
66
|
+
//Data
|
|
67
|
+
const onlyVideo = ref(false);
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
//Composables
|
|
64
71
|
const {
|
|
65
72
|
organisationId,
|
|
66
73
|
searchPattern,
|
|
@@ -78,13 +85,13 @@ const {
|
|
|
78
85
|
isInit
|
|
79
86
|
} = useAdvancedParamInit(props, false);
|
|
80
87
|
|
|
81
|
-
const onlyVideo = ref(false);
|
|
82
|
-
|
|
83
88
|
|
|
89
|
+
//Computed
|
|
84
90
|
const orgaArray = computed(() => organisationId.value ? [organisationId.value] : []);
|
|
85
91
|
const withVideo = computed(() => false === onlyVideo.value ? undefined : true);
|
|
86
92
|
|
|
87
93
|
|
|
94
|
+
//Watch
|
|
88
95
|
watch(() => props.routeOnlyVideo, () =>{
|
|
89
96
|
onlyVideo.value = "true" === props.routeOnlyVideo;
|
|
90
97
|
}, {immediate: true});
|