Skip to content

Commit

Permalink
Merge pull request #26 from THEOplayer/yospace-ad-integration
Browse files Browse the repository at this point in the history
Integrate Yospace connector with custom server-side ad integration API
  • Loading branch information
MattiasBuelens authored Jun 12, 2024
2 parents 9bdf295 + 1bd7fc4 commit c7c6f1e
Show file tree
Hide file tree
Showing 28 changed files with 569 additions and 248 deletions.
5 changes: 4 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "minor",
"ignore": []
"ignore": [],
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
5 changes: 5 additions & 0 deletions .changeset/rotten-hairs-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@theoplayer/yospace-connector-web": minor
---

The connector now integrates with the [custom server-side ad integration API](https://www.theoplayer.com/docs/theoplayer/v7/api-reference/web/interfaces/Ads.html#registerServerSideIntegration.registerServerSideIntegration-1) introduced in THEOplayer 7.4.0. This allows Yospace adverts to show up through the `player.ads` API of THEOplayer.
1 change: 1 addition & 0 deletions cmcd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"scripts": {
"clean": "rimraf lib dist",
"bundle": "rollup -c rollup.config.mjs",
"watch": "npm run bundle -- --watch",
"build": "npm run clean && npm run bundle",
"serve": "http-server",
"test": "jest"
Expand Down
1 change: 1 addition & 0 deletions comscore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"scripts": {
"clean": "rimraf lib dist",
"bundle": "rollup -c rollup.config.mjs",
"watch": "npm run bundle -- --watch",
"build": "npm run clean && npm run bundle",
"serve": "http-server ./.. -o /comscore/test/pages/main.html",
"test": "echo \"No tests yet\""
Expand Down
1 change: 1 addition & 0 deletions conviva/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"scripts": {
"clean": "rimraf lib dist",
"bundle": "rollup -c rollup.config.mjs",
"watch": "npm run bundle -- --watch",
"build": "npm run clean && npm run bundle",
"serve": "http-server",
"test": "jest"
Expand Down
5 changes: 3 additions & 2 deletions conviva/src/utils/Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,13 @@ export function collectContentMetadata(

export function collectYospaceAdMetadata(player: ChromelessPlayer, ad: AdVert): ConvivaMetadata {
return {
[Constants.ASSET_NAME]: ad.getProperty('AdTitle')?.getValue(),
// Cast to `any` because the index signature in ConvivaMetadata conflicts with its other properties...
[Constants.ASSET_NAME]: (ad.getProperty('AdTitle')?.getValue() ?? null) as any,
[Constants.STREAM_URL]: player.src!,
[Constants.DURATION]: (ad.getDuration() / 1000) as any,
'c3.ad.technology': Constants.AdType.SERVER_SIDE,
'c3.ad.id': ad.getIdentifier(),
'c3.ad.system': ad.getProperty('AdSystem')?.getValue(),
'c3.ad.system': (ad.getProperty('AdSystem')?.getValue() ?? null) as any,
'c3.ad.isSlate': ad.isFiller() ? 'true' : 'false',
'c3.ad.mediaFileApiFramework': 'NA',
'c3.ad.adStitcher': 'YoSpace',
Expand Down
1 change: 1 addition & 0 deletions nielsen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"scripts": {
"clean": "rimraf lib dist",
"bundle": "rollup -c rollup.config.mjs",
"watch": "npm run bundle -- --watch",
"build": "npm run clean && npm run bundle",
"serve": "http-server",
"test": "jest"
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"rollup": "^4.14.0",
"theoplayer": "^7.0.0",
"theoplayer": "^7.4.1",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
Expand Down
1 change: 1 addition & 0 deletions yospace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"clean": "rimraf lib dist",
"bundle": "rollup -c rollup.config.mjs",
"build": "npm run clean && npm run bundle",
"watch": "npm run bundle -- --watch",
"serve": "http-server",
"test": "jest"
},
Expand Down
34 changes: 0 additions & 34 deletions yospace/src/integration/YospaceAd.ts

This file was deleted.

Loading

0 comments on commit c7c6f1e

Please sign in to comment.