@saooti/octopus-sdk 31.0.18 → 31.0.19

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
@@ -594,3 +594,4 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
594
594
  * 31.0.16 Merge 30
595
595
  * 31.0.17 Bug divers
596
596
  * 31.0.18 Bug #11015
597
+ * 31.0.19 Add access_token player
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saooti/octopus-sdk",
3
- "version": "31.0.18",
3
+ "version": "31.0.19",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -13,6 +13,9 @@ body{
13
13
  overscroll-behavior-y: contain;
14
14
  }
15
15
  .octopus-app{
16
+ a{
17
+ word-break: break-all;
18
+ }
16
19
  h1{
17
20
  margin-bottom: 2rem;
18
21
  }
@@ -151,6 +151,9 @@ export default defineComponent({
151
151
  'distributorId=' + this.$store.state.authentication.organisationId
152
152
  );
153
153
  }
154
+ if("SECURED" === this.podcast.organisation.privacy && this.$store.state.authentication.isAuthenticated && this.$store.state.oAuthParam.accessToken){
155
+ parameters.push('access_token='+this.$store.state.oAuthParam.accessToken);
156
+ }
154
157
  return this.podcast.audioUrl + '?' + parameters.join('&');
155
158
  },
156
159
  organisationId(): string|undefined {
@@ -369,7 +372,15 @@ export default defineComponent({
369
372
  if (!Hls.isSupported()) {
370
373
  reject('Hls is not supported ! ');
371
374
  }
372
- const hls = new Hls();
375
+ let hls = new Hls();
376
+ if(this.$store.state.authentication.isAuthenticated && this.$store.state.oAuthParam.accessToken){
377
+ hls = new Hls({xhrSetup:
378
+ (xhr: any) => {
379
+ xhr.setRequestHeader("Authorization", "Bearer " + this.$store.state.oAuthParam.accessToken);
380
+ }
381
+ }
382
+ );
383
+ }
373
384
  hls.on(Hls.Events.MANIFEST_PARSED, async () => {
374
385
  if(!this.live){ return; }
375
386
  let downloadId = null;