@saooti/octopus-sdk 39.1.20 → 39.1.22-SNASPHOT

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": "39.1.20",
3
+ "version": "39.1.22-SNASPHOT",
4
4
  "private": false,
5
5
  "description": "Javascript SDK for using octopus",
6
6
  "author": "Saooti",
@@ -108,17 +108,16 @@ export default defineComponent({
108
108
  return undefined !== this.authOrgaId;
109
109
  },
110
110
  routerLinkSecondArray() {
111
- const links = [
112
- { title: this.$t("Contact"), routeName: "/main/pub/contact" },
113
- { title: this.$t("Term of use"), routeName: "/main/pub/cgu" },
114
- ];
115
-
111
+ let links = [];
116
112
  if (!this.isGarRole) {
117
- links.push({
113
+ links.push({ title: this.$t("Contact"), routeName: "/main/pub/contact" },{
118
114
  title: this.$t("Used libraries"),
119
115
  routeName: "/main/pub/libraries",
120
116
  });
121
117
  }
118
+ links.push(
119
+ { title: this.$t("Term of use"), routeName: "/main/pub/cgu" },
120
+ );
122
121
  return links;
123
122
  },
124
123
  isPodcastmaker(): boolean {
@@ -70,7 +70,7 @@
70
70
  {{ $t("Logout") }}
71
71
  </a>
72
72
  </template>
73
- <router-link class="octopus-dropdown-item" to="/main/pub/contact">
73
+ <router-link v-if="!isGarRole" class="octopus-dropdown-item" to="/main/pub/contact">
74
74
  {{ $t("Contact") }}
75
75
  </router-link>
76
76
  </ClassicPopover>
@@ -43,7 +43,7 @@
43
43
  <a v-else class="octopus-dropdown-item" @click="logoutFunction">
44
44
  {{ $t("Logout") }}
45
45
  </a>
46
- <router-link class="octopus-dropdown-item" to="/main/pub/contact">
46
+ <router-link v-if="!isGarRole" class="octopus-dropdown-item" to="/main/pub/contact">
47
47
  {{ $t("Contact") }}
48
48
  </router-link>
49
49
  </ClassicPopover>
@@ -81,7 +81,7 @@ export default defineComponent({
81
81
  };
82
82
  },
83
83
  computed: {
84
- ...mapState(useAuthStore, ["authOrgaId"]),
84
+ ...mapState(useAuthStore, ["authOrgaId", "isGarRole"]),
85
85
  ...mapState(useFilterStore, [
86
86
  "filterLive",
87
87
  "filterOrgaId",
@@ -73,7 +73,7 @@ export const playerStitching = defineComponent({
73
73
  async radioIntervalExecute(){
74
74
  //If pause when ad needs to be played then skipped (TO THINK)
75
75
  if("PAUSED"===this.playerStatus){return;}
76
- const vastUrl = await this.getVastUrl(this.playerRadio?.nextAdvertising?.tag ??"5e385e1b51c86");
76
+ const vastUrl = await this.getVastUrl(this.playerRadio?.nextAdvertising?.tag ??"5e385e1b51c86", (this.playerRadio?.nextAdvertising?.adCount ?? 1);
77
77
  console.log("vastUrl "+vastUrl);
78
78
  this.onRequestAd(vastUrl);
79
79
  },
@@ -178,10 +178,10 @@ export const playerStitching = defineComponent({
178
178
  },
179
179
 
180
180
  async defineVastUrl(adPosition: AdPosition): Promise<AdPosition>{
181
- adPosition.vastUrl = await this.getVastUrl(adPosition.impressId);
181
+ adPosition.vastUrl = await this.getVastUrl(adPosition.impressId, 1);
182
182
  return adPosition;
183
183
  },
184
- async getVastUrl(tag: string): Promise<string>{
184
+ async getVastUrl(tag: string, adCount: number): Promise<string>{
185
185
  let baseUrl = "https://api.soundcast.io/v1/vast/"+tag;
186
186
  let keywords: Array<string> = [];
187
187
  if(this.playerPodcast?.tags?.length){
@@ -193,7 +193,7 @@ export const playerStitching = defineComponent({
193
193
  }
194
194
  }
195
195
  const parameters = this.getUriSearchParams({
196
- adCount: 1,
196
+ adCount: adCount ?? 1,
197
197
  pageUrl:document.referrer,
198
198
  keywords:keywords
199
199
  });
@@ -24,6 +24,7 @@ export interface MediaRadio {
24
24
  export interface NextAdvertising {
25
25
  startDate?: string;
26
26
  tag?: string;
27
+ adCount?:number;
27
28
  }
28
29
 
29
30
  export interface MetadataRadio {
@@ -67,6 +67,7 @@ export interface PlanningRecurrence extends Recurrence {
67
67
  isAdvertising: boolean;
68
68
  ignoreForStream: boolean;
69
69
  advertisingTag: null | string;
70
+ adCount: number;
70
71
  }
71
72
  export interface Exclusion {
72
73
  exclusionId: number;