@saooti/octopus-sdk 39.2.12 → 39.2.13
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
|
@@ -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
|
});
|