@saooti/octopus-sdk 40.0.3 → 40.1.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.
Files changed (174) hide show
  1. package/index.ts +31 -31
  2. package/package.json +1 -1
  3. package/plateform.conf +1 -1
  4. package/src/App.vue +9 -3
  5. package/src/api/classicApi.ts +1 -1
  6. package/src/components/composable/player/usePlayerDisplayTime.ts +33 -0
  7. package/src/components/composable/player/usePlayerLive.ts +150 -0
  8. package/src/components/composable/player/usePlayerLogic.ts +265 -0
  9. package/src/components/composable/player/usePlayerLogicProgress.ts +135 -0
  10. package/src/components/composable/player/usePlayerStitching.ts +213 -0
  11. package/src/components/composable/player/usePlayerTranscript.ts +120 -0
  12. package/src/components/composable/player/usePlayerVast.ts +207 -0
  13. package/src/components/composable/podcasts/useCountdown.ts +53 -0
  14. package/src/components/composable/podcasts/usePodcastView.ts +85 -0
  15. package/src/components/composable/radio/usefetchRadioData.ts +75 -0
  16. package/src/components/composable/route/useAdvancedParamInit.ts +165 -0
  17. package/src/components/composable/route/useRouteUpdateParams.ts +48 -0
  18. package/src/components/composable/route/useRubriquesFilterComputed.ts +24 -0
  19. package/src/components/composable/route/useRubriquesFilterParam.ts +32 -0
  20. package/src/components/composable/route/useSeoTitleUrl.ts +30 -0
  21. package/src/components/composable/route/useSimplePageParam.ts +50 -0
  22. package/src/components/composable/useErrorHandler.ts +25 -0
  23. package/src/components/composable/useImageProxy.ts +28 -0
  24. package/src/components/composable/useInit.ts +38 -0
  25. package/src/components/composable/useMetaTitle.ts +19 -0
  26. package/src/components/composable/useMetaTitleWatch.ts +14 -0
  27. package/src/components/composable/useOrgaComputed.ts +23 -0
  28. package/src/components/composable/useOrganisationFilter.ts +65 -0
  29. package/src/components/composable/useResizePhone.ts +27 -0
  30. package/src/components/composable/useSelenium.ts +10 -0
  31. package/src/components/composable/useTagOf.ts +21 -0
  32. package/src/components/display/accessibility/AccessibilityModal.vue +136 -0
  33. package/src/components/display/aggregator/RssSection.vue +1 -4
  34. package/src/components/display/categories/CategoryChooser.vue +1 -1
  35. package/src/components/display/categories/CategoryFilter.vue +7 -3
  36. package/src/components/display/categories/CategoryList.vue +5 -2
  37. package/src/components/display/comments/CommentInput.vue +0 -3
  38. package/src/components/display/comments/CommentList.vue +6 -2
  39. package/src/components/display/comments/CommentPlayer.vue +5 -2
  40. package/src/components/display/comments/CommentSection.vue +0 -2
  41. package/src/components/display/comments/item/CommentBasicView.vue +4 -4
  42. package/src/components/display/comments/item/CommentItem.vue +0 -4
  43. package/src/components/display/comments/item/CommentMoreActions.vue +6 -2
  44. package/src/components/display/emission/EmissionInlineList.vue +6 -6
  45. package/src/components/display/emission/EmissionItem.vue +13 -6
  46. package/src/components/display/emission/EmissionList.vue +5 -2
  47. package/src/components/display/emission/EmissionPlayerItem.vue +8 -5
  48. package/src/components/display/emission/EmissionPresentationItem.vue +16 -7
  49. package/src/components/display/emission/EmissionPresentationList.vue +10 -7
  50. package/src/components/display/filter/AdvancedSearch.vue +9 -6
  51. package/src/components/display/filter/CategorySearchFilter.vue +0 -2
  52. package/src/components/display/filter/ProductorSearch.vue +8 -3
  53. package/src/components/display/filter/RubriqueFilter.vue +6 -2
  54. package/src/components/display/list/ListPaginate.vue +9 -6
  55. package/src/components/display/list/SwiperList.vue +6 -5
  56. package/src/components/display/live/CountDown.vue +7 -15
  57. package/src/components/display/live/CountdownOctopus.vue +10 -30
  58. package/src/components/display/live/LiveItem.vue +0 -2
  59. package/src/components/display/live/LiveList.vue +9 -4
  60. package/src/components/display/live/RadioCurrently.vue +9 -5
  61. package/src/components/display/live/RadioImage.vue +6 -4
  62. package/src/components/display/live/RadioItem.vue +1 -2
  63. package/src/components/display/live/RadioList.vue +5 -3
  64. package/src/components/display/live/RadioPlanning.vue +10 -7
  65. package/src/components/display/organisation/OrganisationChooser.vue +8 -4
  66. package/src/components/display/participant/ParticipantInlineList.vue +5 -5
  67. package/src/components/display/participant/ParticipantItem.vue +13 -5
  68. package/src/components/display/participant/ParticipantList.vue +6 -3
  69. package/src/components/display/playlist/PlaylistItem.vue +12 -5
  70. package/src/components/display/playlist/PlaylistList.vue +6 -3
  71. package/src/components/display/playlist/PodcastList.vue +8 -4
  72. package/src/components/display/podcastmaker/PodcastmakerHeader.vue +6 -3
  73. package/src/components/display/podcasts/DownloadPodcastButton.vue +2 -4
  74. package/src/components/display/podcasts/PodcastImage.vue +6 -3
  75. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +7 -4
  76. package/src/components/display/podcasts/PodcastItem.vue +1 -1
  77. package/src/components/display/podcasts/PodcastItemInfo.vue +6 -3
  78. package/src/components/display/podcasts/PodcastList.vue +6 -3
  79. package/src/components/display/podcasts/PodcastModuleBox.vue +22 -9
  80. package/src/components/display/podcasts/PodcastPlayBar.vue +1 -3
  81. package/src/components/display/podcasts/PodcastPlayButton.vue +1 -3
  82. package/src/components/display/podcasts/PodcastRawTranscript.vue +79 -10
  83. package/src/components/display/podcasts/PodcastRubriqueList.vue +4 -3
  84. package/src/components/display/podcasts/TagList.vue +5 -2
  85. package/src/components/display/podcasts/VideoModuleBox.vue +6 -3
  86. package/src/components/display/rubriques/RubriqueChooser.vue +0 -2
  87. package/src/components/display/rubriques/RubriqueList.vue +7 -5
  88. package/src/components/display/sharing/ShareButtons.vue +4 -2
  89. package/src/components/display/sharing/ShareDistribution.vue +4 -2
  90. package/src/components/form/ClassicEmojiPicker.vue +5 -3
  91. package/src/components/misc/ClassicLazy.vue +2 -2
  92. package/src/components/misc/FooterGarSection.vue +2 -3
  93. package/src/components/misc/FooterSection.vue +9 -5
  94. package/src/components/misc/MobileMenu.vue +5 -3
  95. package/src/components/misc/TopBar.vue +8 -6
  96. package/src/components/misc/TopBarMainContent.vue +8 -4
  97. package/src/components/misc/modal/ClassicModalInBody.vue +2 -3
  98. package/src/components/misc/modal/ClipboardModal.vue +4 -3
  99. package/src/components/misc/modal/NewsletterModal.vue +4 -3
  100. package/src/components/misc/modal/ShareModalPlayer.vue +4 -2
  101. package/src/components/misc/player/PlayerCompact.vue +30 -41
  102. package/src/components/misc/player/PlayerComponent.vue +69 -84
  103. package/src/components/misc/player/PlayerLarge.vue +43 -58
  104. package/src/components/misc/player/elements/PlayerImage.vue +6 -3
  105. package/src/components/misc/player/elements/PlayerTitle.vue +6 -2
  106. package/src/components/misc/player/radio/RadioHistory.vue +2 -4
  107. package/src/components/misc/player/video/PlayerVideoHls.vue +6 -7
  108. package/src/components/pages/EmissionPage.vue +19 -7
  109. package/src/components/pages/EmissionsPage.vue +31 -23
  110. package/src/components/pages/HomePage.vue +5 -2
  111. package/src/components/pages/PageLogout.vue +0 -2
  112. package/src/components/pages/PageNotFound.vue +11 -15
  113. package/src/components/pages/ParticipantPage.vue +18 -7
  114. package/src/components/pages/ParticipantsPage.vue +16 -21
  115. package/src/components/pages/PlaylistPage.vue +18 -7
  116. package/src/components/pages/PlaylistsPage.vue +20 -29
  117. package/src/components/pages/PodcastPage.vue +12 -6
  118. package/src/components/pages/PodcastsPage.vue +46 -48
  119. package/src/components/pages/RadioPage.vue +9 -6
  120. package/src/components/pages/RubriquePage.vue +41 -52
  121. package/src/components/pages/VideoPage.vue +152 -166
  122. package/src/helper/cookiesHelper.ts +20 -0
  123. package/src/helper/displayHelper.ts +15 -0
  124. package/src/helper/downloadHelper.ts +30 -0
  125. package/src/helper/{fetch.ts → fetchHelper.ts} +0 -1
  126. package/src/helper/loadScript.ts +22 -0
  127. package/src/helper/radio/radioHelper.ts +15 -0
  128. package/src/helper/{string.ts → stringHelper.ts} +5 -0
  129. package/src/locale/de.ts +4 -0
  130. package/src/locale/en.ts +4 -0
  131. package/src/locale/es.ts +4 -0
  132. package/src/locale/fr.ts +4 -0
  133. package/src/locale/it.ts +4 -0
  134. package/src/locale/sl.ts +4 -0
  135. package/src/stores/AuthStore.ts +1 -2
  136. package/src/stores/CommentStore.ts +8 -8
  137. package/src/stores/PlayerStore.ts +1 -1
  138. package/src/style/general.scss +15 -1
  139. package/src/components/mixins/cookies.ts +0 -22
  140. package/src/components/mixins/displayMethods.ts +0 -17
  141. package/src/components/mixins/download.ts +0 -33
  142. package/src/components/mixins/fetchParameters.ts +0 -16
  143. package/src/components/mixins/handle403.ts +0 -22
  144. package/src/components/mixins/imageProxy.ts +0 -28
  145. package/src/components/mixins/init.ts +0 -34
  146. package/src/components/mixins/loadScript.ts +0 -25
  147. package/src/components/mixins/metaTitle.ts +0 -15
  148. package/src/components/mixins/metaTitleWatch.ts +0 -26
  149. package/src/components/mixins/orgaComputed.ts +0 -23
  150. package/src/components/mixins/organisationFilter.ts +0 -56
  151. package/src/components/mixins/player/playerDisplayTime.ts +0 -35
  152. package/src/components/mixins/player/playerLive.ts +0 -144
  153. package/src/components/mixins/player/playerLogic.ts +0 -275
  154. package/src/components/mixins/player/playerLogicProgress.ts +0 -135
  155. package/src/components/mixins/player/playerStitching.ts +0 -202
  156. package/src/components/mixins/player/playerTranscript.ts +0 -113
  157. package/src/components/mixins/player/playerVast.ts +0 -198
  158. package/src/components/mixins/podcast/countdown.ts +0 -45
  159. package/src/components/mixins/podcast/podcastView.ts +0 -63
  160. package/src/components/mixins/radio/fetchRadioData.ts +0 -77
  161. package/src/components/mixins/resizePhone.ts +0 -26
  162. package/src/components/mixins/routeParam/advancedParamInit.ts +0 -202
  163. package/src/components/mixins/routeParam/paginateParamInit.ts +0 -43
  164. package/src/components/mixins/routeParam/routeParams.ts +0 -33
  165. package/src/components/mixins/routeParam/rubriquesFilterComputed.ts +0 -22
  166. package/src/components/mixins/routeParam/rubriquesFilterParam.ts +0 -29
  167. package/src/components/mixins/selenium.ts +0 -7
  168. package/src/components/mixins/seoTitleUrl.ts +0 -26
  169. package/src/components/mixins/tagOfMixins.ts +0 -19
  170. package/src/helper/uuidGenerator.ts +0 -7
  171. /package/src/{helper → components/composable}/useEventListener.ts +0 -0
  172. /package/src/{components/mixins/debounce.ts → helper/debounceHelper.ts} +0 -0
  173. /package/src/helper/{dom.ts → domHelper.ts} +0 -0
  174. /package/src/helper/{duration.ts → durationHelper.ts} +0 -0
@@ -16,63 +16,52 @@
16
16
  </section>
17
17
  </template>
18
18
 
19
- <script lang="ts">
20
- import { paginateParamInit } from "../mixins/routeParam/paginateParamInit";
21
- import { seoTitleUrl } from "../mixins/seoTitleUrl";
19
+ <script setup lang="ts">
20
+ import { useSimplePageParam } from "../composable/route/useSimplePageParam";
21
+ import {useSeoTitleUrl} from "../composable/route/useSeoTitleUrl";
22
22
  import classicApi from "../../api/classicApi";
23
23
  import PodcastList from "../display/podcasts/PodcastList.vue";
24
- import { defineAsyncComponent, defineComponent } from "vue";
24
+ import { computed, defineAsyncComponent, ref, watch } from "vue";
25
25
  import { Rubrique } from "@/stores/class/rubrique/rubrique";
26
- import { useGeneralStore } from "../../stores/GeneralStore";
27
- import { mapState } from "pinia";
28
26
  const ProductorSearch = defineAsyncComponent(
29
27
  () => import("../display/filter/ProductorSearch.vue"),
30
28
  );
31
- export default defineComponent({
32
- name: "RubriquePage",
33
- components: {
34
- PodcastList,
35
- ProductorSearch
36
- },
37
- mixins: [paginateParamInit, seoTitleUrl],
38
- props: {
39
- pr: { default: 0, type: Number },
40
- ps: { default: 30, type: Number },
41
- rubriqueId: { default: undefined, type: Number },
42
- routeOrga: { default: undefined, type: String },
43
- routeQuery: { default: "", type: String },
44
- },
45
- data() {
46
- return {
47
- title: "" as string,
48
- organisationId: undefined as string | undefined,
49
- searchPattern: "" as string,
50
- };
51
- },
52
- computed:{
53
- ...mapState(useGeneralStore, ["metaTitle"]),
54
- orgaArray(): Array<string> {
55
- return this.organisationId ? [this.organisationId] : [];
56
- },
57
- sortOrder(){
58
- if(this.searchMinSize.length){
59
- return "SCORE";
60
- }
61
- return undefined;
62
- }
63
- },
64
- watch: {
65
- rubriqueId: {
66
- immediate: true,
67
- async handler() {
68
- const data = await classicApi.fetchData<Rubrique>({
69
- api: 0,
70
- path: "rubrique/" + this.rubriqueId,
71
- });
72
- this.updatePathParams(data.name);
73
- this.title = data.name;
74
- },
75
- },
76
- },
29
+
30
+ const props = defineProps({
31
+ pr: { default: 0, type: Number },
32
+ ps: { default: 30, type: Number },
33
+ rubriqueId: { default: undefined, type: Number },
34
+ routeOrga: { default: undefined, type: String },
35
+ routeQuery: { default: "", type: String },
77
36
  });
37
+
38
+ const {
39
+ searchPattern,
40
+ organisationId,
41
+ searchMinSize,
42
+ paginateFirst,
43
+ } = useSimplePageParam(props);
44
+
45
+ const { updatePathParams } = useSeoTitleUrl();
46
+
47
+ const title = ref("");
48
+
49
+ const orgaArray = computed(() =>organisationId.value ? [organisationId.value] : []);
50
+ const sortOrder = computed(() =>{
51
+ if(searchMinSize.value.length){
52
+ return "SCORE";
53
+ }
54
+ return undefined;
55
+ });
56
+
57
+
58
+ watch(()=>props.rubriqueId, async () => {
59
+ const data = await classicApi.fetchData<Rubrique>({
60
+ api: 0,
61
+ path: "rubrique/" + props.rubriqueId,
62
+ });
63
+ updatePathParams(data.name);
64
+ title.value = data.name;
65
+ }, {immediate: true});
66
+
78
67
  </script>
@@ -90,22 +90,21 @@
90
90
  </section>
91
91
  </template>
92
92
 
93
- <script lang="ts">
93
+ <script setup lang="ts">
94
94
  import ChevronLeftIcon from "vue-material-design-icons/ChevronLeft.vue";
95
95
  import ClassicLoading from "../form/ClassicLoading.vue";
96
96
  import classicApi from "../../api/classicApi";
97
97
  import { Podcast } from "@/stores/class/general/podcast";
98
98
  import ClassicNav from "../misc/ClassicNav.vue";
99
- import { handle403 } from "../mixins/handle403";
100
- import { seoTitleUrl } from "../mixins/seoTitleUrl";
101
- import podcastView from "../mixins/podcast/podcastView";
102
- import { defineAsyncComponent, defineComponent } from "vue";
99
+ import {useErrorHandler} from "../composable/useErrorHandler";
100
+ import {useSeoTitleUrl} from "../composable/route/useSeoTitleUrl";
101
+ import {usePodcastView} from "../composable/podcasts/usePodcastView";
102
+ import { computed, defineAsyncComponent, onBeforeUnmount, Ref, ref, watch } from "vue";
103
103
  import { AxiosError } from "axios";
104
104
  import { useFilterStore } from "../../stores/FilterStore";
105
105
  import { useAuthStore } from "../../stores/AuthStore";
106
106
  import { useCommentStore } from "../../stores/CommentStore";
107
107
  import { useApiStore } from "../../stores/ApiStore";
108
- import { mapActions, mapState } from "pinia";
109
108
  import { CommentsConfig } from "@/stores/class/config/commentsConfig";
110
109
  import {
111
110
  Conference,
@@ -113,6 +112,8 @@ import {
113
112
  } from "@/stores/class/conference/conference";
114
113
  import { usePlayerStore } from "../../stores/PlayerStore";
115
114
  import { useGeneralStore } from "../../stores/GeneralStore";
115
+ import { useI18n } from "vue-i18n";
116
+ import { useRoute } from "vue-router";
116
117
  const PlayerVideoDigiteka = defineAsyncComponent(
117
118
  () => import("../misc/player/video/PlayerVideoDigiteka.vue"),
118
119
  );
@@ -128,173 +129,158 @@ const VideoModuleBox = defineAsyncComponent(
128
129
  const CountdownOctopus = defineAsyncComponent(
129
130
  () => import("../display/live/CountdownOctopus.vue"),
130
131
  );
131
- export default defineComponent({
132
- name: "VideoPage",
133
- components: {
134
- ClassicLoading,
135
- PlayerVideoDigiteka,
136
- ClassicNav,
137
- CommentSection,
138
- VideoModuleBox,
139
- PlayerVideoHls,
140
- CountdownOctopus,
141
- ChevronLeftIcon,
142
- },
143
132
 
144
- mixins: [handle403, podcastView, seoTitleUrl],
133
+ const props = defineProps({
134
+ podcastId:{ default: 0, type: Number },
135
+ })
145
136
 
146
- props: {
147
- podcastId: { default: 0, type: Number },
148
- },
137
+ const loaded = ref(false);
138
+ const podcast: Ref<Podcast | undefined> = ref(undefined);
139
+ const error = ref(false);
140
+ const activeTab = ref(0);
141
+ const configPodcast: Ref<CommentsConfig | undefined> = ref(undefined);
142
+ const podcastConference: Ref<Conference | undefined> = ref(undefined);
143
+ const intervalStatusConference: Ref<ReturnType<typeof setTimeout> | undefined> = ref(undefined);
149
144
 
150
- data() {
151
- return {
152
- loaded: false as boolean,
153
- podcast: undefined as Podcast | undefined,
154
- error: false as boolean,
155
- activeTab: 0 as number,
156
- configPodcast: undefined as CommentsConfig | undefined,
157
- podcastConference: undefined as Conference | undefined,
158
- intervalStatusConference: undefined as
159
- | ReturnType<typeof setTimeout>
160
- | undefined,
161
- };
162
- },
163
- computed: {
164
- ...mapState(useGeneralStore, ["metaTitle"]),
165
- ...mapState(useFilterStore, ["filterOrgaId"]),
166
- ...mapState(useAuthStore, ["authOrgaId"]),
167
- ...mapState(useApiStore, ["hlsUrl"]),
168
- videoId(): string | undefined {
169
- return this.podcast?.video?.videoId;
170
- },
171
- tabs(): Array<string> {
172
- if (this.canPostComment) {
173
- return [this.$t("Information"), this.$t("Comments")];
174
- }
175
- return [];
176
- },
177
- canPostComment(): boolean {
178
- return this.getCanPostComment(
179
- this.configPodcast,
180
- this.podcast,
181
- undefined !== this.authOrgaId,
182
- );
183
- },
184
- recordingLive(): boolean {
185
- return (
186
- undefined !== this.podcastConference &&
187
- -1 !== this.podcastConference.conferenceId &&
188
- ("RECORDING" === this.podcastConference.status ||
189
- "PENDING" === this.podcastConference.status)
145
+ const {
146
+ isLiveReadyToRecord,
147
+ isCounter,
148
+ timeRemaining,
149
+ date,
150
+ duration,
151
+ durationIso,
152
+ editRight
153
+ } = usePodcastView(podcast, podcastConference);
154
+
155
+ const { updatePathParams } = useSeoTitleUrl();
156
+ const {handle403} = useErrorHandler();
157
+
158
+ const authStore = useAuthStore();
159
+ const apiStore = useApiStore();
160
+ const generalStore = useGeneralStore();
161
+ const playerStore = usePlayerStore();
162
+ const filterStore = useFilterStore();
163
+ const commentStore = useCommentStore();
164
+
165
+ const {t} = useI18n();
166
+ const route = useRoute();
167
+
168
+ const videoId = computed(() => podcast.value?.video?.videoId);
169
+ const canPostComment = computed(() => {
170
+ return commentStore.getCanPostComment(
171
+ configPodcast.value,
172
+ podcast.value,
173
+ undefined !== authStore.authOrgaId,
174
+ );
175
+ });
176
+ const tabs = computed(() => {
177
+ if (canPostComment.value) {
178
+ return [t("Information"), t("Comments")];
179
+ }
180
+ return [];
181
+ });
182
+ const recordingLive = computed(() => {
183
+ return (
184
+ undefined !== podcastConference.value &&
185
+ -1 !== podcastConference.value.conferenceId &&
186
+ ("RECORDING" === podcastConference.value.status ||
187
+ "PENDING" === podcastConference.value.status)
190
188
  );
191
- },
192
- hlsVideoUrl(): string {
193
- if (!this.recordingLive || !this.podcastConference) {
194
- return "";
195
- }
196
- return `${this.hlsUrl}live/video_dev.${this.podcastConference.conferenceId}/index.m3u8`;
197
- },
198
- overrideText(): string | undefined {
199
- if ("PUBLISHING" !== this.podcastConference?.status) {
200
- return;
201
- }
202
- return this.$t("In the process of being published");
203
- },
204
- },
205
- watch: {
206
- podcastId: {
207
- immediate: true,
208
- async handler() {
209
- await this.getPodcastDetails();
210
- if (!this.podcast) {
211
- return;
212
- }
213
- this.initCommentUser();
214
- this.configPodcast = await this.getCommentsConfig(this.podcast);
215
- },
216
- },
217
- },
218
- unmounted() {
219
- clearInterval(this.intervalStatusConference as unknown as number);
220
- },
189
+ });
190
+ const hlsVideoUrl = computed(() => {
191
+ if (!recordingLive.value || !podcastConference.value) {
192
+ return "";
193
+ }
194
+ return `${apiStore.hlsUrl}live/video_dev.${podcastConference.value.conferenceId}/index.m3u8`;
195
+ });
196
+ const overrideText = computed(() => {
197
+ if ("PUBLISHING" !== podcastConference.value?.status) {
198
+ return;
199
+ }
200
+ return t("In the process of being published");
201
+ });
221
202
 
222
- methods: {
223
- ...mapActions(usePlayerStore, ["playerPlay"]),
224
- ...mapActions(useCommentStore, [
225
- "getCommentsConfig",
226
- "getCanPostComment",
227
- "initCommentUser",
228
- ]),
229
- async getPodcastDetails(): Promise<void> {
230
- this.loaded = false;
231
- this.error = false;
232
- try {
233
- this.podcast = await classicApi.fetchData<Podcast>({
234
- api: 0,
235
- path: "podcast/" + this.podcastId,
236
- });
237
- document.title = this.podcast.title + " - "+this.metaTitle;
238
- const orga = this.podcast.organisation;
239
- const privateAccess =
240
- "PUBLIC" !== orga.privacy &&
241
- this.filterOrgaId !== orga.id &&
242
- this.$route.query.productor !== orga.id;
243
- const notValid =
244
- (!this.podcast.availability.visibility ||
245
- !["READY_TO_RECORD", "READY", "PROCESSING"].includes(
246
- this.podcast.processingStatus ?? "",
247
- ) ||
248
- !this.podcast.valid) &&
249
- !this.editRight;
250
- if (privateAccess || notValid) {
251
- this.error = true;
252
- } else {
253
- this.updatePathParams(this.podcast.title);
254
- if (
255
- this.podcast.conferenceId &&
256
- "READY" !== this.podcast.processingStatus
257
- ) {
258
- await this.fetchConferenceStatus();
259
- this.intervalStatusConference = setInterval(() => {
260
- this.fetchConferenceStatus();
261
- }, 3000);
262
- this.playerPlay(
263
- {
264
- ...this.podcast,
265
- ...{ conferenceId: this.podcast.conferenceId },
266
- },
267
- true,
268
- );
269
- }
270
- }
271
- } catch (error) {
272
- this.handle403(error as AxiosError);
273
- this.error = true;
274
- }
275
- this.loaded = true;
276
- },
277
- async fetchConferenceStatus() {
278
- if (!this.podcast?.conferenceId) {
279
- return;
280
- }
281
- const data = await classicApi.fetchData<ConferencePublicInfo>({
282
- api: 9,
283
- path: "conference/info/" + this.podcast.conferenceId,
284
- });
285
- this.podcastConference = {
286
- ...data,
287
- ...{
288
- conferenceId: this.podcast.conferenceId,
289
- title: "",
290
- },
291
- };
292
- if ("DEBRIEFING" === data.status) {
293
- clearInterval(this.intervalStatusConference as unknown as number);
203
+
204
+ watch(()=>props.podcastId, async () => {
205
+ await getPodcastDetails();
206
+ if (!podcast.value) {
207
+ return;
208
+ }
209
+ commentStore.initCommentUser();
210
+ configPodcast.value = await commentStore.getCommentsConfig(podcast.value);
211
+ }, {immediate: true});
212
+
213
+
214
+ onBeforeUnmount(() => {
215
+ clearInterval(intervalStatusConference.value as unknown as number);
216
+ })
217
+
218
+ async function getPodcastDetails(): Promise<void> {
219
+ loaded.value = false;
220
+ error.value = false;
221
+ try {
222
+ podcast.value = await classicApi.fetchData<Podcast>({
223
+ api: 0,
224
+ path: "podcast/" + props.podcastId,
225
+ });
226
+ document.title = podcast.value.title + " - "+generalStore.metaTitle;
227
+ const orga = podcast.value.organisation;
228
+ const privateAccess =
229
+ "PUBLIC" !== orga.privacy &&
230
+ filterStore.filterOrgaId !== orga.id &&
231
+ route.query.productor !== orga.id;
232
+ const notValid =
233
+ (!podcast.value.availability.visibility ||
234
+ !["READY_TO_RECORD", "READY", "PROCESSING"].includes(
235
+ podcast.value.processingStatus ?? "",
236
+ ) ||
237
+ !podcast.value.valid) &&
238
+ !editRight.value;
239
+ if (privateAccess || notValid) {
240
+ error.value = true;
241
+ } else {
242
+ updatePathParams(podcast.value.title);
243
+ if (
244
+ podcast.value.conferenceId &&
245
+ "READY" !== podcast.value.processingStatus
246
+ ) {
247
+ await fetchConferenceStatus();
248
+ intervalStatusConference.value = setInterval(() => { fetchConferenceStatus(); }, 3000);
249
+ playerStore.playerPlay(
250
+ {
251
+ ...podcast.value,
252
+ ...{ conferenceId: podcast.value.conferenceId },
253
+ },
254
+ true,
255
+ );
294
256
  }
257
+ }
258
+ } catch (errorCatched) {
259
+ this.handle403(errorCatched as AxiosError);
260
+ error.value = true;
261
+ }
262
+ loaded.value = true;
263
+ }
264
+
265
+ async function fetchConferenceStatus() {
266
+ if (!podcast.value?.conferenceId) {
267
+ return;
268
+ }
269
+ const data = await classicApi.fetchData<ConferencePublicInfo>({
270
+ api: 9,
271
+ path: "conference/info/" + podcast.value.conferenceId,
272
+ });
273
+ podcastConference.value = {
274
+ ...data,
275
+ ...{
276
+ conferenceId: podcast.value.conferenceId,
277
+ title: "",
295
278
  },
296
- },
297
- });
279
+ };
280
+ if ("DEBRIEFING" === data.status) {
281
+ clearInterval(intervalStatusConference.value as unknown as number);
282
+ }
283
+ }
298
284
  </script>
299
285
  <style lang="scss">
300
286
 
@@ -0,0 +1,20 @@
1
+ export default{
2
+ setCookie(name: string, value: string, domain = "") {
3
+ const date = new Date();
4
+ date.setTime(date.getTime() + 24 * 60 * 60 * 1000);
5
+ const expires = "; expires=" + date.toUTCString();
6
+ document.cookie =
7
+ name + "=" + (value || "") + expires + domain + "; path=/";
8
+ },
9
+ getCookie(name: string): string | null {
10
+ const nameEQ = name + "=";
11
+ const ca = document.cookie.split(";");
12
+ for (const cookieValue of ca) {
13
+ let c = cookieValue;
14
+ while (c.startsWith(" ")) c = c.substring(1, c.length);
15
+ if (0 === c.indexOf(nameEQ))
16
+ return c.substring(nameEQ.length, c.length);
17
+ }
18
+ return null;
19
+ }
20
+ };
@@ -0,0 +1,15 @@
1
+ export default {
2
+ urlify(text: string|undefined): string {
3
+ const urlRegex = /[^">](https?:\/\/[^\s<]+)/g;
4
+ if (!text) return "";
5
+ return text.replace(urlRegex, (url: string) => {
6
+ return (
7
+ '<a href="' + url + '" target="_blank" rel="noreferrer noopener" :title="$t(\'New window\', {text: '+url+'})">' + url + "</a>"
8
+ );
9
+ });
10
+ },
11
+ async onCopyCode(link: string, callback: () => void): Promise<void> {
12
+ await navigator.clipboard.writeText(link);
13
+ return callback();
14
+ },
15
+ };
@@ -0,0 +1,30 @@
1
+ import fetchHelper from "./fetchHelper";
2
+ export default {
3
+ async onDownload(
4
+ urlToDownload: string,
5
+ nameOfDownload: string,
6
+ auth = true,
7
+ ): Promise<void> {
8
+ const xhr = new XMLHttpRequest();
9
+ xhr.open("GET", urlToDownload, true);
10
+ if (auth) {
11
+ const header = await fetchHelper.createAuthenticatedFetchHeader();
12
+ if (header) {
13
+ xhr.setRequestHeader("Authorization", header.Authorization);
14
+ }
15
+ }
16
+ xhr.responseType = "blob";
17
+ xhr.onload = function () {
18
+ const urlCreator = window.URL || window.webkitURL;
19
+ const imageUrl = urlCreator.createObjectURL(this.response);
20
+ const tag = document.createElement("a");
21
+ tag.href = imageUrl;
22
+ tag.target = "_blank";
23
+ tag.download = nameOfDownload.replace(/ /g, "_");
24
+ document.body.appendChild(tag);
25
+ tag.click();
26
+ document.body.removeChild(tag);
27
+ };
28
+ xhr.send();
29
+ },
30
+ };
@@ -108,7 +108,6 @@ export default {
108
108
  timing
109
109
  );
110
110
  },
111
-
112
111
  getUriSearchParams(parameters: FetchParam): URLSearchParams {
113
112
  const _return = new URLSearchParams();
114
113
  for (const [key, value] of Object.entries(parameters)) {
@@ -0,0 +1,22 @@
1
+ function loadScript(src: string, async:boolean, callback: any) {
2
+ const firstElement = document.getElementsByTagName('head')[0] || document.documentElement,
3
+ scriptElement = document.createElement('script');
4
+ scriptElement.type = 'text/javascript';
5
+ scriptElement.src = src;
6
+ scriptElement.async = async;
7
+ scriptElement.addEventListener('load', function() {
8
+ if(callback && typeof callback === 'function') {
9
+ callback(true, window);
10
+ }
11
+ }, false);
12
+ scriptElement.addEventListener('error', function(error) {
13
+ firstElement.removeChild(scriptElement);
14
+ if(callback && typeof callback === 'function') {
15
+ callback(false, error);
16
+ }
17
+ }, false);
18
+ firstElement.insertBefore(scriptElement, firstElement.firstChild);
19
+ }
20
+ export {
21
+ loadScript
22
+ }
@@ -0,0 +1,15 @@
1
+ import { MediaRadio } from "@/stores/class/general/player";
2
+
3
+ export default {
4
+ displayTitle(metadata: MediaRadio): string {
5
+ let title = "";
6
+ if (metadata.title) {
7
+ title += metadata.title;
8
+ }
9
+ if (metadata.artist) {
10
+ title += " - " + metadata.artist;
11
+ }
12
+ return title;
13
+ }
14
+ };
15
+
@@ -10,4 +10,9 @@ export default {
10
10
 
11
11
  return string;
12
12
  },
13
+ uuidv4() {
14
+ return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c =>
15
+ (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
16
+ );
17
+ },
13
18
  };
package/src/locale/de.ts CHANGED
@@ -407,4 +407,8 @@ export default {
407
407
  Rubrics: "Rubriken",
408
408
  "New window":"{text} - Neues Fenster",
409
409
  "Mandatory input":"Pflichteingabe",
410
+ "Transcript Accessibility":"Barrierefreiheit von Transkripten",
411
+ "Font size":"Schriftgröße",
412
+ "Preview":"Vorschau",
413
+ "Save":"Speichern",
410
414
  }
package/src/locale/en.ts CHANGED
@@ -410,4 +410,8 @@ export default {
410
410
  Rubrics: "Rubrics",
411
411
  "New window":"{text} - New window",
412
412
  "Mandatory input":"Mandatory input",
413
+ "Transcript Accessibility":"Transcript Accessibility",
414
+ "Font size":"Font size",
415
+ "Preview":"Preview",
416
+ "Save":"Save",
413
417
  };
package/src/locale/es.ts CHANGED
@@ -408,4 +408,8 @@ export default {
408
408
  Rubrics: "Secciones",
409
409
  "New window":"{text} - Nueva ventana",
410
410
  "Mandatory input":"Entrada obligatoria",
411
+ "Transcript Accessibility":"Accesibilidad de transcripción",
412
+ "Font size":"Tamaño de fuente",
413
+ "Preview":"Avance",
414
+ "Save":"Ahorrar",
411
415
  }
package/src/locale/fr.ts CHANGED
@@ -417,4 +417,8 @@ export default {
417
417
  Rubrics: "Rubriques",
418
418
  "New window":"{text} - Nouvelle fenêtre",
419
419
  "Mandatory input":"Saisie obligatoire",
420
+ "Transcript Accessibility":"Accessibilité de la transcription",
421
+ "Font size":"Taille de la police",
422
+ "Preview":"Aperçu",
423
+ "Save":"Sauvegarder",
420
424
  };
package/src/locale/it.ts CHANGED
@@ -404,4 +404,8 @@ export default{
404
404
  Rubrics: "Rubriche",
405
405
  "New window":"{text} - Nuova finestra",
406
406
  "Mandatory input":"Ingresso obbligatorio",
407
+ "Transcript Accessibility":"Accessibilità della trascrizione",
408
+ "Font size":"Dimensione del carattere",
409
+ "Preview":"Anteprima",
410
+ "Save":"Salva",
407
411
  };
package/src/locale/sl.ts CHANGED
@@ -399,4 +399,8 @@ export default {
399
399
  Rubrics: "Rubrike",
400
400
  "New window":"{text} - Novo okno",
401
401
  "Mandatory input":"Obvezen vnos",
402
+ "Transcript Accessibility":"Dostopnost prepisa",
403
+ "Font size":"Velikost pisave",
404
+ "Preview":"Predogled",
405
+ "Save":"Shrani",
402
406
  }
@@ -183,8 +183,7 @@ export const useAuthStore = defineStore("AuthStore", {
183
183
  api: 0,
184
184
  path:"user/me/organisations",
185
185
  });
186
- const array = availablesOrganisations ?? [];
187
- array.sort(function (a: Organisation, b: Organisation) {
186
+ const array = (availablesOrganisations ?? []).toSorted(function (a: Organisation, b: Organisation) {
188
187
  if (a.name.toLowerCase() < b.name.toLowerCase()) {
189
188
  return -1;
190
189
  }