@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,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="playerRadioHistory.length" class="d-flex align-items-center mt-3">
|
|
3
3
|
<div class="fw-bold me-3">
|
|
4
|
-
{{
|
|
4
|
+
{{ t("Previously") + ":" }}
|
|
5
5
|
</div>
|
|
6
6
|
<button
|
|
7
7
|
v-if="indexStart !== 0"
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
<div ref="historyListContainer" class="history-list-container">
|
|
14
14
|
<div
|
|
15
15
|
v-for="(pastItem, index) in playerRadioHistory"
|
|
16
|
+
:id="'history' + index"
|
|
16
17
|
:key="pastItem.title"
|
|
17
|
-
:ref="'history' + index"
|
|
18
18
|
class="d-flex flex-shrink-0"
|
|
19
19
|
>
|
|
20
20
|
<div class="d-flex flex-shrink-0 align-items-end">
|
|
@@ -35,111 +35,92 @@
|
|
|
35
35
|
</div>
|
|
36
36
|
</template>
|
|
37
37
|
|
|
38
|
-
<script lang="ts">
|
|
38
|
+
<script setup lang="ts">
|
|
39
39
|
import ChevronLeftIcon from "vue-material-design-icons/ChevronLeft.vue";
|
|
40
40
|
import ChevronRightIcon from "vue-material-design-icons/ChevronRight.vue";
|
|
41
41
|
import { usePlayerStore } from "../../../../stores/PlayerStore";
|
|
42
|
-
import { mapState } from "pinia";
|
|
43
42
|
import dayjs from "dayjs";
|
|
44
43
|
import radioHelper from "../../../../helper/radio/radioHelper";
|
|
45
|
-
import {
|
|
44
|
+
import { computed, nextTick, onMounted, onUnmounted, ref, useTemplateRef, watch } from "vue";
|
|
46
45
|
import { MediaRadio } from "@/stores/class/general/player";
|
|
47
|
-
|
|
48
|
-
name: "RadioHistory",
|
|
46
|
+
import { useI18n } from "vue-i18n";
|
|
49
47
|
|
|
50
|
-
components: {
|
|
51
|
-
ChevronLeftIcon,
|
|
52
|
-
ChevronRightIcon,
|
|
53
|
-
},
|
|
54
|
-
emits: ["updateNotListenTime"],
|
|
55
|
-
data() {
|
|
56
|
-
return {
|
|
57
|
-
indexStart: 0 as number,
|
|
58
|
-
indexNotDisplay: 100 as number,
|
|
59
|
-
};
|
|
60
|
-
},
|
|
61
48
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
return item.title;
|
|
138
|
-
}
|
|
139
|
-
return radioHelper.displayTitle(item);
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
});
|
|
49
|
+
//Data
|
|
50
|
+
const indexStart = ref(0);
|
|
51
|
+
const indexNotDisplay = ref(100);
|
|
52
|
+
const historyListContainerRef = useTemplateRef('historyListContainer');
|
|
53
|
+
|
|
54
|
+
//Composables
|
|
55
|
+
const { t } = useI18n();
|
|
56
|
+
const playerStore = usePlayerStore();
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
//Computed
|
|
60
|
+
const playerRadioHistory = computed(() => playerStore.playerRadio?.history ?? []);
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
//Watch
|
|
64
|
+
watch(playerRadioHistory, () => {
|
|
65
|
+
nextTick(() => {
|
|
66
|
+
handleResize(0);
|
|
67
|
+
});
|
|
68
|
+
}, {deep: true,immediate: true});
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
onMounted(()=>window.addEventListener("resize", () => {handleResize(0);}))
|
|
72
|
+
onUnmounted(()=>window.removeEventListener("resize", () => {handleResize(0);}))
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
//Methods
|
|
76
|
+
function displayEverythingAfterIndex(indexAsked: number) {
|
|
77
|
+
for (let index = 0; index < playerRadioHistory.value.length; index++) {
|
|
78
|
+
const el = historyListContainerRef?.value?.querySelector('#history' + index);
|
|
79
|
+
if (!el) continue;
|
|
80
|
+
if (index < indexAsked && !el.classList.contains("hid")) {
|
|
81
|
+
el.classList.add("hid");
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
if (index >= indexAsked && el.classList.contains("hid")) {
|
|
85
|
+
el.classList.remove("hid");
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function handleResize(indexAsked: number): void {
|
|
90
|
+
const historyList = historyListContainerRef?.value as HTMLElement;
|
|
91
|
+
if (null === historyList || !historyList) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
indexStart.value = indexAsked;
|
|
95
|
+
indexNotDisplay.value = playerRadioHistory.value.length;
|
|
96
|
+
displayEverythingAfterIndex(indexAsked);
|
|
97
|
+
for (
|
|
98
|
+
let index = indexStart.value + 1;
|
|
99
|
+
index < playerRadioHistory.value.length;
|
|
100
|
+
index++
|
|
101
|
+
) {
|
|
102
|
+
const el = historyListContainerRef?.value?.querySelector('#history' + index);
|
|
103
|
+
if (!el) continue;
|
|
104
|
+
if (index > indexNotDisplay.value && !el.classList.contains("hid")) {
|
|
105
|
+
el.classList.add("hid");
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const parent = el.parentElement;
|
|
109
|
+
if (parent && el.offsetLeft + el.clientWidth > parent.clientWidth) {
|
|
110
|
+
indexNotDisplay.value = index;
|
|
111
|
+
el.classList.add("hid");
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function displayTimeItem(item: MediaRadio): string {
|
|
116
|
+
return dayjs(item.startDate).format("HH:mm");
|
|
117
|
+
}
|
|
118
|
+
function displayPreviousItem(item: MediaRadio): string {
|
|
119
|
+
if (item.podcastId) {
|
|
120
|
+
return item.title;
|
|
121
|
+
}
|
|
122
|
+
return radioHelper.displayTitle(item);
|
|
123
|
+
}
|
|
143
124
|
</script>
|
|
144
125
|
<style lang="scss">
|
|
145
126
|
.octopus-app {
|
|
@@ -4,67 +4,56 @@
|
|
|
4
4
|
min="0"
|
|
5
5
|
max="100"
|
|
6
6
|
:value="percentProgress"
|
|
7
|
-
:aria-label="
|
|
7
|
+
:aria-label="t('Radio')"
|
|
8
8
|
:class="isAmbiance ? 'ambiance-progress' : ''"
|
|
9
9
|
/>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script lang="ts">
|
|
12
|
+
<script setup lang="ts">
|
|
13
13
|
import { usePlayerStore } from "../../../../stores/PlayerStore";
|
|
14
|
-
import { mapState, mapActions } from "pinia";
|
|
15
14
|
import dayjs from "dayjs";
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
name: "RadioProgressBar",
|
|
15
|
+
import { useI18n } from "vue-i18n";
|
|
16
|
+
import { computed, onMounted, onUnmounted, ref, Ref } from "vue";
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
data() {
|
|
23
|
-
return {
|
|
24
|
-
percentInterval: undefined as ReturnType<typeof setTimeout> | undefined,
|
|
25
|
-
};
|
|
26
|
-
},
|
|
18
|
+
//Data
|
|
19
|
+
const percentInterval: Ref<ReturnType<typeof setTimeout> | undefined> = ref(undefined);
|
|
27
20
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
mounted() {
|
|
41
|
-
this.handlePercentInterval();
|
|
42
|
-
},
|
|
43
|
-
unmounted() {
|
|
44
|
-
clearInterval(this.percentInterval as unknown as number);
|
|
45
|
-
},
|
|
46
|
-
methods: {
|
|
47
|
-
...mapActions(usePlayerStore, ["playerUpdateElapsed"]),
|
|
48
|
-
handlePercentInterval(): void {
|
|
49
|
-
this.percentInterval = setInterval(() => {
|
|
50
|
-
this.calculatePercent();
|
|
51
|
-
}, 1000);
|
|
52
|
-
},
|
|
53
|
-
calculatePercent(): void {
|
|
54
|
-
if (!this.playerRadio?.metadata) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
const actualMilliSecondsPlayed = dayjs()
|
|
58
|
-
.subtract(18, "second")
|
|
59
|
-
.diff(dayjs(this.playerRadio.metadata.startDate));
|
|
60
|
-
const percentPlayed =
|
|
61
|
-
actualMilliSecondsPlayed /
|
|
62
|
-
(this.playerRadio?.metadata.playDuration * 1000);
|
|
63
|
-
this.playerUpdateElapsed(
|
|
64
|
-
percentPlayed,
|
|
65
|
-
this.playerRadio?.metadata.playDuration,
|
|
66
|
-
);
|
|
67
|
-
},
|
|
68
|
-
},
|
|
21
|
+
//Composables
|
|
22
|
+
const { t } = useI18n();
|
|
23
|
+
const playerStore = usePlayerStore();
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
//Computed
|
|
27
|
+
const isAmbiance = computed(() => !playerStore.playerRadio?.podcast?.podcastId);
|
|
28
|
+
const percentProgress = computed(() => {
|
|
29
|
+
if (!playerStore.playerElapsed) {
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
return playerStore.playerElapsed * 100;
|
|
69
33
|
});
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
onMounted(()=>handlePercentInterval())
|
|
37
|
+
onUnmounted(()=>clearInterval(percentInterval.value as unknown as number))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
//Methods
|
|
41
|
+
function handlePercentInterval(): void {
|
|
42
|
+
percentInterval.value = setInterval(() => {calculatePercent();}, 1000);
|
|
43
|
+
}
|
|
44
|
+
function calculatePercent(): void {
|
|
45
|
+
if (!playerStore.playerRadio?.metadata) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const actualMilliSecondsPlayed = dayjs()
|
|
49
|
+
.subtract(18, "second")
|
|
50
|
+
.diff(dayjs(playerStore.playerRadio.metadata.startDate));
|
|
51
|
+
const percentPlayed =
|
|
52
|
+
actualMilliSecondsPlayed /
|
|
53
|
+
(playerStore.playerRadio?.metadata.playDuration * 1000);
|
|
54
|
+
playerStore.playerUpdateElapsed(
|
|
55
|
+
percentPlayed,
|
|
56
|
+
playerStore.playerRadio?.metadata.playDuration,
|
|
57
|
+
);
|
|
58
|
+
}
|
|
70
59
|
</script>
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<teleport to=".octopus-app">
|
|
3
|
-
<template v-if="playerVideo">
|
|
3
|
+
<template v-if="playerStore.playerVideo">
|
|
4
4
|
<button class="btn btn-transparent video-close" @click="closePlayer">
|
|
5
5
|
<WindowCloseIcon />
|
|
6
6
|
</button>
|
|
7
7
|
<div class="video-wrapper">
|
|
8
8
|
<PlayerYoutubeEmbed v-if="youtubeId" :youtube-id="youtubeId" />
|
|
9
|
-
<PlayerVideoDigiteka v-else-if="!playerLive" :video-id="playerPodcast?.video?.videoId" />
|
|
9
|
+
<PlayerVideoDigiteka v-else-if="!playerStore.playerLive" :video-id="playerStore.playerPodcast?.video?.videoId" />
|
|
10
10
|
<PlayerVideoHls v-else :hls-url="hlsVideoUrl" :is-secured="isSecured"/>
|
|
11
11
|
</div>
|
|
12
12
|
</template>
|
|
13
13
|
</teleport>
|
|
14
14
|
</template>
|
|
15
|
-
<script lang="ts">
|
|
15
|
+
<script setup lang="ts">
|
|
16
16
|
import youtubeVideoHelper from "../../../../helper/youtubeVideoHelper";
|
|
17
17
|
import WindowCloseIcon from "vue-material-design-icons/WindowClose.vue";
|
|
18
18
|
import { usePlayerStore } from "../../../../stores/PlayerStore";
|
|
19
19
|
import { useApiStore } from "../../../../stores/ApiStore";
|
|
20
|
-
import {
|
|
21
|
-
import { defineComponent, defineAsyncComponent } from "vue";
|
|
20
|
+
import { defineAsyncComponent, ref, Ref, computed, onMounted } from "vue";
|
|
22
21
|
const PlayerVideoDigiteka = defineAsyncComponent(
|
|
23
22
|
() => import("../video/PlayerVideoDigiteka.vue"),
|
|
24
23
|
);
|
|
@@ -28,44 +27,32 @@ const PlayerVideoHls = defineAsyncComponent(
|
|
|
28
27
|
const PlayerYoutubeEmbed = defineAsyncComponent(
|
|
29
28
|
() => import("../video/PlayerYoutubeEmbed.vue"),
|
|
30
29
|
);
|
|
31
|
-
export default defineComponent({
|
|
32
|
-
name: "PlayerVideo",
|
|
33
30
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
PlayerVideoHls,
|
|
37
|
-
PlayerYoutubeEmbed,
|
|
38
|
-
WindowCloseIcon,
|
|
39
|
-
},
|
|
40
|
-
data() {
|
|
41
|
-
return {
|
|
42
|
-
youtubeId: undefined as string|undefined,
|
|
43
|
-
};
|
|
44
|
-
},
|
|
45
|
-
computed: {
|
|
46
|
-
...mapState(useApiStore, ["hlsUrl"]),
|
|
47
|
-
...mapState(usePlayerStore, ["playerVideo", "playerLive", "playerPodcast"]),
|
|
48
|
-
isSecured(): boolean{
|
|
49
|
-
return "SECURED" === this.playerLive?.organisation?.privacy;
|
|
50
|
-
},
|
|
51
|
-
hlsVideoUrl(): string {
|
|
52
|
-
if (!this.playerLive) {
|
|
53
|
-
return "";
|
|
54
|
-
}
|
|
55
|
-
return `${this.hlsUrl}live/video_dev.${this.playerLive.conferenceId}/index.m3u8`;
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
created(){
|
|
59
|
-
this.youtubeId = youtubeVideoHelper.getYoutubeId((this.playerPodcast ?? this.playerLive )?.tags ?? []);
|
|
60
|
-
},
|
|
31
|
+
//Data
|
|
32
|
+
const youtubeId: Ref<string|undefined> = ref(undefined);
|
|
61
33
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
34
|
+
//Composables
|
|
35
|
+
const apiStore = useApiStore();
|
|
36
|
+
const playerStore = usePlayerStore();
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
//Computed
|
|
40
|
+
const isSecured = computed(() => "SECURED" === playerStore.playerLive?.organisation?.privacy);
|
|
41
|
+
const hlsVideoUrl = computed(() => {
|
|
42
|
+
if (!playerStore.playerLive) {
|
|
43
|
+
return "";
|
|
44
|
+
}
|
|
45
|
+
return `${apiStore.hlsUrl}live/video_dev.${playerStore.playerLive.conferenceId}/index.m3u8`;
|
|
68
46
|
});
|
|
47
|
+
|
|
48
|
+
onMounted(()=>{
|
|
49
|
+
youtubeId.value = youtubeVideoHelper.getYoutubeId((playerStore.playerPodcast ?? playerStore.playerLive )?.tags ?? []);
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
//Methods
|
|
53
|
+
function closePlayer() {
|
|
54
|
+
playerStore.playerPlay();
|
|
55
|
+
}
|
|
69
56
|
</script>
|
|
70
57
|
|
|
71
58
|
<style lang="scss">
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
v-if="videoId"
|
|
5
5
|
ref="iframeVideo"
|
|
6
6
|
:src="srcVideo"
|
|
7
|
-
:title="
|
|
7
|
+
:title="t('Video')"
|
|
8
8
|
width="500"
|
|
9
9
|
height="281"
|
|
10
10
|
style="z-index: 1"
|
|
@@ -18,44 +18,39 @@
|
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
|
-
<script lang="ts">
|
|
21
|
+
<script setup lang="ts">
|
|
22
|
+
import { useI18n } from "vue-i18n";
|
|
22
23
|
import SnackBar from "../../SnackBar.vue";
|
|
23
|
-
import {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
(this.$refs.snackbar as InstanceType<typeof SnackBar>).open(
|
|
46
|
-
this.$t("Podcast play error"),
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
methods: {
|
|
51
|
-
goFullScreen() {
|
|
52
|
-
if ("" === this.srcVideo) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
(this.$refs.iframeVideo as Element).requestFullscreen();
|
|
56
|
-
},
|
|
57
|
-
},
|
|
24
|
+
import { computed, onMounted, useTemplateRef } from "vue";
|
|
25
|
+
|
|
26
|
+
//Props
|
|
27
|
+
const props = defineProps({
|
|
28
|
+
videoId: { default: undefined, type: String },
|
|
29
|
+
responsive: { default: false, type: Boolean },
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
//Data
|
|
33
|
+
const snackBarRef = useTemplateRef('snackbar');
|
|
34
|
+
|
|
35
|
+
//Composables
|
|
36
|
+
const { t } = useI18n();
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
//Computed
|
|
40
|
+
const srcVideo = computed(() => {
|
|
41
|
+
return (
|
|
42
|
+
"//www.ultimedia.com/deliver/generic/iframe/mdtk/01009833/zone/1/showtitle/1/src/" +
|
|
43
|
+
props.videoId +
|
|
44
|
+
"/sound/yes/autoplay/1"
|
|
45
|
+
);
|
|
58
46
|
});
|
|
47
|
+
|
|
48
|
+
onMounted(()=>{
|
|
49
|
+
if (undefined === props.videoId) {
|
|
50
|
+
(snackBarRef?.value as InstanceType<typeof SnackBar>).open(t("Podcast play error"));
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
|
|
59
54
|
</script>
|
|
60
55
|
<style lang="scss">
|
|
61
56
|
@use "../../../../style/videoPlayer";
|