@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
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
<section class="module-box overflow-visible">
|
|
3
3
|
<div class="d-flex justify-content-between align-items-center">
|
|
4
4
|
<h3 class="mb-3">
|
|
5
|
-
{{
|
|
5
|
+
{{ t("Embed") }}
|
|
6
6
|
</h3>
|
|
7
7
|
<div
|
|
8
|
-
v-if="noAd && !platformEducation"
|
|
8
|
+
v-if="noAd && !generalStore.platformEducation"
|
|
9
9
|
class="sticker"
|
|
10
|
-
:title="
|
|
10
|
+
:title="t('You cannot insert advertising')"
|
|
11
11
|
>
|
|
12
|
-
{{
|
|
12
|
+
{{ t("No advertising") }}
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
<template v-if="!exclusive && (authenticated || notExclusive)">
|
|
@@ -71,30 +71,30 @@
|
|
|
71
71
|
class="btn btn-primary w-fit-content mt-3"
|
|
72
72
|
@click="isShareModal = true"
|
|
73
73
|
>
|
|
74
|
-
{{
|
|
74
|
+
{{ t("Share the player") }}
|
|
75
75
|
</button>
|
|
76
76
|
</div>
|
|
77
77
|
</div>
|
|
78
78
|
</template>
|
|
79
79
|
<div v-else-if="exclusive && authenticated">
|
|
80
|
-
{{
|
|
80
|
+
{{ t("Only organisation members can share the content") }}
|
|
81
81
|
</div>
|
|
82
82
|
<div v-else-if="!authenticated">
|
|
83
|
-
{{
|
|
83
|
+
{{ t("Only authenticated members can share the content") }}
|
|
84
84
|
</div>
|
|
85
85
|
</section>
|
|
86
86
|
</template>
|
|
87
87
|
|
|
88
|
-
<script lang="ts">
|
|
88
|
+
<script setup lang="ts">
|
|
89
89
|
import { Podcast } from "@/stores/class/general/podcast";
|
|
90
90
|
import { Emission } from "@/stores/class/general/emission";
|
|
91
91
|
import { Playlist } from "@/stores/class/general/playlist";
|
|
92
92
|
import { useAuthStore } from "../../../stores/AuthStore";
|
|
93
93
|
import { useApiStore } from "../../../stores/ApiStore";
|
|
94
94
|
import { useSaveFetchStore } from "../../../stores/SaveFetchStore";
|
|
95
|
-
import {
|
|
96
|
-
import { defineComponent, defineAsyncComponent } from "vue";
|
|
95
|
+
import { defineAsyncComponent, ref, Ref, computed, onBeforeMount } from "vue";
|
|
97
96
|
import { useGeneralStore } from "../../../stores/GeneralStore";
|
|
97
|
+
import { useI18n } from "vue-i18n";
|
|
98
98
|
const ShareModalPlayer = defineAsyncComponent(
|
|
99
99
|
() => import("../../misc/modal/ShareModalPlayer.vue"),
|
|
100
100
|
);
|
|
@@ -107,296 +107,274 @@ const SharePlayerTypes = defineAsyncComponent(
|
|
|
107
107
|
const SharePlayerColors = defineAsyncComponent(
|
|
108
108
|
() => import("./SharePlayerColors.vue"),
|
|
109
109
|
);
|
|
110
|
-
export default defineComponent({
|
|
111
|
-
components: {
|
|
112
|
-
ShareModalPlayer,
|
|
113
|
-
SharePlayerColors,
|
|
114
|
-
PlayerParameters,
|
|
115
|
-
SharePlayerTypes,
|
|
116
|
-
},
|
|
117
|
-
props: {
|
|
118
|
-
podcast: { default: undefined, type: Object as () => Podcast },
|
|
119
|
-
emission: { default: undefined, type: Object as () => Emission },
|
|
120
|
-
playlist: { default: undefined, type: Object as () => Playlist },
|
|
121
|
-
organisationId: { default: undefined, type: String },
|
|
122
|
-
exclusive: { default: false, type: Boolean },
|
|
123
|
-
notExclusive: { default: true, type: Boolean },
|
|
124
|
-
},
|
|
125
110
|
|
|
126
|
-
data() {
|
|
127
|
-
return {
|
|
128
|
-
typeCustomPlayer: "",
|
|
129
|
-
iFrameModel: "default" as string,
|
|
130
|
-
isShareModal: false as boolean,
|
|
131
|
-
color: "#40a372" as string,
|
|
132
|
-
theme: "#000000" as string,
|
|
133
|
-
proceedReading: true as boolean,
|
|
134
|
-
episodeChoiceDisplay: "number" as string,
|
|
135
|
-
episodesNumber: 3 as number,
|
|
136
|
-
isVisible: false as boolean,
|
|
137
|
-
displayArticle: true as boolean,
|
|
138
|
-
displayTranscript: true as boolean,
|
|
139
|
-
displayWave: false as boolean,
|
|
140
|
-
playerAutoPlay: false as boolean,
|
|
141
|
-
orgaAttributes: undefined as
|
|
142
|
-
| { [key: string]: string | number | boolean | undefined }
|
|
143
|
-
| undefined,
|
|
144
|
-
insertCode: false as boolean,
|
|
145
|
-
};
|
|
146
|
-
},
|
|
147
111
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
case "largeMore":
|
|
279
|
-
return "210px";
|
|
280
|
-
case "emissionLarge":
|
|
281
|
-
return "350px";
|
|
282
|
-
case "emission":
|
|
283
|
-
return "540px";
|
|
284
|
-
case "videoLive":
|
|
285
|
-
return "450px";
|
|
286
|
-
default:
|
|
287
|
-
return "530px";
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
iFrame(): string {
|
|
291
|
-
const specialDigiteka = this.podcast?.video?.videoId
|
|
292
|
-
? 'allowfullscreen="true" referrerpolicy="no-referrer-when-downgrade"'
|
|
293
|
-
: "";
|
|
294
|
-
return `<iframe src="${this.iFrameSrc}" width="100%" height="${this.iFrameHeight}" scrolling="no" frameborder="0" ${specialDigiteka} allow="clipboard-read; clipboard-write; autoplay"></iframe>`;
|
|
295
|
-
},
|
|
296
|
-
dataTitle(): number {
|
|
297
|
-
if (this.podcast) return this.podcast.podcastId;
|
|
298
|
-
if (this.emission) return this.emission.emissionId;
|
|
299
|
-
if (this.playlist) return this.playlist.playlistId;
|
|
300
|
-
return 0;
|
|
301
|
-
},
|
|
302
|
-
},
|
|
303
|
-
created() {
|
|
304
|
-
this.initSharePlayer();
|
|
305
|
-
},
|
|
306
|
-
methods: {
|
|
307
|
-
...mapActions(useSaveFetchStore, ["getOrgaAttributes"]),
|
|
308
|
-
async initSharePlayer() {
|
|
309
|
-
this.orgaAttributes = await this.getOrgaAttributes(this.authOrgaId ?? "");
|
|
310
|
-
this.initColor();
|
|
311
|
-
if (this.isLiveReadyToRecord) {
|
|
312
|
-
this.iFrameModel = "large";
|
|
313
|
-
}
|
|
314
|
-
if ("true" === this.podcast?.annotations?.["fromTTS"]) {
|
|
315
|
-
this.displayTranscript = false;
|
|
316
|
-
}
|
|
317
|
-
},
|
|
318
|
-
getIframeNumber(): string {
|
|
319
|
-
return this.displayChoiceAllEpisodes && "all" === this.episodeChoiceDisplay
|
|
320
|
-
? "/0"
|
|
321
|
-
: "/" + this.episodesNumber;
|
|
322
|
-
},
|
|
323
|
-
constructEmissionUrl(url: Array<string>) {
|
|
324
|
-
if (!this.emission) {
|
|
325
|
-
return [];
|
|
326
|
-
}
|
|
327
|
-
switch (this.iFrameModel) {
|
|
328
|
-
case "default":
|
|
329
|
-
url.push("emission");
|
|
330
|
-
break;
|
|
331
|
-
case "large":
|
|
332
|
-
url.push("emissionLarge");
|
|
333
|
-
break;
|
|
334
|
-
default:
|
|
335
|
-
url.push(`${this.iFrameModel}`);
|
|
336
|
-
break;
|
|
337
|
-
}
|
|
338
|
-
url.push(`/${this.emission.emissionId}${this.getIframeNumber()}`);
|
|
339
|
-
return url;
|
|
340
|
-
},
|
|
341
|
-
constructPlaylistUrl(url: Array<string>) {
|
|
342
|
-
if (!this.playlist) {
|
|
343
|
-
return [];
|
|
344
|
-
}
|
|
345
|
-
switch (this.iFrameModel) {
|
|
346
|
-
case "default":
|
|
347
|
-
url.push("playlist");
|
|
348
|
-
break;
|
|
349
|
-
case "large":
|
|
350
|
-
url.push("playlistLarge");
|
|
351
|
-
break;
|
|
352
|
-
default:
|
|
353
|
-
url.push(`${this.iFrameModel}`);
|
|
354
|
-
break;
|
|
355
|
-
}
|
|
356
|
-
url.push(`/${this.playlist.playlistId}`);
|
|
357
|
-
return url;
|
|
358
|
-
},
|
|
359
|
-
addUrlParameters(url: Array<string>) {
|
|
360
|
-
url.push("?distributorId=" + this.organisationId);
|
|
112
|
+
//Props
|
|
113
|
+
const props = defineProps({
|
|
114
|
+
podcast: { default: undefined, type: Object as () => Podcast },
|
|
115
|
+
emission: { default: undefined, type: Object as () => Emission },
|
|
116
|
+
playlist: { default: undefined, type: Object as () => Playlist },
|
|
117
|
+
organisationId: { default: undefined, type: String },
|
|
118
|
+
exclusive: { default: false, type: Boolean },
|
|
119
|
+
notExclusive: { default: true, type: Boolean },
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
//Data
|
|
123
|
+
const typeCustomPlayer = ref("");
|
|
124
|
+
const iFrameModel = ref("default");
|
|
125
|
+
const isShareModal = ref(false);
|
|
126
|
+
const color = ref("#40a372");
|
|
127
|
+
const theme = ref("#000000");
|
|
128
|
+
const proceedReading = ref(true);
|
|
129
|
+
const episodeChoiceDisplay = ref("number");
|
|
130
|
+
const episodesNumber = ref(3);
|
|
131
|
+
const isVisible = ref(false);
|
|
132
|
+
const displayArticle = ref(true);
|
|
133
|
+
const displayTranscript = ref(true);
|
|
134
|
+
const displayWave = ref(false);
|
|
135
|
+
const playerAutoPlay = ref(false);
|
|
136
|
+
const insertCode = ref(false);
|
|
137
|
+
const orgaAttributes : Ref<{ [key: string]: string | number | boolean | undefined }| undefined>= ref(undefined);
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
//Composables
|
|
141
|
+
const { t } = useI18n();
|
|
142
|
+
const authStore = useAuthStore();
|
|
143
|
+
const apiStore = useApiStore();
|
|
144
|
+
const generalStore = useGeneralStore();
|
|
145
|
+
const saveFetchStore = useSaveFetchStore();
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
//Computed
|
|
149
|
+
const authenticated = computed(() => undefined !== authStore.authOrgaId);
|
|
150
|
+
const displayWaveParam = computed(() => "default" === iFrameModel.value || "emission" === iFrameModel.value);
|
|
151
|
+
const displayIsVisible = computed(() => displayChoiceAllEpisodes.value || isPodcastNotVisible.value);
|
|
152
|
+
const isPodcastNotVisible = computed(() => {
|
|
153
|
+
return (
|
|
154
|
+
undefined !== props.podcast &&
|
|
155
|
+
!props.podcast.availability.visibility &&
|
|
156
|
+
!isTypeEmission.value
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
const displayArticleParam = computed(() => {
|
|
160
|
+
return (
|
|
161
|
+
undefined !== props.podcast &&
|
|
162
|
+
undefined !== props.podcast.article &&
|
|
163
|
+
0 !== props.podcast.article.length &&
|
|
164
|
+
("default" === iFrameModel.value ||
|
|
165
|
+
"large" === iFrameModel.value ||
|
|
166
|
+
"largeMore" === iFrameModel.value)
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
const displayInsertCode = computed(() => {
|
|
170
|
+
let orgaResourceId = "";
|
|
171
|
+
if (props.podcast) {
|
|
172
|
+
orgaResourceId = props.podcast.organisation.id;
|
|
173
|
+
}
|
|
174
|
+
if (props.emission) {
|
|
175
|
+
orgaResourceId = props.emission.orga.id;
|
|
176
|
+
}
|
|
177
|
+
if (props.playlist) {
|
|
178
|
+
orgaResourceId = props.playlist.organisation?.id ?? "";
|
|
179
|
+
}
|
|
180
|
+
return orgaResourceId === authStore.authOrgaId;
|
|
181
|
+
});
|
|
182
|
+
const displayTranscriptParam = computed(() => isTranscriptionAuthorize.value && (isDefault.value || isEmission.value));
|
|
183
|
+
const isTranscriptionAuthorize = computed(() => {
|
|
184
|
+
if (!orgaAttributes.value) {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
return orgaAttributes.value &&
|
|
188
|
+
Object.hasOwn(orgaAttributes.value, "speechtotext.active")
|
|
189
|
+
? (orgaAttributes.value["speechtotext.active"] as boolean)
|
|
190
|
+
: false;
|
|
191
|
+
});
|
|
192
|
+
const displayChoiceAllEpisodes = computed(() => !props.podcast || isTypeEmission.value);
|
|
193
|
+
const isDefault = computed(() => "default" === iFrameModel.value);
|
|
194
|
+
const isEmission = computed(() => "emission" === iFrameModel.value);
|
|
195
|
+
const isLargeEmission = computed(() => "emissionLarge" === iFrameModel.value);
|
|
196
|
+
const isTypeEmission = computed(() => {
|
|
197
|
+
return (
|
|
198
|
+
isEmission.value ||
|
|
199
|
+
isLargeEmission.value ||
|
|
200
|
+
"EMISSION" === typeCustomPlayer.value
|
|
201
|
+
);
|
|
202
|
+
});
|
|
203
|
+
const isLiveReadyToRecord = computed(() => {
|
|
204
|
+
if (props.podcast)
|
|
205
|
+
return (
|
|
206
|
+
undefined !== props.podcast.conferenceId &&
|
|
207
|
+
0 !== props.podcast.conferenceId &&
|
|
208
|
+
props.podcast.processingStatus === "READY_TO_RECORD"
|
|
209
|
+
);
|
|
210
|
+
return false;
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
const noAd = computed(() => {
|
|
214
|
+
return (
|
|
215
|
+
(props.podcast?.organisation.id !== props.organisationId &&
|
|
216
|
+
"NO" === props.podcast?.monetisable) ||
|
|
217
|
+
("UNDEFINED" === props.podcast?.monetisable &&
|
|
218
|
+
"NO" === props.podcast?.emission.monetisable)
|
|
219
|
+
);
|
|
220
|
+
});
|
|
221
|
+
const iFrameSrc = computed(() => {
|
|
222
|
+
if ("video" === iFrameModel.value) {
|
|
223
|
+
return (
|
|
224
|
+
"https://www.ultimedia.com/deliver/generic/iframe/mdtk/01009833/zone/1/showtitle/1/src/" +
|
|
225
|
+
props.podcast?.video?.videoId +
|
|
226
|
+
"/sound/true"
|
|
227
|
+
);
|
|
228
|
+
}
|
|
229
|
+
let url = [""];
|
|
230
|
+
const iFrameNumber =
|
|
231
|
+
displayChoiceAllEpisodes.value && "all" === episodeChoiceDisplay.value
|
|
232
|
+
? "/0"
|
|
233
|
+
: "/" + episodesNumber.value;
|
|
234
|
+
url.push(`${apiStore.miniplayerUrl}miniplayer/`);
|
|
235
|
+
if (!props.podcast && !props.playlist && props.emission) {
|
|
236
|
+
url = constructEmissionUrl(url);
|
|
237
|
+
} else if (props.playlist) {
|
|
238
|
+
url = constructPlaylistUrl(url);
|
|
239
|
+
} else if (props.emission && props.podcast) {
|
|
240
|
+
url.push(`${iFrameModel.value}/`);
|
|
241
|
+
if (isTypeEmission.value) {
|
|
361
242
|
url.push(
|
|
362
|
-
|
|
243
|
+
`${props.emission.emissionId}${iFrameNumber}/${props.podcast.podcastId}`,
|
|
363
244
|
);
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
if (!this.orgaAttributes) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
this.color = Object.hasOwn(this.orgaAttributes, "COLOR")
|
|
392
|
-
? (this.orgaAttributes.COLOR as string)
|
|
393
|
-
: "#40a372";
|
|
394
|
-
this.theme = Object.hasOwn(this.orgaAttributes, "THEME")
|
|
395
|
-
? (this.orgaAttributes.THEME as string)
|
|
396
|
-
: "#000000";
|
|
397
|
-
},
|
|
398
|
-
},
|
|
245
|
+
} else {
|
|
246
|
+
url.push(`${props.podcast.podcastId}`);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return addUrlParameters(url).join("");
|
|
250
|
+
});
|
|
251
|
+
const iFrameHeight = computed(() => {
|
|
252
|
+
switch (iFrameModel.value) {
|
|
253
|
+
case "video":
|
|
254
|
+
return "281px";
|
|
255
|
+
case "large":
|
|
256
|
+
if (props.podcast) return "140px";
|
|
257
|
+
return "350px";
|
|
258
|
+
case "largeMore":
|
|
259
|
+
return "210px";
|
|
260
|
+
case "emissionLarge":
|
|
261
|
+
return "350px";
|
|
262
|
+
case "emission":
|
|
263
|
+
return "540px";
|
|
264
|
+
case "videoLive":
|
|
265
|
+
return "450px";
|
|
266
|
+
default:
|
|
267
|
+
return "540px";
|
|
268
|
+
}
|
|
399
269
|
});
|
|
270
|
+
const iFrame = computed(() => {
|
|
271
|
+
const specialDigiteka = props.podcast?.video?.videoId
|
|
272
|
+
? 'allowfullscreen="true" referrerpolicy="no-referrer-when-downgrade"'
|
|
273
|
+
: "";
|
|
274
|
+
return `<iframe src="${iFrameSrc.value}" width="100%" height="${iFrameHeight.value}" scrolling="no" ${specialDigiteka} allow="clipboard-read; clipboard-write; autoplay"></iframe>`;
|
|
275
|
+
});
|
|
276
|
+
const dataTitle = computed(() => {
|
|
277
|
+
if (props.podcast) return props.podcast.podcastId;
|
|
278
|
+
if (props.emission) return props.emission.emissionId;
|
|
279
|
+
if (props.playlist) return props.playlist.playlistId;
|
|
280
|
+
return 0;
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
onBeforeMount(()=>initSharePlayer())
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
//Methods
|
|
288
|
+
async function initSharePlayer() {
|
|
289
|
+
orgaAttributes.value = await saveFetchStore.getOrgaAttributes(authStore.authOrgaId ?? "");
|
|
290
|
+
initColor();
|
|
291
|
+
if (isLiveReadyToRecord.value) {
|
|
292
|
+
iFrameModel.value = "large";
|
|
293
|
+
}
|
|
294
|
+
if ("true" === props.podcast?.annotations?.["fromTTS"]) {
|
|
295
|
+
displayTranscript.value = false;
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
function getIframeNumber(): string {
|
|
299
|
+
return displayChoiceAllEpisodes.value && "all" === episodeChoiceDisplay.value
|
|
300
|
+
? "/0"
|
|
301
|
+
: "/" + episodesNumber.value;
|
|
302
|
+
}
|
|
303
|
+
function constructEmissionUrl(url: Array<string>) {
|
|
304
|
+
if (!props.emission) {
|
|
305
|
+
return [];
|
|
306
|
+
}
|
|
307
|
+
switch (iFrameModel.value) {
|
|
308
|
+
case "default":
|
|
309
|
+
url.push("emission");
|
|
310
|
+
break;
|
|
311
|
+
case "large":
|
|
312
|
+
url.push("emissionLarge");
|
|
313
|
+
break;
|
|
314
|
+
default:
|
|
315
|
+
url.push(`${iFrameModel.value}`);
|
|
316
|
+
break;
|
|
317
|
+
}
|
|
318
|
+
url.push(`/${props.emission.emissionId}${getIframeNumber()}`);
|
|
319
|
+
return url;
|
|
320
|
+
}
|
|
321
|
+
function constructPlaylistUrl(url: Array<string>) {
|
|
322
|
+
if (!props.playlist) {
|
|
323
|
+
return [];
|
|
324
|
+
}
|
|
325
|
+
switch (iFrameModel.value) {
|
|
326
|
+
case "default":
|
|
327
|
+
url.push("playlist");
|
|
328
|
+
break;
|
|
329
|
+
case "large":
|
|
330
|
+
url.push("playlistLarge");
|
|
331
|
+
break;
|
|
332
|
+
default:
|
|
333
|
+
url.push(`${iFrameModel.value}`);
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
url.push(`/${props.playlist.playlistId}`);
|
|
337
|
+
return url;
|
|
338
|
+
}
|
|
339
|
+
function addUrlParameters(url: Array<string>) {
|
|
340
|
+
url.push("?distributorId=" + props.organisationId);
|
|
341
|
+
url.push(
|
|
342
|
+
`&color=${color.value.substring(1)}&theme=${theme.value.substring(1)}`,
|
|
343
|
+
);
|
|
344
|
+
if (!proceedReading.value) {
|
|
345
|
+
url.push("&proceed=false");
|
|
346
|
+
}
|
|
347
|
+
if (!displayArticle.value && displayArticleParam.value) {
|
|
348
|
+
url.push("&article=false");
|
|
349
|
+
}
|
|
350
|
+
if (!displayTranscript.value) {
|
|
351
|
+
url.push("&transcript=false");
|
|
352
|
+
}
|
|
353
|
+
if (!displayWave.value) {
|
|
354
|
+
url.push("&wave=false");
|
|
355
|
+
}
|
|
356
|
+
if (playerAutoPlay.value) {
|
|
357
|
+
url.push("&autoplay=true");
|
|
358
|
+
}
|
|
359
|
+
if (isVisible.value) {
|
|
360
|
+
url.push("&key=" + window.btoa(dataTitle.value.toString()));
|
|
361
|
+
}
|
|
362
|
+
if (insertCode.value) {
|
|
363
|
+
url.push("&insertCode=true");
|
|
364
|
+
}
|
|
365
|
+
return url;
|
|
366
|
+
}
|
|
367
|
+
function initColor(): void {
|
|
368
|
+
if (!orgaAttributes.value) {
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
color.value = Object.hasOwn(orgaAttributes.value, "COLOR")
|
|
372
|
+
? (orgaAttributes.value.COLOR as string)
|
|
373
|
+
: "#40a372";
|
|
374
|
+
theme.value = Object.hasOwn(orgaAttributes.value, "THEME")
|
|
375
|
+
? (orgaAttributes.value.THEME as string)
|
|
376
|
+
: "#000000";
|
|
377
|
+
}
|
|
400
378
|
</script>
|
|
401
379
|
|
|
402
380
|
<style lang="scss">
|