@saooti/octopus-sdk 35.1.7 → 35.2.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.
Files changed (167) hide show
  1. package/package.json +3 -3
  2. package/src/App.vue +21 -12
  3. package/src/api/classicCrud.ts +6 -7
  4. package/src/components/display/categories/CategoryChooser.vue +5 -3
  5. package/src/components/display/categories/CategoryFilter.vue +25 -28
  6. package/src/components/display/categories/CategoryList.vue +19 -18
  7. package/src/components/display/comments/AddCommentModal.vue +5 -2
  8. package/src/components/display/comments/CommentBasicView.vue +1 -1
  9. package/src/components/display/comments/CommentInput.vue +17 -12
  10. package/src/components/display/comments/CommentItem.vue +10 -6
  11. package/src/components/display/comments/CommentList.vue +5 -5
  12. package/src/components/display/comments/CommentParentInfo.vue +1 -1
  13. package/src/components/display/comments/CommentPlayer.vue +8 -5
  14. package/src/components/display/comments/CommentSection.vue +10 -7
  15. package/src/components/display/edit/EditBox.vue +1 -1
  16. package/src/components/display/edit/EditCommentBox.vue +1 -1
  17. package/src/components/display/emission/EmissionChooser.vue +1 -1
  18. package/src/components/display/emission/EmissionInlineList.vue +4 -4
  19. package/src/components/display/emission/EmissionItem.vue +5 -5
  20. package/src/components/display/emission/EmissionList.vue +9 -6
  21. package/src/components/display/emission/EmissionPlayerItem.vue +26 -20
  22. package/src/components/display/filter/AdvancedSearch.vue +3 -3
  23. package/src/components/display/filter/CategorySearchFilter.vue +11 -11
  24. package/src/components/display/filter/ProductorSearch.vue +13 -12
  25. package/src/components/display/filter/RubriqueChoice.vue +2 -2
  26. package/src/components/display/filter/RubriqueFilter.vue +15 -17
  27. package/src/components/display/list/ListPaginate.vue +1 -1
  28. package/src/components/display/live/LiveHorizontalList.vue +1 -1
  29. package/src/components/display/live/LiveItem.vue +13 -11
  30. package/src/components/display/live/LiveList.vue +8 -8
  31. package/src/components/display/organisation/OrganisationChooser.vue +6 -4
  32. package/src/components/display/organisation/OrganisationChooserLight.vue +1 -1
  33. package/src/components/display/participant/ParticipantItem.vue +5 -5
  34. package/src/components/display/participant/ParticipantList.vue +5 -2
  35. package/src/components/display/playlist/PlaylistItem.vue +7 -4
  36. package/src/components/display/playlist/PlaylistList.vue +6 -4
  37. package/src/components/display/playlist/PodcastList.vue +3 -3
  38. package/src/components/display/playlist/PodcastPlaylistInlineList.vue +3 -3
  39. package/src/components/display/podcasts/AnimatorsItem.vue +6 -3
  40. package/src/components/display/podcasts/ParticipantDescription.vue +6 -3
  41. package/src/components/display/podcasts/PodcastFilterList.vue +2 -2
  42. package/src/components/display/podcasts/PodcastImage.vue +17 -21
  43. package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
  44. package/src/components/display/podcasts/PodcastInlineListClassic.vue +7 -7
  45. package/src/components/display/podcasts/PodcastInlineListTemplate.vue +17 -13
  46. package/src/components/display/podcasts/PodcastItem.vue +2 -2
  47. package/src/components/display/podcasts/PodcastItemInfo.vue +4 -4
  48. package/src/components/display/podcasts/PodcastList.vue +10 -5
  49. package/src/components/display/podcasts/PodcastModuleBox.vue +5 -5
  50. package/src/components/display/podcasts/PodcastPlayBar.vue +12 -11
  51. package/src/components/display/podcasts/PodcastSwiperList.vue +7 -7
  52. package/src/components/display/rubriques/RubriqueChooser.vue +1 -1
  53. package/src/components/display/rubriques/RubriqueList.vue +16 -18
  54. package/src/components/display/sharing/QrCode.vue +10 -6
  55. package/src/components/display/sharing/ShareButtons.vue +4 -4
  56. package/src/components/display/sharing/ShareButtonsIntern.vue +4 -4
  57. package/src/components/display/sharing/ShareDistribution.vue +2 -2
  58. package/src/components/display/sharing/SharePlayer.vue +9 -6
  59. package/src/components/display/sharing/SharePlayerTypes.vue +6 -6
  60. package/src/components/display/sharing/SubscribeButtons.vue +1 -1
  61. package/src/components/misc/Footer.vue +21 -14
  62. package/src/components/misc/HomeDropdown.vue +7 -4
  63. package/src/components/misc/LeftMenu.vue +21 -22
  64. package/src/components/misc/TopBar.vue +23 -26
  65. package/src/components/misc/modal/ClipboardModal.vue +2 -2
  66. package/src/components/misc/modal/NewsletterModal.vue +12 -9
  67. package/src/components/misc/modal/ShareModalPlayer.vue +1 -1
  68. package/src/components/misc/player/Player.vue +17 -15
  69. package/src/components/misc/player/PlayerCompact.vue +5 -5
  70. package/src/components/misc/player/PlayerLarge.vue +1 -1
  71. package/src/components/misc/player/PlayerProgressBar.vue +9 -9
  72. package/src/components/misc/player/PlayerTimeline.vue +2 -2
  73. package/src/components/mixins/handle403.ts +6 -1
  74. package/src/components/mixins/imageProxy.ts +1 -1
  75. package/src/components/mixins/init.ts +7 -4
  76. package/src/components/mixins/orgaComputed.ts +4 -4
  77. package/src/components/mixins/organisationFilter.ts +8 -5
  78. package/src/components/mixins/player/playerComment.ts +24 -33
  79. package/src/components/mixins/player/playerDisplay.ts +38 -67
  80. package/src/components/mixins/player/playerLive.ts +16 -15
  81. package/src/components/mixins/player/playerLogic.ts +54 -64
  82. package/src/components/mixins/player/playerTranscript.ts +16 -10
  83. package/src/components/pages/Category.vue +8 -10
  84. package/src/components/pages/Emission.vue +3 -3
  85. package/src/components/pages/Emissions.vue +10 -7
  86. package/src/components/pages/Error403Page.vue +5 -2
  87. package/src/components/pages/Home.vue +17 -12
  88. package/src/components/pages/Lives.vue +13 -11
  89. package/src/components/pages/PageNotFound.vue +11 -6
  90. package/src/components/pages/Participant.vue +3 -3
  91. package/src/components/pages/Participants.vue +2 -2
  92. package/src/components/pages/Playlist.vue +3 -3
  93. package/src/components/pages/Playlists.vue +2 -2
  94. package/src/components/pages/Podcast.vue +11 -8
  95. package/src/components/pages/Podcasts.vue +11 -9
  96. package/src/components/pages/Rubrique.vue +1 -1
  97. package/src/components/pages/Search.vue +1 -1
  98. package/src/main.ts +6 -4
  99. package/src/stores/ApiStore.ts +65 -0
  100. package/src/stores/AuthStore.ts +43 -0
  101. package/src/stores/CommentStore.ts +40 -0
  102. package/src/stores/FilterStore.ts +63 -0
  103. package/src/stores/GeneralStore.ts +40 -0
  104. package/src/stores/PlayerStore.ts +134 -0
  105. package/src/{store → stores}/class/general/playlist.ts +1 -1
  106. package/tsconfig.json +0 -1
  107. package/src/store/ApiStore.ts +0 -33
  108. package/src/store/AppStore.ts +0 -76
  109. package/src/store/PlayerStore.ts +0 -87
  110. package/src/store/classStore/typeApiStore.ts +0 -43
  111. package/src/store/classStore/typeAppStore.ts +0 -81
  112. package/src/store/classStore/typeAuthStore.ts +0 -44
  113. package/src/store/classStore/typePlayerStore.ts +0 -15
  114. package/src/vuex-shim.d.ts +0 -8
  115. /package/src/{store/paramStore.ts → stores/ParamSdkStore.ts} +0 -0
  116. /package/src/{store → stores}/class/adserver/adserverConfig.ts +0 -0
  117. /package/src/{store → stores}/class/adserver/adserverOtherEmission.ts +0 -0
  118. /package/src/{store → stores}/class/adserver/adserverTiming.ts +0 -0
  119. /package/src/{store → stores}/class/cartouchier/cartouche.ts +0 -0
  120. /package/src/{store → stores}/class/cartouchier/cartouchier.ts +0 -0
  121. /package/src/{store → stores}/class/conference/conference.ts +0 -0
  122. /package/src/{store → stores}/class/conference/conferenceMessage.ts +0 -0
  123. /package/src/{store → stores}/class/conference/conferenceParticipant.ts +0 -0
  124. /package/src/{store → stores}/class/conference/pad.ts +0 -0
  125. /package/src/{store → stores}/class/conference/studioCall.ts +0 -0
  126. /package/src/{store → stores}/class/contract/contract.ts +0 -0
  127. /package/src/{store → stores}/class/contract/contractOrganisation.ts +0 -0
  128. /package/src/{store → stores}/class/ftp/ftpEmission.ts +0 -0
  129. /package/src/{store → stores}/class/ftp/ftpParam.ts +0 -0
  130. /package/src/{store → stores}/class/ftp/testFtpEmission.ts +0 -0
  131. /package/src/{store → stores}/class/general/audioView.ts +0 -0
  132. /package/src/{store → stores}/class/general/category.ts +0 -0
  133. /package/src/{store → stores}/class/general/classicSelectType.ts +0 -0
  134. /package/src/{store → stores}/class/general/comment.ts +0 -0
  135. /package/src/{store → stores}/class/general/customPlayer.ts +0 -0
  136. /package/src/{store → stores}/class/general/emission.ts +0 -0
  137. /package/src/{store → stores}/class/general/fetchParam.ts +0 -0
  138. /package/src/{store → stores}/class/general/initState.ts +0 -0
  139. /package/src/{store → stores}/class/general/interfacePageable.ts +0 -0
  140. /package/src/{store → stores}/class/general/ituneCategory.ts +0 -0
  141. /package/src/{store → stores}/class/general/listReturn.ts +0 -0
  142. /package/src/{store → stores}/class/general/media.ts +0 -0
  143. /package/src/{store → stores}/class/general/organisation.ts +0 -0
  144. /package/src/{store → stores}/class/general/pageable.ts +0 -0
  145. /package/src/{store → stores}/class/general/participant.ts +0 -0
  146. /package/src/{store → stores}/class/general/player.ts +0 -0
  147. /package/src/{store → stores}/class/general/podcast.ts +0 -0
  148. /package/src/{store → stores}/class/general/sortPageable.ts +0 -0
  149. /package/src/{store → stores}/class/general/soundcastCategory.ts +0 -0
  150. /package/src/{store → stores}/class/ouestFrance/ofTag.ts +0 -0
  151. /package/src/{store → stores}/class/ouestFrance/ofTagInfo.ts +0 -0
  152. /package/src/{store → stores}/class/ouestFrance/ofTagPage.ts +0 -0
  153. /package/src/{store → stores}/class/ouestFrance/ofTagSeo.ts +0 -0
  154. /package/src/{store → stores}/class/ouestFrance/ofTagVente.ts +0 -0
  155. /package/src/{store → stores}/class/ouestFrance/ofTagWithParents.ts +0 -0
  156. /package/src/{store → stores}/class/rss/aggregator.ts +0 -0
  157. /package/src/{store → stores}/class/rss/rssEmission.ts +0 -0
  158. /package/src/{store → stores}/class/rss/rssInfo.ts +0 -0
  159. /package/src/{store → stores}/class/rubrique/rubriquage.ts +0 -0
  160. /package/src/{store → stores}/class/rubrique/rubriquageFilter.ts +0 -0
  161. /package/src/{store → stores}/class/rubrique/rubrique.ts +0 -0
  162. /package/src/{store → stores}/class/stat/statArrayIncome.ts +0 -0
  163. /package/src/{store → stores}/class/stat/statArrayObject.ts +0 -0
  164. /package/src/{store → stores}/class/stat/statGraph.ts +0 -0
  165. /package/src/{store → stores}/class/user/person.ts +0 -0
  166. /package/src/{store → stores}/class/user/profile.ts +0 -0
  167. /package/src/{store → stores}/class/user/userKeycloak.ts +0 -0
@@ -0,0 +1,40 @@
1
+ import { Category } from '@/stores/class/general/category';
2
+ import { CommentPodcast } from '@/stores/class/general/comment';
3
+ import { defineStore } from 'pinia';
4
+
5
+ interface GeneralState{
6
+ metaTitle: string;
7
+ platformEducation: boolean;
8
+ generalLogoUrl: string;
9
+ storedCategories: Array<Category>;
10
+ storedCategoriesOrga: Array<Category>;
11
+ isBeforeLive: boolean;
12
+ }
13
+ export const useGeneralStore = defineStore('GeneralStore', {
14
+ state: (): GeneralState => ({
15
+ metaTitle: 'Octopus by Saooti',
16
+ platformEducation:false,
17
+ generalLogoUrl: '/img/logo_octopus_final.svg',
18
+ storedCategories: [],
19
+ storedCategoriesOrga: [],
20
+ isBeforeLive: true,
21
+ }),
22
+ actions:{
23
+ storedUpdateCategories(categories: Array<Category>) {
24
+ this.storedCategories = categories;
25
+ },
26
+ storedUpdateCategoriesOrga(categories: Array<Category>) {
27
+ this.storedCategoriesOrga = categories;
28
+ },
29
+ isBeforeLiveUpdate(isBeforeLive: boolean) {
30
+ this.isBeforeLive = isBeforeLive;
31
+ },
32
+ platformUpdateEducation(isEducation: boolean) {
33
+ this.platformEducation = isEducation;
34
+ if(isEducation){
35
+ this.generalLogoUrl = '/img/logo_education.webp';
36
+ this.metaTitle = 'RadioEducation.org';
37
+ }
38
+ },
39
+ }
40
+ })
@@ -0,0 +1,134 @@
1
+ import DurationHelper from '../helper/duration';
2
+ import { Media } from '@/stores/class/general/media';
3
+ import { MediaRadio, Radio } from '@/stores/class/general/player';
4
+ import { Podcast } from '@/stores/class/general/podcast';
5
+ import { defineStore } from 'pinia';
6
+ interface Transcript{
7
+ actual: number,
8
+ actualText:string,
9
+ value : Array<{endTime: number, startTime:number, text: string}>
10
+ }
11
+ interface PlayerState{
12
+ playerStatus: string; //STOPPED, LOADING, PLAYING, PAUSED
13
+ playerPodcast: Podcast|undefined;
14
+ playerVolume?: number; //From 0 to 1
15
+ playerElapsed: number; //From 0 to 1
16
+ playerTotal: number;
17
+ playerMedia: Media|undefined;
18
+ playerLive: Podcast|undefined;
19
+ playerRadio: Radio|undefined;
20
+ playerStop?: boolean;
21
+ playerSeekTime?: number;
22
+ playerTranscript?:Transcript;
23
+ }
24
+ export const usePlayerStore = defineStore('PlayerStore', {
25
+ state: (): PlayerState => ({
26
+ playerStatus: 'STOPPED',
27
+ playerPodcast: undefined,
28
+ playerVolume: 1,
29
+ playerElapsed: 0,
30
+ playerTotal: 0,
31
+ playerMedia: undefined,
32
+ playerLive: undefined,
33
+ playerRadio: undefined,
34
+ playerSeekTime:0,
35
+ }),
36
+ getters: {
37
+ playedTime(): string{
38
+ if (this.playerElapsed && this.playerElapsed > 0 && this.playerTotal && this.playerTotal > 0) {
39
+ return DurationHelper.formatDuration(
40
+ Math.round(this.playerElapsed * this.playerTotal)
41
+ );
42
+ }
43
+ return '--:--';
44
+ },
45
+ totalTime(): string {
46
+ if (this.playerElapsed && this.playerElapsed > 0 && this.playerTotal && this.playerTotal > 0)
47
+ return DurationHelper.formatDuration(Math.round(this.playerTotal));
48
+ return '--:--';
49
+ },
50
+ isPlaying(): boolean {
51
+ return 'PLAYING' === this.playerStatus;
52
+ },
53
+ isPaused(): boolean {
54
+ return 'PAUSED' === this.playerStatus;
55
+ },
56
+ podcastImage(): string{
57
+ return this.playerPodcast?.imageUrl ?? "";
58
+ },
59
+ emissionName(): string {
60
+ return this.playerPodcast?.emission?.name ?? "";
61
+ },
62
+ transcriptText():string{
63
+ return this.playerTranscript?.actualText ?? "";
64
+ },
65
+ radioUrl(): string{
66
+ return this.playerRadio?.url ?? "";
67
+ }
68
+ },
69
+ actions: {
70
+ playerPlay(param?: any) {
71
+ if (!param) {
72
+ this.playerStatus = 'STOPPED';
73
+ this.playerPodcast = undefined;
74
+ this.playerMedia = undefined;
75
+ this.playerLive = undefined;
76
+ this.playerRadio = undefined;
77
+ this.playerElapsed = 0;
78
+ return;
79
+ }
80
+ if (
81
+ (this.playerPodcast && this.playerPodcast.podcastId === param.podcastId) ||
82
+ (this.playerMedia && this.playerMedia.mediaId === param.mediaId) ||
83
+ (this.playerLive && this.playerLive.conferenceId === param.conferenceId)
84
+ ) {
85
+ //Do nothing
86
+ return;
87
+ }
88
+ this.playerStatus = 'LOADING';
89
+ this.playerPodcast = undefined;
90
+ this.playerMedia = undefined;
91
+ this.playerLive = undefined;
92
+ this.playerRadio = undefined;
93
+ this.playerElapsed = 0;
94
+ if (
95
+ param.conferenceId &&
96
+ (!param.podcastId || param.processingStatus !== 'READY')
97
+ ) {
98
+ this.playerLive = param;
99
+ } else if (param.podcastId) {
100
+ this.playerPodcast = param;
101
+ } else if (param.mediaId) {
102
+ this.playerMedia = param;
103
+ }else if(param.canalId){
104
+ this.playerRadio = {...param,...{isInit: false}};
105
+ }
106
+ },
107
+
108
+ playerChangeStatus(isPause: boolean) {
109
+ if (isPause) {
110
+ this.playerStatus = 'PAUSED';
111
+ } else {
112
+ this.playerStatus = 'PLAYING';
113
+ }
114
+ },
115
+
116
+ playerUpdateSeekTime(seekTime: number){
117
+ this.playerSeekTime = seekTime;
118
+ },
119
+
120
+ playerMetadata(metadata: MediaRadio){
121
+ if(!this.playerRadio){return;}
122
+ this.playerRadio.metadata = metadata;
123
+ },
124
+
125
+ playerUpdateElapsed(elapsed: number, total:number){
126
+ this.playerElapsed = elapsed;
127
+ this.playerTotal = total;
128
+ },
129
+
130
+ playerUpdateTranscript(transcript?:Transcript) {
131
+ this.playerTranscript = transcript;
132
+ },
133
+ }
134
+ })
@@ -1,4 +1,4 @@
1
- import { Organisation } from '../general/organisation';
1
+ import { Organisation } from './organisation';
2
2
  import { Person } from '../user/person';
3
3
  import { FetchParam } from './fetchParam';
4
4
 
package/tsconfig.json CHANGED
@@ -39,6 +39,5 @@
39
39
  ],
40
40
  "files": [
41
41
  "src/shims-vue.d.ts",
42
- "src/vuex-shim.d.ts"
43
42
  ]
44
43
  }
@@ -1,33 +0,0 @@
1
- import { ApiState, getDefaultApiState } from './classStore/typeApiStore';
2
- import { Module, MutationTree } from 'vuex';
3
- import { StoreState } from './classStore/typeAppStore';
4
- const mutations = <MutationTree<ApiState>>{
5
- init(state, apiUrls: ApiState) {
6
- state.apiUrl= apiUrls.apiUrl;
7
- state.commentUrl= apiUrls.commentUrl;
8
- state.frontendUrl= apiUrls.frontendUrl;
9
- state.ftpUrl= apiUrls.ftpUrl;
10
- state.hlsUrl= apiUrls.hlsUrl;
11
- state.imageUrl= apiUrls.imageUrl;
12
- state.keycloakUrl= apiUrls.keycloakUrl;
13
- state.mediaUrl= apiUrls.mediaUrl;
14
- state.miniplayerUrl= apiUrls.miniplayerUrl;
15
- state.processorUrl= apiUrls.processorUrl;
16
- state.recoUrl= apiUrls.recoUrl;
17
- state.radioUrl= apiUrls.radioUrl;
18
- state.rssUrl= apiUrls.rssUrl;
19
- state.rtmpUrl= apiUrls.rtmpUrl;
20
- state.speechToTextUrl= apiUrls.speechToTextUrl;
21
- state.studioUrl= apiUrls.studioUrl;
22
- state.videoMakerUrl= apiUrls.videoMakerUrl;
23
- state.storageUrl= apiUrls.storageUrl;
24
- },
25
- };
26
-
27
- const ApiModule: Module<ApiState, StoreState> = {
28
- namespaced: true,
29
- state: getDefaultApiState(),
30
- mutations: mutations,
31
- };
32
-
33
- export default ApiModule;
@@ -1,76 +0,0 @@
1
- import { createStore, MutationTree } from 'vuex';
2
- import ApiStore from '@/store/ApiStore';
3
- import PlayerStore from '@/store/PlayerStore';
4
- import { AppStoreData, StoreState } from './classStore/typeAppStore';
5
-
6
- const mutations = <MutationTree<StoreState>>{
7
- categoriesSet(state, categories) {
8
- state.categories = categories;
9
- },
10
- categoriesOrgaSet(state, categories) {
11
- state.categoriesOrga = categories;
12
- },
13
- filterOrga(state, filter) {
14
- state.filter.organisationId = filter.orgaId;
15
- if (filter.imgUrl || !filter.orgaId) {
16
- state.filter.imgUrl = filter.imgUrl;
17
- }
18
- if (filter.name || !filter.orgaId) {
19
- state.filter.name = filter.name;
20
- }
21
- if(filter.rubriquageArray){
22
- state.filter.rubriquageArray = filter.rubriquageArray;
23
- }
24
- state.filter.live = filter.isLive;
25
- state.filter.iab = undefined;
26
- },
27
- filterIab(state, iab) {
28
- state.filter.iab = iab;
29
- },
30
- filterRubrique(state, rubriqueFilter) {
31
- state.filter.rubriqueFilter = rubriqueFilter;
32
- },
33
- filterRubriqueDisplay(state, rubriques) {
34
- state.filter.rubriqueDisplay = rubriques;
35
- },
36
- filterMedia(state, filter) {
37
- if (filter.type) {
38
- state.filter.typeMedia = filter.type;
39
- }
40
- if (filter.order) {
41
- state.filter.sortOrder = filter.order;
42
- }
43
- if (filter.field) {
44
- state.filter.sortField = filter.field;
45
- }
46
- },
47
- initFilter(state, data) {
48
- state.filter = {
49
- ...state.filter,
50
- ...data,
51
- };
52
- },
53
- liveUpdate(state, isBeforeLive) {
54
- state.liveUpdate.isBeforeLive = isBeforeLive;
55
- },
56
- setCommentIdentity(state, identity) {
57
- state.comments.knownIdentity = identity;
58
- },
59
- setCommentLoaded(state, data) {
60
- state.comments.actualPodcastId = data.podcastId;
61
- state.comments.loadedComments = data.comments;
62
- },
63
- isEducation(state, isEducation) {
64
- state.general.education = isEducation;
65
- state.general.logoUrl = '/img/logo_education.webp';
66
- state.general.metaTitle = 'RadioEducation.org';
67
- },
68
- };
69
- export default createStore({
70
- state: AppStoreData(),
71
- modules: {
72
- api : ApiStore,
73
- player: PlayerStore
74
- },
75
- mutations: mutations,
76
- });
@@ -1,87 +0,0 @@
1
- import { getDefaultPlayerState } from './classStore/typePlayerStore';
2
- import { Module, MutationTree } from 'vuex';
3
- import { StoreState } from './classStore/typeAppStore';
4
- import { Player } from './class/general/player';
5
-
6
- const mutations = <MutationTree<Player>>{
7
- playPodcast(state, podcast) {
8
- if (!podcast) {
9
- state.status = 'STOPPED';
10
- state.podcast = undefined;
11
- state.media = undefined;
12
- state.live = undefined;
13
- state.radio = undefined;
14
- state.elapsed = 0;
15
- return;
16
- }
17
- if (
18
- (state.podcast &&
19
- state.podcast.podcastId === podcast.podcastId) ||
20
- (state.media && state.media.mediaId === podcast.mediaId) ||
21
- (state.live &&
22
- state.live.conferenceId === podcast.conferenceId)
23
- ) {
24
- //Do nothing
25
- return;
26
- }
27
- state.status = 'LOADING';
28
- state.podcast = undefined;
29
- state.media = undefined;
30
- state.live = undefined;
31
- state.radio = undefined;
32
- state.elapsed = 0;
33
- if (
34
- podcast.conferenceId &&
35
- (!podcast.podcastId || podcast.processingStatus !== 'READY')
36
- ) {
37
- state.live = podcast;
38
- } else if (podcast.podcastId) {
39
- state.podcast = podcast;
40
- } else if (podcast.mediaId) {
41
- state.media = podcast;
42
- }else if(podcast.canalId){
43
- state.radio = {...podcast,...{isInit: false}};
44
- }
45
- },
46
-
47
- radioMetadata(state, metadata){
48
- if(!state.radio){return;}
49
- state.radio.metadata = metadata;
50
- },
51
-
52
- pause(state, pause) {
53
- if (pause) {
54
- state.status = 'PAUSED';
55
- } else {
56
- state.status = 'PLAYING';
57
- }
58
- },
59
-
60
- elapsed(state, elapsed) {
61
- state.elapsed = elapsed;
62
- },
63
-
64
- totalTime(state, total) {
65
- state.total = total;
66
- },
67
-
68
- volume(state, volume) {
69
- state.volume = volume;
70
- },
71
-
72
- seekTime(state, seekTime) {
73
- state.seekTime = seekTime;
74
- },
75
-
76
- transcript(state, transcript) {
77
- state.transcript = transcript;
78
- },
79
- };
80
-
81
- const PlayerModule: Module<Player, StoreState> = {
82
- namespaced: true,
83
- state: getDefaultPlayerState(),
84
- mutations: mutations,
85
- };
86
-
87
- export default PlayerModule;
@@ -1,43 +0,0 @@
1
-
2
- export interface ApiState {
3
- apiUrl: undefined,
4
- commentUrl: undefined,
5
- frontendUrl: undefined,
6
- ftpUrl: undefined,
7
- hlsUrl: undefined,
8
- imageUrl: undefined,
9
- keycloakUrl: undefined,
10
- mediaUrl: undefined,
11
- miniplayerUrl:undefined,
12
- processorUrl: undefined,
13
- radioUrl: undefined,
14
- recoUrl:undefined,
15
- rssUrl: undefined,
16
- rtmpUrl: undefined,
17
- speechToTextUrl: undefined,
18
- studioUrl: undefined,
19
- videoMakerUrl: undefined,
20
- storageUrl: undefined,
21
- }
22
- export function getDefaultApiState(): ApiState {
23
- return {
24
- apiUrl: undefined,
25
- commentUrl:undefined,
26
- frontendUrl: undefined,
27
- ftpUrl: undefined,
28
- hlsUrl: undefined,
29
- imageUrl: undefined,
30
- keycloakUrl: undefined,
31
- mediaUrl: undefined,
32
- miniplayerUrl:undefined,
33
- processorUrl: undefined,
34
- radioUrl: undefined,
35
- recoUrl:undefined,
36
- rssUrl: undefined,
37
- rtmpUrl: undefined,
38
- speechToTextUrl: undefined,
39
- studioUrl: undefined,
40
- videoMakerUrl: undefined,
41
- storageUrl: undefined,
42
- };
43
- }
@@ -1,81 +0,0 @@
1
- import { Category } from '../class/general/category';
2
- import { CommentPodcast } from '../class/general/comment';
3
- import { Rubriquage } from '../class/rubrique/rubriquage';
4
- import { RubriquageFilter } from '../class/rubrique/rubriquageFilter';
5
- import { Rubrique } from '../class/rubrique/rubrique';
6
- import { ApiState } from './typeApiStore';
7
- import { AuthState } from './typeAuthStore';
8
- import { getDefaultPlayerState } from './typePlayerStore';
9
- import { Player } from '../class/general/player';
10
-
11
- export interface Filter{
12
- organisationId: string | undefined;
13
- imgUrl: string | undefined;
14
- name: string | undefined;
15
- rubriquageArray: Array<Rubriquage>;
16
- rubriqueFilter: Array<RubriquageFilter>;
17
- rubriqueDisplay: Array<Rubrique>;
18
- typeMedia: string | undefined;
19
- sortOrder: string | undefined;
20
- sortField: string | undefined;
21
- live: boolean|undefined;
22
- iab: Category |undefined;
23
- }
24
-
25
- export interface StoreState {
26
- general: {
27
- metaTitle: string;
28
- education: boolean;
29
- logoUrl: string;
30
- };
31
- categories: Array<Category>;
32
- categoriesOrga: Array<Category>;
33
- filter: Filter;
34
- liveUpdate: {
35
- isBeforeLive: boolean;
36
- };
37
- comments: {
38
- knownIdentity: string | null;
39
- actualPodcastId: number;
40
- loadedComments: Array<CommentPodcast>;
41
- totalCount: number;
42
- };
43
- player: Player;
44
- auth?: AuthState;
45
- api?: ApiState;
46
- }
47
-
48
- export function AppStoreData(): StoreState {
49
- return {
50
- general: {
51
- metaTitle: 'Octopus by Saooti',
52
- education: false,
53
- logoUrl: '/img/logo_octopus_final.svg',
54
- },
55
- categories: [],
56
- categoriesOrga: [],
57
- filter: {
58
- organisationId: undefined,
59
- imgUrl: undefined,
60
- name:undefined,
61
- rubriquageArray: [],
62
- rubriqueFilter: [],
63
- rubriqueDisplay: [],
64
- typeMedia: undefined,
65
- sortOrder: undefined,
66
- sortField: undefined,
67
- live: false,
68
- iab: undefined,
69
- },
70
- liveUpdate: {
71
- isBeforeLive: true,
72
- },
73
- comments: {
74
- knownIdentity: null,
75
- actualPodcastId: 0,
76
- loadedComments: [],
77
- totalCount: 0,
78
- },
79
- player: getDefaultPlayerState(),
80
- };
81
- }
@@ -1,44 +0,0 @@
1
- import { Organisation } from "../class/general/organisation";
2
- import { Profile } from "../class/user/profile";
3
-
4
- export interface AuthState {
5
- name: string;
6
- organisationId: string | undefined;
7
- organisationName: string | undefined;
8
- role: Array<string>;
9
- oAuthParam: {
10
- accessToken: string | undefined;
11
- refreshToken: string | undefined;
12
- expiration: Date | undefined;
13
- };
14
- profile: Profile;
15
- organisation: Organisation;
16
- }
17
- export function getDefaultAuthState(): AuthState {
18
- return {
19
- name: '',
20
- organisationId: undefined,
21
- organisationName: undefined,
22
- role: [''],
23
- oAuthParam: {
24
- accessToken: undefined,
25
- refreshToken: undefined,
26
- expiration: undefined,
27
- },
28
- profile: {
29
- userId: '',
30
- },
31
- organisation: {
32
- id: '',
33
- name: '',
34
- imageUrl: '',
35
- description: undefined,
36
- monetisable: undefined,
37
- location: undefined,
38
- comments: undefined,
39
- attributes: {
40
- RSS_CONTACT: undefined,
41
- },
42
- },
43
- };
44
- }
@@ -1,15 +0,0 @@
1
- import { Player } from '../class/general/player';
2
-
3
- export function getDefaultPlayerState(): Player {
4
- return {
5
- status: 'STOPPED', //STOPPED, LOADING, PLAYING, PAUSED
6
- podcast: undefined,
7
- volume: 1, //From 0 to 1
8
- elapsed: 0, //From 0 to 1
9
- total: 0,
10
- media: undefined,
11
- live: undefined,
12
- radio: undefined,
13
- seekTime:0,
14
- };
15
- }
@@ -1,8 +0,0 @@
1
- //import { ComponentCustomProperties } from 'vue';
2
- import { Store } from 'vuex';
3
- import { StoreState } from './typeAppStore';
4
- declare module '@vue/runtime-core' {
5
- interface ComponentCustomProperties {
6
- $store: Store<StoreState>;
7
- }
8
- }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes