@saooti/octopus-sdk 0.28.16 → 1.1.1
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/README.md +188 -2
- package/index.ts +45 -11
- package/package.json +46 -48
- package/public/config.ts +4 -0
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +129 -0
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/style.css +185 -1266
- package/public/img/403.jpeg +0 -0
- package/public/img/404.svg +242 -0
- package/public/img/ouest_france_logo.svg +12 -0
- package/src/App.vue +45 -24
- package/src/api/classicCrud.ts +34 -0
- package/src/api/initialize.ts +4 -2
- package/src/assets/bootstrap-diff.scss +197 -0
- package/src/assets/form.scss +77 -77
- package/src/assets/general.scss +287 -301
- package/src/assets/live.scss +39 -0
- package/src/assets/modal.scss +43 -50
- package/src/assets/multiselect.scss +522 -590
- package/src/assets/octopus-library.scss +17 -4
- package/src/assets/share.scss +150 -250
- package/src/assets/transition.scss +98 -2
- package/src/components/display/aggregator/RssSection.vue +4 -6
- package/src/components/display/categories/CategoryChooser.vue +100 -79
- package/src/components/display/categories/CategoryFilter.vue +117 -37
- package/src/components/display/categories/CategoryList.vue +121 -108
- package/src/components/display/comments/AddCommentModal.vue +98 -94
- package/src/components/display/comments/CommentBasicView.vue +95 -0
- package/src/components/display/comments/CommentInput.vue +175 -155
- package/src/components/display/comments/CommentItem.vue +152 -168
- package/src/components/display/comments/CommentList.vue +123 -229
- package/src/components/display/comments/CommentParentInfo.vue +26 -58
- package/src/components/display/comments/CommentPlayer.vue +51 -49
- package/src/components/display/comments/CommentSection.vue +44 -67
- package/src/components/display/edit/EditBox.vue +11 -5
- package/src/components/display/edit/EditCommentBox.vue +121 -29
- package/src/components/display/emission/EmissionChooser.vue +73 -81
- package/src/components/display/emission/EmissionInlineList.vue +130 -128
- package/src/components/display/emission/EmissionItem.vue +68 -109
- package/src/components/display/emission/EmissionList.vue +140 -146
- package/src/components/display/emission/EmissionPlayerItem.vue +186 -148
- package/src/components/display/filter/AdvancedSearch.vue +192 -273
- package/src/components/display/filter/CategoryFilter.vue +51 -59
- package/src/components/display/filter/MonetizableFilter.vue +17 -16
- package/src/components/display/filter/ProductorSearch.vue +149 -149
- package/src/components/display/filter/RubriqueChoice.vue +33 -37
- package/src/components/display/filter/RubriqueFilter.vue +132 -122
- package/src/components/display/list/ListPaginate.vue +145 -0
- package/src/components/display/list/Paginate.vue +218 -0
- package/src/components/display/live/CountDown.vue +19 -12
- package/src/components/display/live/LiveHorizontalList.vue +78 -55
- package/src/components/display/live/LiveItem.vue +136 -121
- package/src/components/display/live/LiveList.vue +172 -276
- package/src/components/display/organisation/OrganisationChooser.vue +104 -122
- package/src/components/display/organisation/OrganisationChooserLight.vue +46 -37
- package/src/components/display/participant/ParticipantItem.vue +91 -115
- package/src/components/display/participant/ParticipantList.vue +131 -117
- package/src/components/display/playlist/PlaylistItem.vue +54 -78
- package/src/components/display/playlist/PlaylistList.vue +91 -83
- package/src/components/display/playlist/PodcastList.vue +113 -128
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +191 -0
- package/src/components/display/podcasts/AnimatorsItem.vue +28 -39
- package/src/components/display/podcasts/ParticipantDescription.vue +62 -74
- package/src/components/display/podcasts/PodcastFilterList.vue +47 -89
- package/src/components/display/podcasts/PodcastImage.vue +195 -229
- package/src/components/display/podcasts/PodcastInlineList.vue +64 -282
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +240 -0
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +167 -0
- package/src/components/display/podcasts/PodcastItem.vue +93 -227
- package/src/components/display/podcasts/PodcastItemInfo.vue +166 -0
- package/src/components/display/podcasts/PodcastList.vue +115 -134
- package/src/components/display/podcasts/PodcastModuleBox.vue +234 -0
- package/src/components/display/podcasts/PodcastPlayBar.vue +101 -0
- package/src/components/display/podcasts/PodcastSwiperList.vue +204 -0
- package/src/components/display/podcasts/TagList.vue +60 -39
- package/src/components/display/rubriques/RubriqueChooser.vue +114 -95
- package/src/components/display/rubriques/RubriqueList.vue +111 -106
- package/src/components/display/sharing/PlayerParameters.vue +90 -151
- package/src/components/display/sharing/QrCode.vue +40 -27
- package/src/components/display/sharing/ShareButtons.vue +64 -299
- package/src/components/display/sharing/ShareButtonsIntern.vue +225 -0
- package/src/components/display/sharing/ShareDistribution.vue +99 -140
- package/src/components/display/sharing/SharePlayer.vue +155 -370
- package/src/components/display/sharing/SharePlayerColors.vue +78 -0
- package/src/components/display/sharing/SharePlayerTypes.vue +112 -0
- package/src/components/display/sharing/SplitButton.vue +42 -0
- package/src/components/display/sharing/SubscribeButtons.vue +62 -179
- package/src/components/display/studio/RecordingItemButton.vue +4 -6
- package/src/components/form/ClassicCheckbox.vue +66 -0
- package/src/components/form/ClassicLoading.vue +28 -0
- package/src/components/form/ClassicRadio.vue +66 -0
- package/src/components/form/ClassicSearch.vue +86 -0
- package/src/components/form/ClassicSelect.vue +65 -0
- package/src/components/misc/ErrorMessage.vue +27 -14
- package/src/components/misc/Footer.vue +132 -127
- package/src/components/misc/HomeDropdown.vue +93 -150
- package/src/components/misc/LeftMenu.vue +121 -192
- package/src/components/misc/Popover.vue +118 -0
- package/src/components/misc/Snackbar.vue +70 -35
- package/src/components/misc/TopBar.vue +192 -308
- package/src/components/misc/modal/ClipboardModal.vue +35 -50
- package/src/components/misc/modal/MessageModal.vue +71 -48
- package/src/components/misc/modal/NewsletterModal.vue +260 -231
- package/src/components/misc/modal/QrCodeModal.vue +42 -60
- package/src/components/misc/modal/ShareModalPlayer.vue +136 -70
- package/src/components/misc/player/Player.vue +146 -0
- package/src/components/misc/player/PlayerCompact.vue +154 -0
- package/src/components/misc/player/PlayerLarge.vue +166 -0
- package/src/components/misc/player/PlayerProgressBar.vue +112 -0
- package/src/components/misc/player/PlayerTimeline.vue +61 -0
- package/src/components/mixins/functions.ts +11 -43
- package/src/components/mixins/handle403.ts +17 -0
- package/src/components/mixins/init.ts +8 -6
- package/src/components/mixins/orgaComputed.ts +15 -0
- package/src/components/mixins/organisationFilter.ts +35 -18
- package/src/components/mixins/player/playerComment.ts +98 -0
- package/src/components/mixins/player/playerDisplay.ts +113 -0
- package/src/components/mixins/player/playerLive.ts +111 -0
- package/src/components/mixins/player/playerLogic.ts +225 -0
- package/src/components/mixins/tagOfMixins.ts +19 -0
- package/src/components/pages/Category.vue +21 -26
- package/src/components/pages/Emission.vue +136 -162
- package/src/components/pages/Emissions.vue +60 -93
- package/src/components/pages/Error403Page.vue +60 -0
- package/src/components/pages/Home.vue +32 -39
- package/src/components/pages/Lives.vue +40 -46
- package/src/components/pages/PageNotFound.vue +55 -0
- package/src/components/pages/Participant.vue +110 -113
- package/src/components/pages/Participants.vue +21 -45
- package/src/components/pages/Playlist.vue +84 -75
- package/src/components/pages/Playlists.vue +29 -47
- package/src/components/pages/Podcast.vue +203 -434
- package/src/components/pages/Podcasts.vue +75 -134
- package/src/components/pages/Rubrique.vue +21 -29
- package/src/components/pages/Search.vue +33 -79
- package/src/helper/dom.ts +1 -1
- package/src/helper/duration.ts +1 -1
- package/src/helper/useEventListener.ts +18 -0
- package/src/i18n.ts +36 -0
- package/src/locale/de.ts +309 -0
- package/src/locale/educationen.ts +1 -1
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +45 -28
- package/src/locale/es.ts +309 -0
- package/src/locale/fr.ts +25 -8
- package/src/locale/it.ts +307 -0
- package/src/locale/messages.ts +9 -2
- package/src/locale/sl.ts +309 -0
- package/src/main.ts +59 -85
- package/src/router/router.ts +60 -39
- package/src/sass/_variables.scss +10 -8
- package/src/shims-tsx.d.ts +2 -0
- package/src/shims-vue-recaptcha-v3.d.ts +9 -0
- package/src/shims-vue.d.ts +5 -4
- package/src/store/AppStore.ts +8 -9
- package/src/store/class/adserver/adserverConfig.ts +9 -0
- package/src/store/class/adserver/adserverOtherEmission.ts +13 -0
- package/src/store/class/adserver/adserverTiming.ts +10 -0
- package/src/store/class/cartouchier/cartouche.ts +15 -0
- package/src/store/class/cartouchier/cartouchier.ts +9 -0
- package/src/store/class/conference/conference.ts +35 -0
- package/src/store/class/conference/conferenceMessage.ts +10 -0
- package/src/store/class/conference/conferenceParticipant.ts +18 -0
- package/src/store/class/conference/pad.ts +15 -0
- package/src/store/class/conference/studioCall.ts +7 -0
- package/src/store/class/contract/contract.ts +7 -0
- package/src/store/class/contract/contractOrganisation.ts +7 -0
- package/src/store/class/ftp/ftpEmission.ts +41 -0
- package/src/store/class/ftp/ftpParam.ts +12 -0
- package/src/store/class/ftp/testFtpEmission.ts +5 -0
- package/src/store/class/general/audioView.ts +21 -0
- package/src/store/class/general/category.ts +10 -0
- package/src/store/class/general/comment.ts +16 -0
- package/src/store/class/general/customPlayer.ts +9 -0
- package/src/store/class/general/emission.ts +23 -0
- package/src/store/class/general/fetchParam.ts +3 -0
- package/src/store/class/general/initState.ts +25 -0
- package/src/store/class/general/interfacePageable.ts +16 -0
- package/src/store/class/general/ituneCategory.ts +5 -0
- package/src/store/class/general/media.ts +14 -0
- package/src/store/class/general/organisation.ts +20 -0
- package/src/store/class/general/pageable.ts +13 -0
- package/src/store/class/general/participant.ts +12 -0
- package/src/store/class/{player.ts → general/player.ts} +5 -3
- package/src/store/class/general/playlist.ts +13 -0
- package/src/store/class/general/podcast.ts +43 -0
- package/src/store/class/general/sortPageable.ts +5 -0
- package/src/store/class/general/soundcastCategory.ts +8 -0
- package/src/store/class/ouestFrance/ofTag.ts +36 -0
- package/src/store/class/ouestFrance/ofTagInfo.ts +9 -0
- package/src/store/class/ouestFrance/ofTagPage.ts +7 -0
- package/src/store/class/ouestFrance/ofTagSeo.ts +7 -0
- package/src/store/class/ouestFrance/ofTagVente.ts +6 -0
- package/src/store/class/ouestFrance/ofTagWithParents.ts +26 -0
- package/src/store/class/rss/aggregator.ts +28 -0
- package/src/store/class/rss/rssEmission.ts +14 -0
- package/src/store/class/rss/rssInfo.ts +8 -0
- package/src/store/class/rubrique/rubriquage.ts +10 -0
- package/src/store/class/rubrique/rubriquageFilter.ts +6 -0
- package/src/store/class/rubrique/rubrique.ts +9 -0
- package/src/store/class/stat/statArrayIncome.ts +6 -0
- package/src/store/class/stat/statArrayObject.ts +34 -0
- package/src/store/class/stat/statGraph.ts +7 -0
- package/src/store/class/user/person.ts +15 -0
- package/src/store/class/user/profile.ts +12 -0
- package/src/store/class/user/userKeycloak.ts +24 -0
- package/src/store/paramStore.ts +221 -241
- package/src/store/typeAppStore.ts +45 -28
- package/src/vuex-shim.d.ts +8 -0
- package/tsconfig.json +2 -1
- package/vue.config.js +3 -1
- package/public/css/fonts/saooti-ui.eot +0 -0
- package/public/css/fonts/saooti-ui.svg +0 -840
- package/public/css/fonts/saooti-ui.ttf +0 -0
- package/public/css/fonts/saooti-ui.woff +0 -0
- package/public/css/fonts/stitcher-logo.svg +0 -83
- package/public/img/article.png +0 -0
- package/src/api/comments.ts +0 -7
- package/src/api/emissions.ts +0 -7
- package/src/api/podcasts.ts +0 -7
- package/src/api/profile.ts +0 -8
- package/src/api/studio.ts +0 -8
- package/src/assets/bootstrap_scss/_alert.scss +0 -51
- package/src/assets/bootstrap_scss/_badge.scss +0 -54
- package/src/assets/bootstrap_scss/_breadcrumb.scss +0 -42
- package/src/assets/bootstrap_scss/_button-group.scss +0 -164
- package/src/assets/bootstrap_scss/_buttons.scss +0 -298
- package/src/assets/bootstrap_scss/_card.scss +0 -278
- package/src/assets/bootstrap_scss/_carousel.scss +0 -197
- package/src/assets/bootstrap_scss/_close.scss +0 -41
- package/src/assets/bootstrap_scss/_code.scss +0 -48
- package/src/assets/bootstrap_scss/_custom-forms.scss +0 -522
- package/src/assets/bootstrap_scss/_dropdown.scss +0 -201
- package/src/assets/bootstrap_scss/_forms.scss +0 -352
- package/src/assets/bootstrap_scss/_functions.scss +0 -134
- package/src/assets/bootstrap_scss/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/_images.scss +0 -42
- package/src/assets/bootstrap_scss/_input-group.scss +0 -191
- package/src/assets/bootstrap_scss/_jumbotron.scss +0 -17
- package/src/assets/bootstrap_scss/_list-group.scss +0 -158
- package/src/assets/bootstrap_scss/_media.scss +0 -8
- package/src/assets/bootstrap_scss/_mixins.scss +0 -47
- package/src/assets/bootstrap_scss/_modal.scss +0 -243
- package/src/assets/bootstrap_scss/_nav.scss +0 -120
- package/src/assets/bootstrap_scss/_navbar.scss +0 -324
- package/src/assets/bootstrap_scss/_pagination.scss +0 -74
- package/src/assets/bootstrap_scss/_popover.scss +0 -170
- package/src/assets/bootstrap_scss/_print.scss +0 -141
- package/src/assets/bootstrap_scss/_progress.scss +0 -46
- package/src/assets/bootstrap_scss/_reboot.scss +0 -482
- package/src/assets/bootstrap_scss/_root.scss +0 -20
- package/src/assets/bootstrap_scss/_spinners.scss +0 -55
- package/src/assets/bootstrap_scss/_tables.scss +0 -185
- package/src/assets/bootstrap_scss/_toasts.scss +0 -44
- package/src/assets/bootstrap_scss/_tooltip.scss +0 -115
- package/src/assets/bootstrap_scss/_transitions.scss +0 -20
- package/src/assets/bootstrap_scss/_type.scss +0 -125
- package/src/assets/bootstrap_scss/_utilities.scss +0 -17
- package/src/assets/bootstrap_scss/_variables.scss +0 -1145
- package/src/assets/bootstrap_scss/bootstrap-grid.scss +0 -29
- package/src/assets/bootstrap_scss/bootstrap-reboot.scss +0 -12
- package/src/assets/bootstrap_scss/bootstrap.scss +0 -44
- package/src/assets/bootstrap_scss/mixins/_alert.scss +0 -13
- package/src/assets/bootstrap_scss/mixins/_background-variant.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_badge.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_border-radius.scss +0 -63
- package/src/assets/bootstrap_scss/mixins/_box-shadow.scss +0 -20
- package/src/assets/bootstrap_scss/mixins/_breakpoints.scss +0 -123
- package/src/assets/bootstrap_scss/mixins/_buttons.scss +0 -110
- package/src/assets/bootstrap_scss/mixins/_caret.scss +0 -62
- package/src/assets/bootstrap_scss/mixins/_clearfix.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_deprecate.scss +0 -10
- package/src/assets/bootstrap_scss/mixins/_float.scss +0 -14
- package/src/assets/bootstrap_scss/mixins/_forms.scss +0 -177
- package/src/assets/bootstrap_scss/mixins/_gradients.scss +0 -45
- package/src/assets/bootstrap_scss/mixins/_grid-framework.scss +0 -71
- package/src/assets/bootstrap_scss/mixins/_grid.scss +0 -69
- package/src/assets/bootstrap_scss/mixins/_hover.scss +0 -37
- package/src/assets/bootstrap_scss/mixins/_image.scss +0 -36
- package/src/assets/bootstrap_scss/mixins/_list-group.scss +0 -21
- package/src/assets/bootstrap_scss/mixins/_lists.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_nav-divider.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_pagination.scss +0 -22
- package/src/assets/bootstrap_scss/mixins/_reset-text.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_resize.scss +0 -6
- package/src/assets/bootstrap_scss/mixins/_screen-reader.scss +0 -34
- package/src/assets/bootstrap_scss/mixins/_size.scss +0 -7
- package/src/assets/bootstrap_scss/mixins/_table-row.scss +0 -39
- package/src/assets/bootstrap_scss/mixins/_text-emphasis.scss +0 -17
- package/src/assets/bootstrap_scss/mixins/_text-hide.scss +0 -11
- package/src/assets/bootstrap_scss/mixins/_text-truncate.scss +0 -8
- package/src/assets/bootstrap_scss/mixins/_transition.scss +0 -16
- package/src/assets/bootstrap_scss/mixins/_visibility.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_align.scss +0 -8
- package/src/assets/bootstrap_scss/utilities/_background.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_borders.scss +0 -75
- package/src/assets/bootstrap_scss/utilities/_clearfix.scss +0 -3
- package/src/assets/bootstrap_scss/utilities/_display.scss +0 -26
- package/src/assets/bootstrap_scss/utilities/_embed.scss +0 -39
- package/src/assets/bootstrap_scss/utilities/_flex.scss +0 -51
- package/src/assets/bootstrap_scss/utilities/_float.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_overflow.scss +0 -5
- package/src/assets/bootstrap_scss/utilities/_position.scss +0 -32
- package/src/assets/bootstrap_scss/utilities/_screenreaders.scss +0 -11
- package/src/assets/bootstrap_scss/utilities/_shadows.scss +0 -6
- package/src/assets/bootstrap_scss/utilities/_sizing.scss +0 -20
- package/src/assets/bootstrap_scss/utilities/_spacing.scss +0 -73
- package/src/assets/bootstrap_scss/utilities/_stretched-link.scss +0 -19
- package/src/assets/bootstrap_scss/utilities/_text.scss +0 -72
- package/src/assets/bootstrap_scss/utilities/_visibility.scss +0 -13
- package/src/assets/bootstrap_scss/vendor/_rfs.scss +0 -204
- package/src/components/misc/Player.vue +0 -772
- package/src/store/class/category.ts +0 -8
- package/src/store/class/comment.ts +0 -17
- package/src/store/class/conference.ts +0 -27
- package/src/store/class/customPlayer.ts +0 -8
- package/src/store/class/emission.ts +0 -20
- package/src/store/class/media.ts +0 -13
- package/src/store/class/organisation.ts +0 -19
- package/src/store/class/participant.ts +0 -12
- package/src/store/class/person.ts +0 -13
- package/src/store/class/playlist.ts +0 -15
- package/src/store/class/podcast.ts +0 -37
- package/src/store/class/rubriquage.ts +0 -9
- package/src/store/class/rubriquageFilter.ts +0 -5
- package/src/store/class/rubrique.ts +0 -8
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { Podcast } from '@/store/class/general/podcast';
|
|
2
|
+
import DurationHelper from '../../../helper/duration';
|
|
3
|
+
import { state } from '../../../store/paramStore';
|
|
4
|
+
import { defineComponent } from 'vue';
|
|
5
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
6
|
+
export const playerDisplay = defineComponent({
|
|
7
|
+
props: {
|
|
8
|
+
hlsReady: { default: false , type: Boolean},
|
|
9
|
+
},
|
|
10
|
+
computed:{
|
|
11
|
+
playedTime(): string{
|
|
12
|
+
if (this.$store.state.player.elapsed && this.$store.state.player.elapsed > 0 && this.$store.state.player.total && this.$store.state.player.total > 0) {
|
|
13
|
+
return DurationHelper.formatDuration(
|
|
14
|
+
Math.round(this.$store.state.player.elapsed * this.$store.state.player.total)
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
return '--:--';
|
|
18
|
+
},
|
|
19
|
+
totalTime(): string {
|
|
20
|
+
if (this.$store.state.player.elapsed && this.$store.state.player.elapsed > 0 && this.$store.state.player.total && this.$store.state.player.total > 0)
|
|
21
|
+
return DurationHelper.formatDuration(Math.round(this.$store.state.player.total));
|
|
22
|
+
return '--:--';
|
|
23
|
+
},
|
|
24
|
+
isPlaying(): boolean {
|
|
25
|
+
return 'PLAYING' === this.$store.state.player.status;
|
|
26
|
+
},
|
|
27
|
+
isPaused(): boolean {
|
|
28
|
+
return 'PAUSED' === this.$store.state.player.status;
|
|
29
|
+
},
|
|
30
|
+
podcast(): undefined|Podcast{
|
|
31
|
+
return this.$store.state.player.podcast;
|
|
32
|
+
},
|
|
33
|
+
isImage(): boolean {
|
|
34
|
+
return (state.player.image as boolean);
|
|
35
|
+
},
|
|
36
|
+
podcastImage(): string{
|
|
37
|
+
if (this.$store.state.player.podcast) return this.$store.state.player.podcast.imageUrl;
|
|
38
|
+
return '';
|
|
39
|
+
},
|
|
40
|
+
podcastShareUrl(): RouteLocationRaw|string {
|
|
41
|
+
if (this.podcast) {
|
|
42
|
+
return {
|
|
43
|
+
name: 'podcast',
|
|
44
|
+
params: { podcastId: this.podcast.podcastId.toString() },
|
|
45
|
+
query: { productor: this.$store.state.filter.organisationId },
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return '';
|
|
49
|
+
},
|
|
50
|
+
isEmissionName(): boolean {
|
|
51
|
+
return (state.player.emissionName as boolean);
|
|
52
|
+
},
|
|
53
|
+
podcastTitle(): string {
|
|
54
|
+
if (this.$store.state.player.podcast) {
|
|
55
|
+
if (this.isEmissionName)
|
|
56
|
+
return this.emissionName + ' - ' + this.$store.state.player.podcast.title;
|
|
57
|
+
return this.$store.state.player.podcast.title;
|
|
58
|
+
}
|
|
59
|
+
if (this.$store.state.player.media) return this.$store.state.player.media.title;
|
|
60
|
+
if (this.$store.state.player.live) {
|
|
61
|
+
if (!this.hlsReady)
|
|
62
|
+
return this.$store.state.player.live.title + ' (' + this.$t('Start in a while') + ')';
|
|
63
|
+
return this.$store.state.player.live.title;
|
|
64
|
+
}
|
|
65
|
+
return '';
|
|
66
|
+
},
|
|
67
|
+
emissionName(): string {
|
|
68
|
+
if (this.$store.state.player.podcast) return this.$store.state.player.podcast.emission.name;
|
|
69
|
+
return '';
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
created(){
|
|
73
|
+
window.addEventListener('keydown', this.addKeyboardControl);
|
|
74
|
+
},
|
|
75
|
+
beforeUnmount() {
|
|
76
|
+
window.removeEventListener('keydown', this.addKeyboardControl);
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
methods: {
|
|
80
|
+
addKeyboardControl(event: KeyboardEvent): void{
|
|
81
|
+
if(!event || null ===event){return;}
|
|
82
|
+
const element = event.target as HTMLElement;
|
|
83
|
+
if (!element || 'INPUT' == element.tagName.toUpperCase() || 'TEXTAREA' == element.tagName.toUpperCase()){return;}
|
|
84
|
+
if (' ' === event.key || 'Spacebar' === event.key) {
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
this.switchPausePlay();
|
|
87
|
+
}else if ('ArrowRight' === event.key && event.ctrlKey) {
|
|
88
|
+
const audioPlayer: HTMLAudioElement|null = document.querySelector('#audio-player');
|
|
89
|
+
if(!audioPlayer){return;}
|
|
90
|
+
audioPlayer.currentTime += 15;
|
|
91
|
+
}else if ('ArrowLeft' === event.key && event.ctrlKey) {
|
|
92
|
+
const audioPlayer: HTMLAudioElement|null = document.querySelector('#audio-player');
|
|
93
|
+
if(!audioPlayer){return;}
|
|
94
|
+
audioPlayer.currentTime -=15;
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
switchPausePlay(): void {
|
|
98
|
+
const audioPlayer: HTMLAudioElement|null = document.querySelector('#audio-player');
|
|
99
|
+
if(!audioPlayer){return;}
|
|
100
|
+
if (audioPlayer.paused) {
|
|
101
|
+
this.onPlay();
|
|
102
|
+
} else {
|
|
103
|
+
this.onPause();
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
onPlay(): void {
|
|
107
|
+
this.$store.commit('playerPause', false);
|
|
108
|
+
},
|
|
109
|
+
onPause(): void {
|
|
110
|
+
this.$store.commit('playerPause', true);
|
|
111
|
+
},
|
|
112
|
+
}
|
|
113
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { mapState } from 'vuex';
|
|
2
|
+
import { state } from '../../../store/paramStore';
|
|
3
|
+
import octopusApi from '@saooti/octopus-api';
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
let Hls:any = null;
|
|
6
|
+
/* eslint-enable */
|
|
7
|
+
import { StoreState } from '@/store/typeAppStore';
|
|
8
|
+
import { defineComponent } from 'vue';
|
|
9
|
+
export const playerLive = defineComponent({
|
|
10
|
+
data() {
|
|
11
|
+
return {
|
|
12
|
+
listenTime: 0 as number,
|
|
13
|
+
notListenTime: 0 as number,
|
|
14
|
+
lastSend: 0 as number,
|
|
15
|
+
hlsReady: false as boolean,
|
|
16
|
+
downloadId: null as string|null,
|
|
17
|
+
};
|
|
18
|
+
},
|
|
19
|
+
computed: {
|
|
20
|
+
...mapState({
|
|
21
|
+
live(state: StoreState) { return state.player.live}
|
|
22
|
+
}),
|
|
23
|
+
},
|
|
24
|
+
methods: {
|
|
25
|
+
onPlay(): void {
|
|
26
|
+
this.$store.commit('playerPause', false);
|
|
27
|
+
},
|
|
28
|
+
async playLive(): Promise<void> {
|
|
29
|
+
if (!this.live) return;
|
|
30
|
+
const hlsStreamUrl =
|
|
31
|
+
state.podcastPage.hlsUri +
|
|
32
|
+
'stream/dev.' +
|
|
33
|
+
this.live.conferenceId +
|
|
34
|
+
'/index.m3u8';
|
|
35
|
+
try {
|
|
36
|
+
await this.initHls(hlsStreamUrl);
|
|
37
|
+
} catch (error) {
|
|
38
|
+
console.log(error);
|
|
39
|
+
setTimeout(() => {
|
|
40
|
+
this.playLive();
|
|
41
|
+
}, 1000);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
async initHls(hlsStreamUrl: string): Promise<void> {
|
|
45
|
+
return new Promise<void>(async(resolve, reject) => {
|
|
46
|
+
if(null === Hls){
|
|
47
|
+
//TODO -> Version light min quand ce sera possible
|
|
48
|
+
await import('hls.js/dist/hls.js').then((hlsLibrary) => {
|
|
49
|
+
Hls = hlsLibrary.default;
|
|
50
|
+
})
|
|
51
|
+
await import('hls.js').then((hlsLibrary) => {
|
|
52
|
+
Hls = hlsLibrary.default;
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
if (!Hls.isSupported()) {
|
|
56
|
+
reject('Hls is not supported ! ');
|
|
57
|
+
}
|
|
58
|
+
const hls = new Hls();
|
|
59
|
+
/* if(this.$store.state.authentication.isAuthenticated && this.$store.state.oAuthParam.accessToken){
|
|
60
|
+
hls = new Hls({xhrSetup:
|
|
61
|
+
(xhr: XMLHttpRequest) => {
|
|
62
|
+
xhr.setRequestHeader("Authorization", "Bearer " + this.$store.state.oAuthParam.accessToken);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
} */
|
|
67
|
+
hls.on(Hls.Events.MANIFEST_PARSED, async () => {
|
|
68
|
+
if(!this.live){ return; }
|
|
69
|
+
let downloadId = null;
|
|
70
|
+
try {
|
|
71
|
+
downloadId = await octopusApi.putDataPublic<string | null>(0, 'podcast/prepare/live/'+this.live.livePodcastId, undefined);
|
|
72
|
+
await octopusApi.fetchDataPublicWithParams<string | null>(0,'podcast/download/live/' + this.live.livePodcastId+".m3u8",{
|
|
73
|
+
'downloadId': null!==downloadId ? downloadId : undefined,
|
|
74
|
+
'origin':'octopus',
|
|
75
|
+
'distributorId':this.$store.state.authentication.organisationId
|
|
76
|
+
});
|
|
77
|
+
this.setDownloadId(downloadId);
|
|
78
|
+
} catch (error) {
|
|
79
|
+
console.log('ERROR downloadId');
|
|
80
|
+
}
|
|
81
|
+
this.hlsReady = true;
|
|
82
|
+
const audio: HTMLElement|null = document.getElementById('audio-player');
|
|
83
|
+
hls.attachMedia((audio as HTMLAudioElement));
|
|
84
|
+
await (audio as HTMLAudioElement).play();
|
|
85
|
+
this.onPlay();
|
|
86
|
+
resolve();
|
|
87
|
+
});
|
|
88
|
+
hls.on(Hls.Events.ERROR, async() => {
|
|
89
|
+
reject('There is an error while reading media content');
|
|
90
|
+
});
|
|
91
|
+
hls.loadSource(hlsStreamUrl);
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
setDownloadId(newValue: string|null): void {
|
|
95
|
+
this.endListeningProgress();
|
|
96
|
+
this.downloadId = newValue;
|
|
97
|
+
},
|
|
98
|
+
async endListeningProgress(): Promise<void> {
|
|
99
|
+
if (!this.downloadId) return;
|
|
100
|
+
try {
|
|
101
|
+
await octopusApi.putDataPublic(0, 'podcast/listen/' + this.downloadId + '?seconds=' + Math.round(this.listenTime), undefined);
|
|
102
|
+
} catch{
|
|
103
|
+
//Do nothing
|
|
104
|
+
}
|
|
105
|
+
this.downloadId = null;
|
|
106
|
+
this.notListenTime = 0;
|
|
107
|
+
this.lastSend = 0;
|
|
108
|
+
this.listenTime = 0;
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
})
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { mapState } from 'vuex';
|
|
2
|
+
import octopusApi from '@saooti/octopus-api';
|
|
3
|
+
import { CommentPodcast } from '@/store/class/general/comment';
|
|
4
|
+
import { cookies } from '../functions';
|
|
5
|
+
import { playerLive } from './playerLive';
|
|
6
|
+
import { playerComment } from './playerComment';
|
|
7
|
+
import { StoreState } from '@/store/typeAppStore';
|
|
8
|
+
import { defineComponent } from 'vue';
|
|
9
|
+
export const playerLogic = defineComponent({
|
|
10
|
+
mixins:[cookies,playerLive,playerComment],
|
|
11
|
+
data() {
|
|
12
|
+
return {
|
|
13
|
+
forceHide: false as boolean,
|
|
14
|
+
listenTime: 0 as number,
|
|
15
|
+
notListenTime: 0 as number,
|
|
16
|
+
lastSend: 0 as number,
|
|
17
|
+
downloadId: null as string|null,
|
|
18
|
+
playerError: false as boolean,
|
|
19
|
+
listenError: false as boolean,
|
|
20
|
+
percentLiveProgress: 0 as number,
|
|
21
|
+
durationLivePosition: 0 as number,
|
|
22
|
+
displayAlertBar: false as boolean,
|
|
23
|
+
hlsReady: false as boolean,
|
|
24
|
+
comments: [] as Array<CommentPodcast>,
|
|
25
|
+
showTimeline: false as boolean,
|
|
26
|
+
audioUrlToPlay: "" as string
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
...mapState({
|
|
31
|
+
podcast (state: StoreState){ return state.player.podcast},
|
|
32
|
+
media: (state: StoreState) => state.player.media,
|
|
33
|
+
live: (state: StoreState) => state.player.live,
|
|
34
|
+
volume: (state: StoreState) => state.player.volume,
|
|
35
|
+
commentsLoaded: (state: StoreState) => state.comments.loadedComments,
|
|
36
|
+
percentProgress: (state: StoreState) => {
|
|
37
|
+
if(!state.player.elapsed){return 0;}
|
|
38
|
+
return state.player.elapsed * 100;
|
|
39
|
+
},
|
|
40
|
+
playerSeekTime: (state: StoreState) => state.player.seekTime,
|
|
41
|
+
}),
|
|
42
|
+
audioUrl(): string {
|
|
43
|
+
return this.getAudioUrl();
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
watch: {
|
|
48
|
+
async audioUrl(): Promise<void>{
|
|
49
|
+
this.playerError = false;
|
|
50
|
+
if(this.media || !this.podcast || !this.podcast.availability.visibility ||this.listenError){
|
|
51
|
+
this.audioUrlToPlay = this.audioUrl;
|
|
52
|
+
}
|
|
53
|
+
if(!this.podcast){return;}
|
|
54
|
+
const response = await octopusApi.fetchDataPublic<{location:string, downloadId: number}>(0,"podcast/download/register/"+ this.audioUrl);
|
|
55
|
+
this.setDownloadId(response.downloadId.toString());
|
|
56
|
+
this.audioUrlToPlay = response.location;
|
|
57
|
+
},
|
|
58
|
+
podcast: {
|
|
59
|
+
deep: true,
|
|
60
|
+
handler(){
|
|
61
|
+
this.reInitPlayer();
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
live: {
|
|
65
|
+
deep: true,
|
|
66
|
+
async handler(){
|
|
67
|
+
this.hlsReady = false;
|
|
68
|
+
this.reInitPlayer();
|
|
69
|
+
await this.playLive();
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
async listenTime(newVal): Promise<void> {
|
|
73
|
+
if ((!this.podcast && !this.live)||(!this.downloadId)||(newVal - this.lastSend < 10)) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this.lastSend = newVal;
|
|
77
|
+
await octopusApi.putDataPublic(0, 'podcast/listen/' + this.downloadId + '?seconds=' + Math.round(newVal), undefined);
|
|
78
|
+
},
|
|
79
|
+
playerSeekTime(){
|
|
80
|
+
if(!this.playerSeekTime){return;}
|
|
81
|
+
if (this.$store.state.player.podcast || this.$store.state.player.live) {
|
|
82
|
+
this.notListenTime = this.playerSeekTime - this.listenTime;
|
|
83
|
+
}
|
|
84
|
+
const audioPlayer: HTMLAudioElement | null = document.querySelector('#audio-player');
|
|
85
|
+
if (!audioPlayer) return;
|
|
86
|
+
audioPlayer.currentTime = this.playerSeekTime;
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
mounted() {
|
|
91
|
+
window.addEventListener('beforeunload', this.endListeningProgress);
|
|
92
|
+
this.watchPlayerStatus();
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
methods: {
|
|
96
|
+
getDomain(): string{
|
|
97
|
+
let domain = "";
|
|
98
|
+
const domainArray: RegExpExecArray | null = /\.(.+)/.exec(window.location.host);
|
|
99
|
+
if(domainArray && null !== domainArray){
|
|
100
|
+
domain = domainArray[1];
|
|
101
|
+
}
|
|
102
|
+
return domain;
|
|
103
|
+
},
|
|
104
|
+
getAudioUrl(): string{
|
|
105
|
+
if (this.media) return this.media.audioUrl? this.media.audioUrl:"";
|
|
106
|
+
if (!this.podcast) return '';
|
|
107
|
+
if (!this.podcast.availability.visibility)
|
|
108
|
+
return this.podcast.audioStorageUrl;
|
|
109
|
+
if (this.listenError) return this.podcast.audioStorageUrl;
|
|
110
|
+
const parameters = [];
|
|
111
|
+
parameters.push('origin=octopus');
|
|
112
|
+
parameters.push('listenerId='+this.getListenerId());
|
|
113
|
+
if (
|
|
114
|
+
this.$store.state.authentication &&
|
|
115
|
+
this.$store.state.authentication.organisationId
|
|
116
|
+
) {
|
|
117
|
+
parameters.push(
|
|
118
|
+
'distributorId=' + this.$store.state.authentication.organisationId
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
if("SECURED" === this.podcast.organisation.privacy && this.$store.state.authentication.isAuthenticated && this.$store.state.oAuthParam.accessToken){
|
|
122
|
+
parameters.push('access_token='+this.$store.state.oAuthParam.accessToken);
|
|
123
|
+
}
|
|
124
|
+
return this.podcast.podcastId + '.mp3?' + parameters.join('&');
|
|
125
|
+
},
|
|
126
|
+
reInitPlayer():void{
|
|
127
|
+
this.setDownloadId(null);
|
|
128
|
+
this.listenError = false;
|
|
129
|
+
this.initComments();
|
|
130
|
+
},
|
|
131
|
+
stopPlayer(): void {
|
|
132
|
+
this.$store.commit('playerPlayPodcast');
|
|
133
|
+
},
|
|
134
|
+
getListenerId(): string{
|
|
135
|
+
let listenerId = this.getCookie("octopus_listenerId");
|
|
136
|
+
if(!listenerId){
|
|
137
|
+
listenerId = new Date().valueOf().toString() + Math.random();
|
|
138
|
+
this.setCookie("octopus_listenerId", listenerId, ';domain='+this.getDomain());
|
|
139
|
+
}
|
|
140
|
+
return listenerId;
|
|
141
|
+
},
|
|
142
|
+
watchPlayerStatus(): void {
|
|
143
|
+
this.$store.watch(
|
|
144
|
+
(state: StoreState) => state.player.status,
|
|
145
|
+
(newValue: string) => {
|
|
146
|
+
const audioPlayer: HTMLAudioElement | null = document.querySelector('#audio-player');
|
|
147
|
+
if (!audioPlayer) return;
|
|
148
|
+
if (this.live && !this.hlsReady) {
|
|
149
|
+
audioPlayer.pause();
|
|
150
|
+
this.percentLiveProgress = 0;
|
|
151
|
+
this.durationLivePosition = 0;
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
if ('PAUSED' === newValue) {
|
|
155
|
+
audioPlayer.pause();
|
|
156
|
+
}else if ('PLAYING' === newValue){
|
|
157
|
+
audioPlayer.play();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
},
|
|
162
|
+
onError(): void {
|
|
163
|
+
if (this.podcast && ""!==this.audioUrlToPlay && !this.listenError) {
|
|
164
|
+
this.listenError = true;
|
|
165
|
+
} else if ((this.podcast && ""!==this.audioUrlToPlay ) || this.media) {
|
|
166
|
+
this.playerError = true;
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
onTimeUpdate(event: Event): void {
|
|
170
|
+
const mediaTarget = (event.currentTarget as HTMLMediaElement);
|
|
171
|
+
if (this.podcast || this.live) {
|
|
172
|
+
if (!this.downloadId) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (
|
|
176
|
+
this.live &&
|
|
177
|
+
0 === this.listenTime &&
|
|
178
|
+
0 !== mediaTarget.currentTime
|
|
179
|
+
) {
|
|
180
|
+
this.notListenTime = mediaTarget.currentTime;
|
|
181
|
+
this.listenTime = 1;
|
|
182
|
+
} else {
|
|
183
|
+
this.listenTime =
|
|
184
|
+
mediaTarget.currentTime - this.notListenTime;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
const streamDuration = mediaTarget.duration;
|
|
188
|
+
if (!streamDuration) return;
|
|
189
|
+
if (!mediaTarget.currentTime) return;
|
|
190
|
+
if (!this.live) {
|
|
191
|
+
this.displayAlertBar = false;
|
|
192
|
+
this.percentLiveProgress = 100;
|
|
193
|
+
this.$store.commit('playerTotalTime', streamDuration);
|
|
194
|
+
this.$store.commit('playerElapsed', mediaTarget.currentTime / streamDuration);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const scheduledDuration = this.live.duration / 1000;
|
|
198
|
+
if (scheduledDuration > streamDuration) {
|
|
199
|
+
this.displayAlertBar = false;
|
|
200
|
+
this.percentLiveProgress = (streamDuration / scheduledDuration) * 100;
|
|
201
|
+
this.$store.commit('playerTotalTime', scheduledDuration);
|
|
202
|
+
this.$store.commit(
|
|
203
|
+
'playerElapsed',
|
|
204
|
+
mediaTarget.currentTime / scheduledDuration
|
|
205
|
+
);
|
|
206
|
+
} else {
|
|
207
|
+
this.percentLiveProgress = 100;
|
|
208
|
+
this.displayAlertBar = true;
|
|
209
|
+
this.durationLivePosition = (scheduledDuration / streamDuration) * 100;
|
|
210
|
+
this.$store.commit('playerTotalTime', streamDuration);
|
|
211
|
+
this.$store.commit('playerElapsed', mediaTarget.currentTime / streamDuration);
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
onFinished(): void {
|
|
215
|
+
this.setDownloadId(null);
|
|
216
|
+
if (this.live) {
|
|
217
|
+
const audio: HTMLElement|null = document.getElementById('audio-player');
|
|
218
|
+
if(audio){
|
|
219
|
+
(audio as HTMLAudioElement).src = '';
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
this.forceHide = true;
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
})
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {defineComponent } from 'vue';
|
|
2
|
+
export const tagOfMixins = defineComponent({
|
|
3
|
+
name: 'TagOfMixins',
|
|
4
|
+
methods:{
|
|
5
|
+
isOuestFranceTag(tag: string): boolean{
|
|
6
|
+
return "[of]"===tag.substring(0,4);
|
|
7
|
+
},
|
|
8
|
+
formateOfTag(tag: string): string{
|
|
9
|
+
if(!this.isOuestFranceTag(tag)){
|
|
10
|
+
return tag;
|
|
11
|
+
}
|
|
12
|
+
const lastSlash = tag.lastIndexOf('/');
|
|
13
|
+
if(-1!==lastSlash){
|
|
14
|
+
return tag.substring(lastSlash + 1, tag.length);
|
|
15
|
+
}
|
|
16
|
+
return tag.substring(4, tag.length);
|
|
17
|
+
},
|
|
18
|
+
}
|
|
19
|
+
});
|
|
@@ -2,29 +2,25 @@
|
|
|
2
2
|
<div class="page-box">
|
|
3
3
|
<h1>{{ title }}</h1>
|
|
4
4
|
<PodcastList
|
|
5
|
-
:first="
|
|
6
|
-
:size="
|
|
7
|
-
:
|
|
8
|
-
:
|
|
5
|
+
:first="0"
|
|
6
|
+
:size="30"
|
|
7
|
+
:iab-id="iabId"
|
|
8
|
+
:organisation-id="filterOrga"
|
|
9
9
|
/>
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
|
-
<style lang="scss"></style>
|
|
14
|
-
|
|
15
13
|
<script lang="ts">
|
|
16
|
-
// @ is an alias to /src
|
|
17
14
|
import PodcastList from '../display/podcasts/PodcastList.vue';
|
|
18
15
|
|
|
19
|
-
import
|
|
20
|
-
|
|
16
|
+
import { defineComponent } from 'vue'
|
|
17
|
+
import { Category } from '@/store/class/general/category';
|
|
18
|
+
export default defineComponent({
|
|
21
19
|
components: {
|
|
22
20
|
PodcastList,
|
|
23
21
|
},
|
|
24
22
|
props: {
|
|
25
|
-
|
|
26
|
-
sizeRoute: { default: 12 as number},
|
|
27
|
-
iabId: { default: undefined as number|undefined},
|
|
23
|
+
iabId: { default: undefined, type: Number},
|
|
28
24
|
},
|
|
29
25
|
|
|
30
26
|
data() {
|
|
@@ -33,30 +29,29 @@ export default Vue.extend({
|
|
|
33
29
|
};
|
|
34
30
|
},
|
|
35
31
|
|
|
36
|
-
mounted() {
|
|
37
|
-
this.extractTitle();
|
|
38
|
-
},
|
|
39
|
-
|
|
40
32
|
computed: {
|
|
41
|
-
categories():
|
|
33
|
+
categories(): Array<Category> {
|
|
42
34
|
return this.$store.state.categories;
|
|
43
35
|
},
|
|
44
36
|
filterOrga(): string {
|
|
45
37
|
return this.$store.state.filter.organisationId;
|
|
46
38
|
},
|
|
47
39
|
},
|
|
40
|
+
watch: {
|
|
41
|
+
iabId(): void {
|
|
42
|
+
this.extractTitle();
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
mounted() {
|
|
47
|
+
this.extractTitle();
|
|
48
|
+
},
|
|
48
49
|
methods: {
|
|
49
50
|
extractTitle(): void {
|
|
50
|
-
const matchCategories = this.categories.filter((c:
|
|
51
|
+
const matchCategories = this.categories.filter((c: Category) => c.id === this.iabId);
|
|
51
52
|
if (1 !== matchCategories.length) return;
|
|
52
53
|
this.title = matchCategories[0]['name'];
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
watch: {
|
|
57
|
-
iabId(): void {
|
|
58
|
-
this.extractTitle();
|
|
59
54
|
},
|
|
60
55
|
},
|
|
61
|
-
})
|
|
62
|
-
</script>
|
|
56
|
+
})
|
|
57
|
+
</script>
|