Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions types/pxr-oneline/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ declare namespace OneLine {
*/
requestSpecificAdUnits(adUnitIds: string[]): void;
setBettingCookie(betting: boolean): void;
getBaseAdvertisingConfig(): jwplayer.AdvertisingConfig | undefined;
hasVisibleVideoAdUi(container: HTMLElement): boolean;
isJwPlayerAdBreakActive(container: HTMLElement): boolean;
suspendJwPlayerContent(container: HTMLElement): void;
resumeJwPlayerContent(container: HTMLElement): void;
}
interface VideoCustomParameters {
[key: string]: number | string | undefined;
Expand Down Expand Up @@ -102,5 +107,20 @@ declare namespace OneLine {
type NoParamFunction = () => void;
type ParamFunction = (arg: any) => void;
}
declare namespace jwplayer {
interface AdvertisingConfig {
client: "vast" | "googima";
endstate?: string;
outstream?: boolean;
rules?: {
deferAds?: Record<string, unknown>;
frequency?: number;
startOn?: number;
startOnSeek?: string;
timeBetweenAds?: number;
};
vpaidcontrols?: boolean;
}
}
declare const OneLine: OneLine.OneLine;
export = OneLine;
34 changes: 34 additions & 0 deletions types/pxr-oneline/oneline-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ interface BidderConfig {

type NoParamFunction = () => void;
type ParamFunction = (arg: any) => void;
interface AdvertisingConfig {
client: "vast" | "googima";
endstate?: string;
outstream?: boolean;
rules?: {
deferAds?: Record<string, unknown>;
frequency?: number;
startOn?: number;
startOnSeek?: string;
timeBetweenAds?: number;
};
vpaidcontrols?: boolean;
}

interface SocialConsents {
vendors: {
Expand Down Expand Up @@ -130,6 +143,18 @@ const ndOne: OneLine.OneLine = {
// Mock implementation for setBettingCookie
this.setBettingCookie(betting);
},
getBaseAdvertisingConfig: () => {
const config: AdvertisingConfig = { client: "vast" };
return config;
},
hasVisibleVideoAdUi: (container: HTMLElement) => {
return container.childElementCount > 0;
},
isJwPlayerAdBreakActive: (container: HTMLElement) => {
return container.classList.contains("jw-flag-ads");
},
suspendJwPlayerContent: (_container: HTMLElement) => {},
resumeJwPlayerContent: (_container: HTMLElement) => {},
};

// Test cases
Expand All @@ -141,3 +166,12 @@ ndOne.requestVideoPlayerAds(() => {
console.log("Video player ads bidding complete");
});
ndOne.setBettingCookie(true);
const advertisingConfig = ndOne.getBaseAdvertisingConfig();
if (advertisingConfig) {
advertisingConfig.client;
}
const playerContainer = document.createElement("div");
ndOne.hasVisibleVideoAdUi(playerContainer);
ndOne.isJwPlayerAdBreakActive(playerContainer);
ndOne.suspendJwPlayerContent(playerContainer);
ndOne.resumeJwPlayerContent(playerContainer);
2 changes: 1 addition & 1 deletion types/pxr-oneline/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/pxr-oneline",
"version": "1.14.9999",
"version": "1.15.9999",
"nonNpm": true,
"nonNpmDescription": "The OneLine handles all the logic needed for a publisher to serve ads.",
"projects": [
Expand Down
7 changes: 7 additions & 0 deletions types/woosmap.map/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,13 @@ declare namespace woosmap.map {
* The initial tilt to start from.
*/
tilt?: number;
/**
* Opt into the upcoming visual refresh styles. When true, the resolved style
* is upgraded to its refreshed counterpart (e.g. `streets` -> `streets_next`).
* If unset, falls back to `woosmap.map.config.getVisualRefresh()` (default false).
* Experimental — will be removed once the refreshed styles become the default.
*/
visualRefresh?: boolean;
/**
* The initial map zoom level to start from.
*/
Expand Down
1 change: 1 addition & 0 deletions types/woosmap.map/woosmap.map-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const mapOptions = expectType({
],
enableMarkerAccessibleNavigation: true,
mapTypeId: woosmap.map.MapTypeId.ROADMAP,
visualRefresh: true,
}) as woosmap.map.MapOptions;
const map = new woosmap.map.Map(document.getElementById("mapContainer") as HTMLElement, mapOptions);

Expand Down