@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
class="d-flex flex-column align-items-center my-2 flex-grow-1 text-light position-relative overflow-y-auto"
|
|
4
4
|
>
|
|
5
5
|
<button
|
|
6
|
-
:title="
|
|
6
|
+
:title="t('Reduce')"
|
|
7
7
|
class="player-reduce-button btn bg-transparent text-light"
|
|
8
8
|
@click="changePlayerLargeVersion"
|
|
9
9
|
>
|
|
@@ -78,6 +78,7 @@ import PlayerTitle from "./elements/PlayerTitle.vue";
|
|
|
78
78
|
import PlayerPlayButton from "./elements/PlayerPlayButton.vue";
|
|
79
79
|
import { defineAsyncComponent } from "vue";
|
|
80
80
|
import { usePlayerStore } from "../../../stores/PlayerStore";
|
|
81
|
+
import { useI18n } from "vue-i18n";
|
|
81
82
|
const RadioHistory = defineAsyncComponent(
|
|
82
83
|
() => import("./radio/RadioHistory.vue"),
|
|
83
84
|
);
|
|
@@ -98,7 +99,6 @@ defineProps( {
|
|
|
98
99
|
//Emits
|
|
99
100
|
const emit = defineEmits(['changePlayerLargeVersion']);
|
|
100
101
|
|
|
101
|
-
const playerStore = usePlayerStore();
|
|
102
102
|
|
|
103
103
|
//Composables
|
|
104
104
|
const {
|
|
@@ -108,13 +108,14 @@ const {
|
|
|
108
108
|
displayPlayTime,
|
|
109
109
|
displayTotalTime,
|
|
110
110
|
} = usePlayerDisplayTime();
|
|
111
|
+
const { t } = useI18n();
|
|
112
|
+
const playerStore = usePlayerStore();
|
|
111
113
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
function seekClick(addTime: number): void {
|
|
114
|
+
//Methods
|
|
115
|
+
function changePlayerLargeVersion() {
|
|
116
|
+
emit("changePlayerLargeVersion");
|
|
117
|
+
}
|
|
118
|
+
function seekClick(addTime: number): void {
|
|
118
119
|
const audioPlayer: HTMLAudioElement | null =
|
|
119
120
|
document.querySelector("#audio-player");
|
|
120
121
|
if (!audioPlayer) {
|
|
@@ -3,19 +3,16 @@
|
|
|
3
3
|
class="ambiance-progress c-hand-auto mt-1"
|
|
4
4
|
min="0"
|
|
5
5
|
max="100"
|
|
6
|
-
:value="adPercentProgress"
|
|
7
|
-
:aria-label="
|
|
6
|
+
:value="vastStore.adPercentProgress"
|
|
7
|
+
:aria-label="t('Advertising')"
|
|
8
8
|
/>
|
|
9
9
|
</template>
|
|
10
10
|
|
|
11
|
-
<script lang="ts">
|
|
11
|
+
<script setup lang="ts">
|
|
12
12
|
import { useVastStore } from "../../../../stores/VastStore";
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
...mapState(useVastStore, ["adPercentProgress"]),
|
|
19
|
-
},
|
|
20
|
-
});
|
|
13
|
+
import { useI18n } from "vue-i18n";
|
|
14
|
+
|
|
15
|
+
//Composables
|
|
16
|
+
const { t } = useI18n();
|
|
17
|
+
const vastStore = useVastStore();
|
|
21
18
|
</script>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<button
|
|
3
|
-
v-if="isAdPlaying && isAdSkippable"
|
|
4
|
-
:disabled="!isSkipCurrentlyAllowed"
|
|
3
|
+
v-if="vastStore.isAdPlaying && vastStore.isAdSkippable"
|
|
4
|
+
:disabled="!vastStore.isSkipCurrentlyAllowed"
|
|
5
5
|
class="btn skip-ad-btn"
|
|
6
6
|
@click="skipAd"
|
|
7
7
|
>
|
|
@@ -9,36 +9,30 @@
|
|
|
9
9
|
</button>
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
|
-
<script lang="ts">
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
// see if it has more solutions on https://groups.google.com/g/ima-sdk/c/ky-Q_pUXrIA/m/-P2TsMuABwAJ
|
|
13
14
|
import { useVastStore } from "../../../../stores/VastStore";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
return this.$t("Skip ad in seconds", {
|
|
31
|
-
seconds: this.timeTillSkipInSeconds,
|
|
32
|
-
});
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
methods: {
|
|
36
|
-
...mapActions(useVastStore, ["updateIsAdSkipped"]),
|
|
37
|
-
skipAd(): void {
|
|
38
|
-
this.updateIsAdSkipped(true);
|
|
39
|
-
},
|
|
40
|
-
},
|
|
15
|
+
import { computed } from "vue";
|
|
16
|
+
import { useI18n } from "vue-i18n";
|
|
17
|
+
|
|
18
|
+
//Composables
|
|
19
|
+
const { t } = useI18n();
|
|
20
|
+
const vastStore = useVastStore();
|
|
21
|
+
|
|
22
|
+
//Computed
|
|
23
|
+
const buttonText = computed(() => {
|
|
24
|
+
if (vastStore.isSkipCurrentlyAllowed) {
|
|
25
|
+
return t("Skip ad");
|
|
26
|
+
}
|
|
27
|
+
return t("Skip ad in seconds", {
|
|
28
|
+
seconds: vastStore.timeTillSkipInSeconds,
|
|
29
|
+
});
|
|
41
30
|
});
|
|
31
|
+
|
|
32
|
+
//Methods
|
|
33
|
+
function skipAd(): void {
|
|
34
|
+
vastStore.updateIsAdSkipped(true);
|
|
35
|
+
}
|
|
42
36
|
</script>
|
|
43
37
|
<style lang="scss">
|
|
44
38
|
.octopus-app {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ClassicModal
|
|
3
3
|
id-modal="chaptering-modal"
|
|
4
|
-
:title-modal="
|
|
4
|
+
:title-modal="t('Chaptering')"
|
|
5
5
|
@close="closePopup"
|
|
6
6
|
>
|
|
7
7
|
<template #body>
|
|
8
8
|
<div class="d-flex flex-column">
|
|
9
9
|
<button
|
|
10
|
-
v-for="(chapter, index) in playerChapteringPercent"
|
|
10
|
+
v-for="(chapter, index) in playerStore.playerChapteringPercent"
|
|
11
11
|
:key="chapter"
|
|
12
12
|
class="btn d-flex flex-nowrap align-items-center p-2 mt-1 c-hand text-truncate mb-1"
|
|
13
13
|
:class="actualChapter === index ? 'chapter-selected' : 'border'"
|
|
@@ -24,66 +24,56 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
<template #footer>
|
|
26
26
|
<button class="btn m-1" @click="closePopup">
|
|
27
|
-
{{
|
|
27
|
+
{{ t("Close") }}
|
|
28
28
|
</button>
|
|
29
29
|
</template>
|
|
30
30
|
</ClassicModal>
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
|
-
<script lang="ts">
|
|
33
|
+
<script setup lang="ts">
|
|
34
34
|
import WaveformIcon from "vue-material-design-icons/Waveform.vue";
|
|
35
35
|
import { usePlayerStore } from "../../../../stores/PlayerStore";
|
|
36
|
-
import { mapState, mapActions } from "pinia";
|
|
37
36
|
import ClassicModal from "../../modal/ClassicModal.vue";
|
|
38
|
-
import {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
(this.playerChapteringPercent[index].startPercent / 100);
|
|
79
|
-
this.playerUpdateSeekTime(seekTime);
|
|
80
|
-
if (0 === seekTime) {
|
|
81
|
-
this.playerUpdateElapsed(0);
|
|
82
|
-
}
|
|
83
|
-
this.audioPlayer.currentTime = seekTime;
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
});
|
|
37
|
+
import { onMounted, Ref, ref } from "vue";
|
|
38
|
+
import { useI18n } from "vue-i18n";
|
|
39
|
+
|
|
40
|
+
//Props
|
|
41
|
+
defineProps({
|
|
42
|
+
actualChapter: { default: -1, type: Number }
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
//Emits
|
|
46
|
+
const emit = defineEmits(["close"]);
|
|
47
|
+
|
|
48
|
+
//Data
|
|
49
|
+
const audioPlayer : Ref<HTMLAudioElement | null>= ref(null);
|
|
50
|
+
|
|
51
|
+
//Composables
|
|
52
|
+
const { t } = useI18n();
|
|
53
|
+
const playerStore = usePlayerStore();
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
onMounted(()=>{
|
|
57
|
+
audioPlayer.value = document.querySelector("#audio-player");
|
|
58
|
+
})
|
|
59
|
+
|
|
60
|
+
//Methods
|
|
61
|
+
function closePopup(): void {
|
|
62
|
+
emit("close");
|
|
63
|
+
}
|
|
64
|
+
function goToChapter(index: number) {
|
|
65
|
+
if (!playerStore.playerChapteringPercent || !audioPlayer.value) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const seekTime =
|
|
69
|
+
playerStore.playerTotal *
|
|
70
|
+
(playerStore.playerChapteringPercent[index].startPercent / 100);
|
|
71
|
+
playerStore.playerUpdateSeekTime(seekTime);
|
|
72
|
+
if (0 === seekTime) {
|
|
73
|
+
playerStore.playerUpdateElapsed(0);
|
|
74
|
+
}
|
|
75
|
+
audioPlayer.value.currentTime = seekTime;
|
|
76
|
+
}
|
|
87
77
|
</script>
|
|
88
78
|
<style lang="scss">
|
|
89
79
|
|
|
@@ -15,76 +15,64 @@
|
|
|
15
15
|
@close="showChaptering = false"
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
|
-
<div v-else-if="playerChapteringPercent" class="margin-chaptering"></div>
|
|
18
|
+
<div v-else-if="playerStore.playerChapteringPercent" class="margin-chaptering"></div>
|
|
19
19
|
</template>
|
|
20
|
-
<script lang="ts">
|
|
20
|
+
<script setup lang="ts">
|
|
21
21
|
import ChevronRightIcon from "vue-material-design-icons/ChevronRight.vue";
|
|
22
22
|
import { ChapterPercent } from "@/stores/class/chaptering/chaptering";
|
|
23
23
|
import { usePlayerStore } from "../../../../stores/PlayerStore";
|
|
24
|
-
import {
|
|
25
|
-
import { defineAsyncComponent, defineComponent } from "vue";
|
|
24
|
+
import { defineAsyncComponent, Ref, ref, watch } from "vue";
|
|
26
25
|
const ChapteringModal = defineAsyncComponent(
|
|
27
26
|
() => import("./ChapteringModal.vue"),
|
|
28
27
|
);
|
|
29
|
-
export default defineComponent({
|
|
30
|
-
name: "PlayerChaptering",
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
methods: {
|
|
80
|
-
isInChapter(val: number, chapter: ChapterPercent) {
|
|
81
|
-
return (
|
|
82
|
-
Math.floor(chapter.startPercent) <= val &&
|
|
83
|
-
val < Math.floor(chapter.endPercent)
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
});
|
|
29
|
+
//Data
|
|
30
|
+
const actualChapter : Ref<ChapterPercent | undefined>= ref(undefined);
|
|
31
|
+
const actualIndex = ref(-1);
|
|
32
|
+
const showChaptering = ref(false);
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
//Composables
|
|
36
|
+
const playerStore = usePlayerStore();
|
|
37
|
+
|
|
38
|
+
//Watch
|
|
39
|
+
watch(()=>playerStore.playerElapsed, () => {
|
|
40
|
+
if (!playerStore.playerChapteringPercent) {
|
|
41
|
+
actualChapter.value = undefined;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const progressPercent = (playerStore.playerElapsed ?? 0) * 100;
|
|
45
|
+
if (
|
|
46
|
+
actualChapter.value &&
|
|
47
|
+
isInChapter(progressPercent, actualChapter.value)
|
|
48
|
+
) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
for (
|
|
52
|
+
let i = 0, len = playerStore.playerChapteringPercent.length;
|
|
53
|
+
i < len;
|
|
54
|
+
i++
|
|
55
|
+
) {
|
|
56
|
+
if (
|
|
57
|
+
isInChapter(progressPercent, playerStore.playerChapteringPercent[i])
|
|
58
|
+
) {
|
|
59
|
+
actualChapter.value = playerStore.playerChapteringPercent[i];
|
|
60
|
+
actualIndex.value = i;
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
actualChapter.value = undefined;
|
|
65
|
+
actualIndex.value = -1;
|
|
66
|
+
}, {immediate: true});
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
//Methods
|
|
70
|
+
function isInChapter(val: number, chapter: ChapterPercent) {
|
|
71
|
+
return (
|
|
72
|
+
Math.floor(chapter.startPercent) <= val &&
|
|
73
|
+
val < Math.floor(chapter.endPercent)
|
|
74
|
+
);
|
|
75
|
+
}
|
|
88
76
|
</script>
|
|
89
77
|
<style lang="scss">
|
|
90
78
|
.octopus-app .margin-chaptering {
|
|
@@ -1,90 +1,84 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<a
|
|
4
|
-
v-if="linkAdvertising"
|
|
4
|
+
v-if="vastStore.linkAdvertising"
|
|
5
5
|
rel="noreferrer noopener"
|
|
6
6
|
target="_blank"
|
|
7
|
-
:href="linkAdvertising"
|
|
7
|
+
:href="vastStore.linkAdvertising"
|
|
8
8
|
class="player-image link-image"
|
|
9
9
|
:class="imageWidth > 50 ? 'big-player-image' : ''"
|
|
10
|
-
:title="
|
|
10
|
+
:title="t('New window', {text: t('Advertising')})"
|
|
11
11
|
>
|
|
12
12
|
<LinkVariantIcon />
|
|
13
13
|
</a>
|
|
14
14
|
<router-link
|
|
15
|
-
v-else-if="podcastImage"
|
|
15
|
+
v-else-if="playerStore.podcastImage"
|
|
16
16
|
:to="podcastShareUrl"
|
|
17
|
-
:title="
|
|
17
|
+
:title="t('Episode name page', { name: podcastDisplay?.title })"
|
|
18
18
|
>
|
|
19
19
|
<img
|
|
20
|
-
v-lazy="useProxyImageUrl(podcastImage, imageWidth)"
|
|
20
|
+
v-lazy="useProxyImageUrl(playerStore.podcastImage, imageWidth)"
|
|
21
21
|
:width="imageWidth"
|
|
22
22
|
:height="imageWidth"
|
|
23
|
-
|
|
23
|
+
aria-hidden="true"
|
|
24
|
+
alt=""
|
|
24
25
|
|
|
25
|
-
:title="
|
|
26
|
+
:title="t('Episode name image', { name: podcastDisplay?.title })"
|
|
26
27
|
class="player-image"
|
|
27
28
|
:class="imageWidth > 50 ? 'big-player-image' : ''"
|
|
28
29
|
/>
|
|
29
30
|
</router-link>
|
|
30
31
|
</div>
|
|
31
32
|
</template>
|
|
32
|
-
<script lang="ts">
|
|
33
|
+
<script setup lang="ts">
|
|
33
34
|
import LinkVariantIcon from "vue-material-design-icons/LinkVariant.vue";
|
|
34
35
|
import {useImageProxy} from "../../../composable/useImageProxy";
|
|
35
|
-
import {
|
|
36
|
-
import { RouteLocationRaw } from "vue-router";
|
|
37
|
-
import { mapState } from "pinia";
|
|
36
|
+
import { computed } from "vue";
|
|
38
37
|
import { usePlayerStore } from "../../../../stores/PlayerStore";
|
|
39
38
|
import { useVastStore } from "../../../../stores/VastStore";
|
|
40
|
-
import {
|
|
41
|
-
export default defineComponent({
|
|
42
|
-
name: "PlayerImage",
|
|
39
|
+
import { useI18n } from "vue-i18n";
|
|
43
40
|
|
|
44
|
-
components: { LinkVariantIcon },
|
|
45
41
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return undefined;
|
|
68
|
-
},
|
|
69
|
-
podcastShareUrl(): RouteLocationRaw | string {
|
|
70
|
-
if (this.playerRadio?.podcast?.podcastId) {
|
|
71
|
-
return {
|
|
72
|
-
name: "podcast",
|
|
73
|
-
params: {
|
|
74
|
-
podcastId: this.playerRadio?.podcast?.podcastId.toString(),
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
if (this.playerPodcast) {
|
|
79
|
-
return {
|
|
80
|
-
name: "podcast",
|
|
81
|
-
params: { podcastId: this.playerPodcast.podcastId.toString() },
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
return "";
|
|
85
|
-
},
|
|
86
|
-
},
|
|
42
|
+
//Props
|
|
43
|
+
defineProps({
|
|
44
|
+
imageWidth: { default: 48, type: Number },
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
//Composables
|
|
48
|
+
const { t } = useI18n();
|
|
49
|
+
const { useProxyImageUrl } = useImageProxy();
|
|
50
|
+
const playerStore = usePlayerStore();
|
|
51
|
+
const vastStore = useVastStore();
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
//Computed
|
|
55
|
+
const podcastDisplay = computed(() => {
|
|
56
|
+
if (playerStore.playerRadio?.podcast) {
|
|
57
|
+
return playerStore.playerRadio?.podcast;
|
|
58
|
+
}
|
|
59
|
+
if (playerStore.playerPodcast) {
|
|
60
|
+
return playerStore.playerPodcast;
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
87
63
|
});
|
|
64
|
+
const podcastShareUrl = computed(() => {
|
|
65
|
+
if (playerStore.playerRadio?.podcast?.podcastId) {
|
|
66
|
+
return {
|
|
67
|
+
name: "podcast",
|
|
68
|
+
params: {
|
|
69
|
+
podcastId: playerStore.playerRadio?.podcast?.podcastId.toString(),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (playerStore.playerPodcast) {
|
|
74
|
+
return {
|
|
75
|
+
name: "podcast",
|
|
76
|
+
params: { podcastId: playerStore.playerPodcast.podcastId.toString() },
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
return "";
|
|
80
|
+
});
|
|
81
|
+
|
|
88
82
|
</script>
|
|
89
83
|
|
|
90
84
|
<style lang="scss">
|