@saooti/octopus-sdk 34.0.5 → 34.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "34.0.5",
3
+ "version": "34.0.7",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -16,7 +16,7 @@
16
16
  "test": "jest --coverage"
17
17
  },
18
18
  "dependencies": {
19
- "@saooti/octopus-api": "^0.34.0",
19
+ "@saooti/octopus-api": "^0.34.1",
20
20
  "@vue/cli": "^5.0.8",
21
21
  "@vue/compat": "^3.2.45",
22
22
  "autoprefixer": "^10.4.13",
@@ -112,6 +112,7 @@ export default defineComponent({
112
112
  emissionId: this.emission.emissionId,
113
113
  first: 0,
114
114
  size: 0,
115
+ includeStatus:["READY","PROCESSING"]
115
116
  }, true);
116
117
  if (0 === data.count) {
117
118
  this.activeEmission = false;
@@ -209,6 +209,7 @@ export default defineComponent({
209
209
  const data = await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',{
210
210
  emissionId: this.emission.emissionId,
211
211
  size: nb,
212
+ includeStatus:["READY","PROCESSING"]
212
213
  }, true);
213
214
  if (0 === data.count) {
214
215
  this.activeEmission = false;
@@ -9,7 +9,7 @@
9
9
  id="rows-per-page-select"
10
10
  :value="rowsPerPage"
11
11
  class="c-hand p-1 mx-2"
12
- @change="$emit('update:rowsPerPage',$event.target.value)"
12
+ @change="$emit('update:rowsPerPage',parseInt($event.target.value,10))"
13
13
  >
14
14
  <option
15
15
  v-for="option in optionsRowsPerPage"
@@ -104,7 +104,7 @@ export default defineComponent({
104
104
 
105
105
  data() {
106
106
  return {
107
- optionsRowsPerPage: [5, 10, 15, 20, 25 , 30, 50] as Array<number>,
107
+ optionsRowsPerPage: [10, 20, 30, 40, 50, 60] as Array<number>,
108
108
  };
109
109
  },
110
110
 
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  v-if="notEmpty"
4
- class="p-3"
4
+ class="py-3"
5
5
  >
6
6
  <h2 class="mb-0 mt-3">
7
7
  {{ $t('All live emission button') }}
@@ -111,6 +111,7 @@ export default defineComponent({
111
111
  participantId: this.participant.participantId,
112
112
  first: 0,
113
113
  size: 0,
114
+ includeStatus:["READY","PROCESSING"]
114
115
  }, true);
115
116
  if (0 === data.count) {
116
117
  this.activeParticipant = false;
@@ -4,7 +4,7 @@
4
4
  v-model:first="dfirst"
5
5
  v-model:rowsPerPage="dsize"
6
6
  v-model:isMobile="isMobile"
7
- :text-count="displayCount > 1 ? `${$t('Number playlists', { nb: displayCount })} ${$t('sort by score')}`: undefined"
7
+ :text-count="displayCount > 1 ? `${$t('Number playlists', { nb: displayCount })}`: undefined"
8
8
  :total-count="totalCount"
9
9
  :loading="loading"
10
10
  :loading-text="loading?$t('Loading content ...'):undefined"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="p-3">
2
+ <div class="py-3">
3
3
  <h2>{{ titleFilter }}</h2>
4
4
  <div class="d-flex align-items-center flex-wrap mb-2">
5
5
  <div
@@ -27,6 +27,8 @@
27
27
  :organisation-id="productorId"
28
28
  :reload="reloadList"
29
29
  :include-hidden="editRight"
30
+ :showCount="showCount"
31
+ :displaySortText="false"
30
32
  @fetch="fetch"
31
33
  />
32
34
  </div>
@@ -53,6 +55,7 @@ export default defineComponent({
53
55
  reload: { default: false, type: Boolean},
54
56
  editRight: { default: false, type: Boolean},
55
57
  productorId: { default: undefined, type: String},
58
+ showCount: { default: false, type: Boolean },
56
59
  },
57
60
  emits: ['fetch'],
58
61
 
@@ -126,6 +126,9 @@ export default defineComponent({
126
126
  );
127
127
  },
128
128
  }),
129
+ authenticated(): boolean {
130
+ return (state.generalParameters.authenticated as boolean);
131
+ },
129
132
  mainRubrique(): boolean{
130
133
  return undefined!==state.podcastPage.mainRubrique && 0!==state.podcastPage.mainRubrique && (this.podcast?.rubriqueIds?.includes(state.podcastPage.mainRubrique) as boolean);
131
134
  },
@@ -154,7 +157,8 @@ export default defineComponent({
154
157
  undefined!==this.podcast &&
155
158
  false !== this.podcast.valid &&
156
159
  ('READY_TO_RECORD' === this.podcast.processingStatus ||
157
- 'READY' === this.podcast.processingStatus) &&
160
+ 'READY' === this.podcast.processingStatus ||
161
+ ('PROCESSING' === this.podcast.processingStatus && !this.authenticated)) &&
158
162
  !this.isLiveToBeRecorded && undefined!==this.podcast.availability.visibility
159
163
  && this.podcast.availability.visibility
160
164
  );
@@ -295,6 +299,7 @@ export default defineComponent({
295
299
  color: white;
296
300
  text-transform: uppercase;
297
301
  position: absolute;
302
+ top:0;
298
303
  }
299
304
 
300
305
  .background-icon{
@@ -186,6 +186,7 @@ export default defineComponent({
186
186
  noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
187
187
  sort: this.popularSort ? 'POPULARITY' : 'DATE',
188
188
  query: this.query,
189
+ includeStatus:["READY","PROCESSING"]
189
190
  }, true);
190
191
  this.loading = false;
191
192
  this.totalCount = data.count;
@@ -64,6 +64,7 @@ export default defineComponent({
64
64
  after: { default: undefined, type: String},
65
65
  includeHidden: { default: false, type: Boolean},
66
66
  showCount: { default: false, type: Boolean },
67
+ displaySortText: { default: true, type: Boolean },
67
68
  sortCriteria: { default: undefined, type: String},
68
69
  notValid: { default: undefined , type: Boolean},
69
70
  rubriqueId: { default: () => [], type: Array as ()=>Array<number> },
@@ -103,6 +104,9 @@ export default defineComponent({
103
104
  return this.popularSort? "POPULARITY" : this.sortCriteria??'DATE';
104
105
  },
105
106
  sortText(): string {
107
+ if(!this.displaySortText){
108
+ return "";
109
+ }
106
110
  switch (this.sortCriteria) {
107
111
  case 'SCORE':return " "+this.$t('sort by score');
108
112
  case 'DATE':return " "+this.$t('sort by date');
@@ -154,7 +158,8 @@ export default defineComponent({
154
158
  rubriquageId: this.rubriquageId.length ? this.rubriquageId : undefined,
155
159
  includeHidden: this.includeHidden,
156
160
  validity: undefined !== this.notValid?!this.notValid: undefined,
157
- publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined
161
+ publisherId:this.notValid && !(state.generalParameters.isProduction as boolean)?this.$store.state.auth?.profile.userId:undefined,
162
+ includeStatus:["READY","PROCESSING"]
158
163
  };
159
164
  try {
160
165
  const data =await octopusApi.fetchDataWithParams<{count: number;result:Array<Podcast>;sort: string;}>(0, 'podcast/search',param, true);
@@ -149,6 +149,7 @@ export default defineComponent({
149
149
  noRubriquageId: this.noRubriquageId.length ? this.noRubriquageId : undefined,
150
150
  sort: this.popularSort ? 'POPULARITY' : 'DATE',
151
151
  query: this.query,
152
+ includeStatus:["READY","PROCESSING"]
152
153
  }, true);
153
154
  this.allPodcasts = this.allPodcasts.concat(
154
155
  data.result.filter((pod: Podcast|null) => null !== pod)
@@ -65,9 +65,9 @@
65
65
  />
66
66
  </div>
67
67
  <button
68
- v-if="!radio"
69
- :title="$t('Enlarge')"
70
- class="btn play-button-box btn-transparent text-light saooti-up"
68
+ :title="''!=transcriptText ? $t('View transcript'): $t('Enlarge')"
69
+ class="btn play-button-box btn-transparent text-light"
70
+ :class="''!=transcriptText ? 'saooti-text-to-speech':'saooti-up'"
71
71
  @click="changePlayerLargeVersion"
72
72
  />
73
73
  <button
@@ -158,7 +158,7 @@ export const playerLogic = defineComponent({
158
158
  getAudioUrl(): string{
159
159
  if (this.media) return this.media.audioUrl? this.media.audioUrl:"";
160
160
  if (!this.podcast) return '';
161
- if (!this.podcast.availability.visibility)
161
+ if (!this.podcast.availability.visibility || "PROCESSING"===this.podcast.processingStatus)
162
162
  return this.podcast.audioStorageUrl;
163
163
  if (this.listenError) return this.podcast.audioStorageUrl;
164
164
  return this.getAudioUrlParameters();
@@ -66,6 +66,7 @@
66
66
  :emission-id="emissionId"
67
67
  />
68
68
  <PodcastFilterList
69
+ :showCount="true"
69
70
  :emission-id="emissionId"
70
71
  :category-filter="false"
71
72
  :edit-right="editRight"
@@ -1,7 +1,5 @@
1
1
  <template>
2
2
  <div class="page-box">
3
- <button @click="playRadio">Radio</button>
4
- <button @click="playRadioBis">RadioBis</button>
5
3
  <template v-if="0 === rubriquageFilter.length">
6
4
  <PodcastInlineList
7
5
  v-for="c in categories"
@@ -90,22 +88,6 @@ export default defineComponent({
90
88
  }
91
89
  this.rubriqueId = rubriqueId;
92
90
  },
93
- playRadio(){
94
- this.$store.commit('player/playPodcast', {
95
- canalId: 3,
96
- url: "https://c6884219-e191-45ec-a931-6f34683c6ac7.stream.dev2.saooti.org/live.m3u8",
97
- metadata : ""
98
- });
99
-
100
- },
101
- playRadioBis(){
102
- this.$store.commit('player/playPodcast', {
103
- canalId: 1,
104
- url: "https://79a52b6b-8475-42f9-9c48-7f7460202649.stream.dev2.saooti.org/live.m3u8",
105
- metadata : ""
106
- });
107
-
108
- }
109
91
  }
110
92
  })
111
93
  </script>
@@ -46,6 +46,7 @@
46
46
  :name="name"
47
47
  :category-filter="true"
48
48
  :reload="reload"
49
+ :showCount="true"
49
50
  />
50
51
  <PodcastList
51
52
  v-else
package/src/locale/de.ts CHANGED
@@ -309,4 +309,5 @@ export default{
309
309
  "If the transcript is available, show it":"Wenn die Abschrift vorhanden ist, zeigen Sie sie",
310
310
  "Photo credits":"Bildnachweis",
311
311
  "Audio credits":"Audio-Credits",
312
+ "View transcript":"Transkript ansehen",
312
313
  }
package/src/locale/en.ts CHANGED
@@ -316,4 +316,5 @@ export default{
316
316
  "If the transcript is available, show it":"If the transcript is available, show it",
317
317
  "Photo credits":"Photo credits",
318
318
  "Audio credits":"Audio credits",
319
+ "View transcript":"View transcript",
319
320
  };
package/src/locale/es.ts CHANGED
@@ -309,4 +309,5 @@ export default{
309
309
  "If the transcript is available, show it":"Si la transcripción está disponible, muéstrela",
310
310
  "Photo credits":"Créditos fotográficos",
311
311
  "Audio credits":"Créditos de audio",
312
+ "View transcript":"Ver transcripción",
312
313
  }
package/src/locale/fr.ts CHANGED
@@ -316,4 +316,5 @@ export default{
316
316
  "If the transcript is available, show it":"Si la transcription est disponible, l'afficher",
317
317
  "Photo credits":"Crédits photo",
318
318
  "Audio credits":"Crédits audio",
319
+ "View transcript":"Afficher la transcription",
319
320
  };
package/src/locale/it.ts CHANGED
@@ -306,4 +306,5 @@ export default{
306
306
  "If the transcript is available, show it":"Se la trascrizione è disponibile, mostrala",
307
307
  "Photo credits":"Crediti fotografici",
308
308
  "Audio credits":"Crediti audio",
309
+ "View transcript":"Visualizza trascrizione",
309
310
  };
package/src/locale/sl.ts CHANGED
@@ -309,4 +309,5 @@ export default{
309
309
  "If the transcript is available, show it":"Če je prepis na voljo, ga pokažite",
310
310
  "Photo credits":"Avtorji fotografij",
311
311
  "Audio credits":"Avdio krediti",
312
+ "View transcript":"Ogled prepisa",
312
313
  }
@@ -0,0 +1,33 @@
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,72 +1,76 @@
1
- import { createStore } from 'vuex'
2
- import { AppStoreData } from './classStore/typeAppStore';
1
+ import { createStore, MutationTree } from 'vuex';
2
+ import ApiStore from '@/store/ApiStore';
3
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
+ };
4
69
  export default createStore({
5
70
  state: AppStoreData(),
6
71
  modules: {
72
+ api : ApiStore,
7
73
  player: PlayerStore
8
74
  },
9
- mutations: {
10
- categoriesSet(state, categories) {
11
- state.categories = categories;
12
- },
13
- categoriesOrgaSet(state, categories) {
14
- state.categoriesOrga = categories;
15
- },
16
- filterOrga(state, filter) {
17
- state.filter.organisationId = filter.orgaId;
18
- if (filter.imgUrl || !filter.orgaId) {
19
- state.filter.imgUrl = filter.imgUrl;
20
- }
21
- if (filter.name || !filter.orgaId) {
22
- state.filter.name = filter.name;
23
- }
24
- if(filter.rubriquageArray){
25
- state.filter.rubriquageArray = filter.rubriquageArray;
26
- }
27
- state.filter.live = filter.isLive;
28
- state.filter.iab = undefined;
29
- },
30
- filterIab(state, iab) {
31
- state.filter.iab = iab;
32
- },
33
- filterRubrique(state, rubriqueFilter) {
34
- state.filter.rubriqueFilter = rubriqueFilter;
35
- },
36
- filterRubriqueDisplay(state, rubriques) {
37
- state.filter.rubriqueDisplay = rubriques;
38
- },
39
- filterMedia(state, filter) {
40
- if (filter.type) {
41
- state.filter.typeMedia = filter.type;
42
- }
43
- if (filter.order) {
44
- state.filter.sortOrder = filter.order;
45
- }
46
- if (filter.field) {
47
- state.filter.sortField = filter.field;
48
- }
49
- },
50
- initFilter(state, data) {
51
- state.filter = {
52
- ...state.filter,
53
- ...data,
54
- };
55
- },
56
- liveUpdate(state, isBeforeLive) {
57
- state.liveUpdate.isBeforeLive = isBeforeLive;
58
- },
59
- setCommentIdentity(state, identity) {
60
- state.comments.knownIdentity = identity;
61
- },
62
- setCommentLoaded(state, data) {
63
- state.comments.actualPodcastId = data.podcastId;
64
- state.comments.loadedComments = data.comments;
65
- },
66
- isEducation(state, isEducation) {
67
- state.general.education = isEducation;
68
- state.general.logoUrl = '/img/logo_education.webp';
69
- state.general.metaTitle = 'RadioEducation.org';
70
- },
71
- },
75
+ mutations: mutations,
72
76
  });
@@ -0,0 +1,43 @@
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,11 +1,12 @@
1
1
  import { Category } from '../class/general/category';
2
2
  import { CommentPodcast } from '../class/general/comment';
3
- import { Player } from '../class/general/player';
4
3
  import { Rubriquage } from '../class/rubrique/rubriquage';
5
4
  import { RubriquageFilter } from '../class/rubrique/rubriquageFilter';
6
5
  import { Rubrique } from '../class/rubrique/rubrique';
6
+ import { ApiState } from './typeApiStore';
7
7
  import { AuthState } from './typeAuthStore';
8
8
  import { getDefaultPlayerState } from './typePlayerStore';
9
+ import { Player } from '../class/general/player';
9
10
 
10
11
  export interface Filter{
11
12
  organisationId: string | undefined;
@@ -41,6 +42,7 @@ export interface StoreState {
41
42
  };
42
43
  player: Player;
43
44
  auth?: AuthState;
45
+ api?: ApiState;
44
46
  }
45
47
 
46
48
  export function AppStoreData(): StoreState {
@@ -4,14 +4,14 @@ import { Category } from './class/general/category';
4
4
  const state:ParamStore = {
5
5
  generalParameters: {
6
6
  organisationId:'ecbd98d9-79bd-4312-ad5e-fc7c1c4a191c',
7
- authenticated: true,
8
- isAdmin: true,
9
- isRoleLive: true,
10
- isCommments: true,
11
- isOrganisation: true,
12
- isPlaylist: true,
13
- isProduction: true,
14
- isContribution: true,
7
+ authenticated: false,
8
+ isAdmin: false,
9
+ isRoleLive: false,
10
+ isCommments: false,
11
+ isOrganisation: false,
12
+ isPlaylist: false,
13
+ isProduction: false,
14
+ isContribution: false,
15
15
  ApiUri: 'https://api.dev2.saooti.org/',
16
16
  podcastmaker: false,
17
17
  buttonPlus: true,