@saooti/octopus-sdk 32.0.29 → 32.0.30
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 +2 -1
- package/package.json +1 -1
- package/src/components/display/sharing/PlayerParameters.vue +19 -3
- package/src/components/display/sharing/SharePlayer.vue +35 -8
- package/src/components/form/ClassicLoading.vue +2 -2
- package/src/locale/de.ts +1 -0
- package/src/locale/en.ts +1 -0
- package/src/locale/es.ts +1 -0
- package/src/locale/fr.ts +1 -0
- package/src/locale/it.ts +1 -0
- package/src/locale/sl.ts +1 -0
package/README.md
CHANGED
package/package.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
/>
|
|
83
83
|
</div>
|
|
84
84
|
<div
|
|
85
|
-
v-
|
|
85
|
+
v-if="displayArticleParam"
|
|
86
86
|
class="d-flex flex-column flex-grow-1"
|
|
87
87
|
>
|
|
88
88
|
<ClassicCheckbox
|
|
@@ -91,6 +91,16 @@
|
|
|
91
91
|
:label="$t('Display associated article')"
|
|
92
92
|
/>
|
|
93
93
|
</div>
|
|
94
|
+
<div
|
|
95
|
+
v-if="displayTranscriptParam"
|
|
96
|
+
class="d-flex flex-column flex-grow-1"
|
|
97
|
+
>
|
|
98
|
+
<ClassicCheckbox
|
|
99
|
+
v-model:textInit="displayTranscript"
|
|
100
|
+
id-checkbox="display-transcript-checkbox"
|
|
101
|
+
:label="$t('If the transcript is available, show it')"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
94
104
|
</div>
|
|
95
105
|
</div>
|
|
96
106
|
</div>
|
|
@@ -107,9 +117,11 @@ export default defineComponent({
|
|
|
107
117
|
props: {
|
|
108
118
|
isVisible: { default: false, type: Boolean},
|
|
109
119
|
choseNumberEpisode: {default: false, type: Boolean},
|
|
110
|
-
displayChoiceAllEpisodes: {default: false, type: Boolean}
|
|
120
|
+
displayChoiceAllEpisodes: {default: false, type: Boolean},
|
|
121
|
+
displayTranscriptParam: {default: false, type: Boolean},
|
|
122
|
+
displayArticleParam: {default: false, type: Boolean},
|
|
111
123
|
},
|
|
112
|
-
emits: ['episodeNumbers', 'proceedReading', 'isVisible', 'iFrameNumber', 'displayArticle'],
|
|
124
|
+
emits: ['episodeNumbers', 'proceedReading', 'isVisible', 'iFrameNumber', 'displayArticle', 'displayTranscript'],
|
|
113
125
|
|
|
114
126
|
data() {
|
|
115
127
|
return {
|
|
@@ -118,6 +130,7 @@ export default defineComponent({
|
|
|
118
130
|
iFrameNumberPriv: '3' as string,
|
|
119
131
|
isVisibleTemp: this.isVisible as boolean,
|
|
120
132
|
displayArticle: true as boolean,
|
|
133
|
+
displayTranscript:true as boolean,
|
|
121
134
|
};
|
|
122
135
|
},
|
|
123
136
|
computed: {
|
|
@@ -151,6 +164,9 @@ export default defineComponent({
|
|
|
151
164
|
},
|
|
152
165
|
displayArticle(): void{
|
|
153
166
|
this.$emit('displayArticle', this.displayArticle);
|
|
167
|
+
},
|
|
168
|
+
displayTranscript(): void{
|
|
169
|
+
this.$emit('displayTranscript', this.displayTranscript);
|
|
154
170
|
}
|
|
155
171
|
},
|
|
156
172
|
})
|
|
@@ -44,7 +44,10 @@
|
|
|
44
44
|
:is-visible="isVisible"
|
|
45
45
|
:chose-number-episode="displayChoiceAllEpisodes|| isLargeSuggestion"
|
|
46
46
|
:display-choice-all-episodes="displayChoiceAllEpisodes"
|
|
47
|
+
:displayTranscriptParam="displayTranscriptParam"
|
|
48
|
+
:displayArticleParam="displayArticleParam"
|
|
47
49
|
@displayArticle="displayArticle = $event"
|
|
50
|
+
@displayTranscript="displayTranscript = $event"
|
|
48
51
|
@episodeNumbers="episodeNumbers = $event"
|
|
49
52
|
@proceedReading="proceedReading = $event"
|
|
50
53
|
@isVisible="isVisible = $event"
|
|
@@ -119,17 +122,32 @@ export default defineComponent({
|
|
|
119
122
|
iFrameNumber: '3' as string,
|
|
120
123
|
isVisible: false as boolean,
|
|
121
124
|
displayArticle: true as boolean,
|
|
125
|
+
displayTranscript: true as boolean,
|
|
122
126
|
colors: ['#000000', '#ffffff'],
|
|
127
|
+
orgaAttributes: undefined as{[key: string]:string|number|boolean|undefined}|undefined,
|
|
123
128
|
};
|
|
124
129
|
},
|
|
125
130
|
|
|
126
131
|
computed: {
|
|
132
|
+
displayArticleParam():boolean{
|
|
133
|
+
return undefined!==this.podcast && undefined!==this.podcast.article && 0 !== this.podcast.article.length;
|
|
134
|
+
},
|
|
135
|
+
displayTranscriptParam():boolean{
|
|
136
|
+
return this.isTranscriptionAuthorize && (this.isDefault || this.isEmission);
|
|
137
|
+
},
|
|
138
|
+
isTranscriptionAuthorize(): boolean{
|
|
139
|
+
if(!this.orgaAttributes){return false;}
|
|
140
|
+
return this.orgaAttributes && Object.prototype.hasOwnProperty.call(this.orgaAttributes,'speechtotext.active')?(this.orgaAttributes['speechtotext.active'] as boolean): false;
|
|
141
|
+
},
|
|
127
142
|
displayChoiceAllEpisodes():boolean{
|
|
128
143
|
return !this.podcast || this.isEmission || this.isLargeEmission;
|
|
129
144
|
},
|
|
130
145
|
baseUrl(): string{
|
|
131
146
|
return (state.podcastPage.MiniplayerUri as string);
|
|
132
147
|
},
|
|
148
|
+
isDefault(): boolean {
|
|
149
|
+
return 'default' === this.iFrameModel;
|
|
150
|
+
},
|
|
133
151
|
isEmission(): boolean {
|
|
134
152
|
return 'emission' === this.iFrameModel;
|
|
135
153
|
},
|
|
@@ -193,6 +211,9 @@ export default defineComponent({
|
|
|
193
211
|
if(!this.displayArticle){
|
|
194
212
|
url.push('&article=false');
|
|
195
213
|
}
|
|
214
|
+
if(!this.displayTranscript){
|
|
215
|
+
url.push('&transcript=false');
|
|
216
|
+
}
|
|
196
217
|
if (this.isVisible) {
|
|
197
218
|
url.push('&key=' + window.btoa(this.dataTitle.toString()));
|
|
198
219
|
}
|
|
@@ -247,26 +268,32 @@ export default defineComponent({
|
|
|
247
268
|
return 0;
|
|
248
269
|
},
|
|
249
270
|
isPlayerParameter(): boolean{
|
|
250
|
-
return (!this.podcast ||
|
|
271
|
+
return (!this.podcast ||
|
|
272
|
+
(this.displayArticle) ||
|
|
273
|
+
this.isEmission || this.isLargeEmission || this.isLargeSuggestion ||
|
|
274
|
+
(this.displayTranscriptParam))
|
|
275
|
+
&& !this.playlist;
|
|
251
276
|
}
|
|
252
277
|
},
|
|
253
278
|
async created() {
|
|
279
|
+
await this.fetchOrgaAttributes();
|
|
254
280
|
await this.initColor();
|
|
255
281
|
if (this.isLiveReadyToRecord) {
|
|
256
282
|
this.iFrameModel = 'large';
|
|
257
283
|
}
|
|
258
284
|
},
|
|
259
285
|
methods: {
|
|
260
|
-
async
|
|
261
|
-
if (!this.authenticated) return;
|
|
262
|
-
let data;
|
|
286
|
+
async fetchOrgaAttributes(): Promise<void>{
|
|
263
287
|
if(this.$store.state.organisation?.attributes && Object.keys(this.$store.state.organisation.attributes).length > 1){
|
|
264
|
-
|
|
288
|
+
this.orgaAttributes = this.$store.state.organisation.attributes;
|
|
265
289
|
}else{
|
|
266
|
-
|
|
290
|
+
this.orgaAttributes= await octopusApi.fetchData<{[key:string]:string}>(0, 'organisation/attributes/'+this.myOrganisationId);
|
|
267
291
|
}
|
|
268
|
-
|
|
269
|
-
|
|
292
|
+
},
|
|
293
|
+
initColor(): void {
|
|
294
|
+
if(!this.orgaAttributes){return;}
|
|
295
|
+
this.color = Object.prototype.hasOwnProperty.call(this.orgaAttributes,'COLOR') ? (this.orgaAttributes.COLOR as string) : '#40a372';
|
|
296
|
+
this.theme = Object.prototype.hasOwnProperty.call(this.orgaAttributes,'THEME') ? (this.orgaAttributes.THEME as string) : '#000000';
|
|
270
297
|
},
|
|
271
298
|
},
|
|
272
299
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
v-if="loadingText"
|
|
4
|
-
class="d-flex justify-content-center"
|
|
4
|
+
class="d-flex align-items-center justify-content-center"
|
|
5
5
|
>
|
|
6
|
-
<div class="spinner-border me-3" />
|
|
6
|
+
<div class="spinner-border me-3 flex-shrink-0" />
|
|
7
7
|
<div class="h3 mt-2">
|
|
8
8
|
{{ loadingText }}
|
|
9
9
|
</div>
|
package/src/locale/de.ts
CHANGED
package/src/locale/en.ts
CHANGED
package/src/locale/es.ts
CHANGED
package/src/locale/fr.ts
CHANGED
package/src/locale/it.ts
CHANGED