@saooti/octopus-sdk 30.0.76 → 30.0.79

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 CHANGED
@@ -572,4 +572,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
572
572
  * 30.0.73 Ajout classe css
573
573
  * 30.0.74 Error locales en allemand (je sens que ça va être fun cette histoire)
574
574
  * 30.0.75 Parlement
575
- * 30.0.76 Space
575
+ * 30.0.76 Space
576
+ * 30.0.77 V-Calendar bloque version
577
+ * 30.0.78 a -> word-break
578
+ * 30.0.79 DownloadId player
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "30.0.76",
3
+ "version": "30.0.79",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -15,7 +15,7 @@
15
15
  "main": "./dist/octopus.common.js",
16
16
  "dependencies": {
17
17
  "@popperjs/core": "^2.11.0",
18
- "@saooti/octopus-api": "^0.30.4",
18
+ "@saooti/octopus-api": "^0.30.5",
19
19
  "@vue/cli": "^5.0.0-rc.1",
20
20
  "@vue/compat": "^3.2.26",
21
21
  "axios": "^0.24.0",
@@ -31,7 +31,7 @@
31
31
  "qrcode.vue": "^3.3.3",
32
32
  "sass": "^1.43.4",
33
33
  "sass-loader": "^12.3.0",
34
- "v-calendar": "^3.0.0-alpha.6",
34
+ "v-calendar": "3.0.0-alpha.6",
35
35
  "vue": "^3.2.21",
36
36
  "vue-i18n": "^9.2.0-beta.17",
37
37
  "vue-multiselect": "^3.0.0-alpha.2",
@@ -13,6 +13,9 @@ body{
13
13
  overscroll-behavior-y: contain;
14
14
  }
15
15
  .octopus-app{
16
+ a{
17
+ word-break: break-word;
18
+ }
16
19
  h1{
17
20
  margin-bottom: 2rem;
18
21
  }
@@ -29,7 +29,7 @@
29
29
  >
30
30
  <audio
31
31
  id="audio-player"
32
- :src="!live? audioUrl: undefined"
32
+ :src="!live? audioUrlToPlay: undefined"
33
33
  autoplay
34
34
  @timeupdate="onTimeUpdate"
35
35
  @ended="onFinished"
@@ -108,6 +108,7 @@ export default defineComponent({
108
108
  hlsReady: false as boolean,
109
109
  comments: [] as Array<CommentPodcast>,
110
110
  showTimeline: false as boolean,
111
+ audioUrlToPlay: "" as string
111
112
  };
112
113
  },
113
114
  computed: {
@@ -141,7 +142,6 @@ export default defineComponent({
141
142
  if (this.listenError) return this.podcast.audioStorageUrl;
142
143
  const parameters = [];
143
144
  parameters.push('origin=octopus');
144
- parameters.push('cookieName=player_' + this.podcast.podcastId);
145
145
  parameters.push('listenerId='+this.getListenerId());
146
146
  if (
147
147
  this.$store.state.authentication &&
@@ -151,7 +151,7 @@ export default defineComponent({
151
151
  'distributorId=' + this.$store.state.authentication.organisationId
152
152
  );
153
153
  }
154
- return this.podcast.audioUrl + '?' + parameters.join('&');
154
+ return '?' + parameters.join('&');
155
155
  },
156
156
  organisationId(): string|undefined {
157
157
  return state.generalParameters.organisationId;
@@ -202,8 +202,16 @@ export default defineComponent({
202
202
  commentsLoaded(): void {
203
203
  this.initComments(true);
204
204
  },
205
- audioUrl(): void{
205
+ async audioUrl(): Promise<void>{
206
206
  this.playerError = false;
207
+ if(this.media || !this.podcast || !this.podcast.availability.visibility ||this.listenError){
208
+ this.audioUrlToPlay = this.audioUrl;
209
+ }
210
+ if(!this.podcast){return;}
211
+ const response = await octopusApi.fetchPodcastDownloadUrl("podcast/download/register/"+this.podcast.podcastId+".mp3"+ this.audioUrl);
212
+ this.setCookie("player_"+this.podcast.podcastId, response.downloadId.toString(), ';domain='+this.getDomain());
213
+ this.setDownloadId(response.downloadId.toString());
214
+ this.audioUrlToPlay = response.location;
207
215
  }
208
216
  },
209
217
 
@@ -216,16 +224,19 @@ export default defineComponent({
216
224
  stopPlayer(): void {
217
225
  this.$store.commit('playerPlayPodcast');
218
226
  },
227
+ getDomain(): string{
228
+ let domain = "";
229
+ const domainArray: RegExpExecArray | null = /\.(.+)/.exec(window.location.host);
230
+ if(domainArray && null !== domainArray){
231
+ domain = domainArray[1];
232
+ }
233
+ return domain;
234
+ },
219
235
  getListenerId(): string{
220
236
  let listenerId = this.getCookie("octopus_listenerId");
221
237
  if(!listenerId){
222
238
  listenerId = new Date().valueOf().toString() + Math.random();
223
- let domain = "";
224
- const domainArray: RegExpExecArray | null = /\.(.+)/.exec(window.location.host);
225
- if(domainArray && null !== domainArray){
226
- domain = domainArray[1];
227
- }
228
- this.setCookie("octopus_listenerId", listenerId, ';domain='+domain);
239
+ this.setCookie("octopus_listenerId", listenerId, ';domain='+this.getDomain());
229
240
  }
230
241
  return listenerId;
231
242
  },
@@ -12,7 +12,7 @@ const state:paramStore = {
12
12
  isPlaylist: false,
13
13
  isProduction: true,
14
14
  isContribution: true,
15
- ApiUri: 'https://api.staging.saooti.org/',
15
+ ApiUri: 'https://api.preprod.saooti.org/',
16
16
  podcastmaker: false,
17
17
  buttonPlus: true,
18
18
  allCategories: [],
@@ -26,10 +26,10 @@ const state:paramStore = {
26
26
  SharePlayer: true,
27
27
  ShareButtons: true,
28
28
  ShareDistribution: true,
29
- MiniplayerUri: 'https://playerbeta.staging.saooti.org/',
29
+ MiniplayerUri: 'https://playerbeta.preprod.saooti.org/',
30
30
  ouestFranceStyle: false,
31
31
  downloadButton: false,
32
- hlsUri: 'https://hls.staging.saooti.org/',
32
+ hlsUri: 'https://hls.preprod.saooti.org/',
33
33
  mainRubrique: 0,
34
34
  resourceUrl: undefined
35
35
  },
@@ -85,10 +85,10 @@ const state:paramStore = {
85
85
  userName: '',
86
86
  },
87
87
  octopusApi: {
88
- url: 'http://api.staging.saooti.org/',
89
- commentsUrl: 'http://comments.staging.saooti.org/',
90
- studioUrl: 'http://studio.staging.saooti.org/',
91
- playerUrl: 'https://playerbeta.staging.saooti.org/',
88
+ url: 'http://api.preprod.saooti.org/',
89
+ commentsUrl: 'http://comments.preprod.saooti.org/',
90
+ studioUrl: 'http://studio.preprod.saooti.org/',
91
+ playerUrl: 'https://playerbeta.preprod.saooti.org/',
92
92
  organisationId: undefined,
93
93
  rubriqueIdFilter: undefined,
94
94
  },