diff --git a/.changeset/lemon-spoons-boil.md b/.changeset/lemon-spoons-boil.md new file mode 100644 index 00000000..d53e727b --- /dev/null +++ b/.changeset/lemon-spoons-boil.md @@ -0,0 +1,5 @@ +--- +"@theoplayer/comscore-connector-web": patch +--- + +Fixed multiple issues where the timing of reporting the DVR window length and the playhead's offset wrt the DVR window end was wrong if a LIVE stream with a CSAI pre-roll was set as the player source. diff --git a/.changeset/odd-scissors-rule.md b/.changeset/odd-scissors-rule.md new file mode 100644 index 00000000..89e8253d --- /dev/null +++ b/.changeset/odd-scissors-rule.md @@ -0,0 +1,5 @@ +--- +"@theoplayer/comscore-connector-web": patch +--- + +Initial release to npm. diff --git a/README.md b/README.md index 3b0fa6e2..8ef22b61 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ Using the available connectors allows you to augment the features delivered thro | Connector | npm package | Source code | |:----------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------| | CMCD | [![@theoplayer/cmcd-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fcmcd-connector-web?label=%40theoplayer%2Fcmcd-connector-web)](https://npmjs.com/package/@theoplayer/cmcd-connector-web) | [cmcd](https://github.com/THEOplayer/web-connectors/tree/main/cmcd) | +| Comscore | [![@theoplayer/comscore-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fcomscore-connector-web?label=%40theoplayer%2Fcomscore-connector-web)](https://npmjs.com/package/@theoplayer/comscore-connector-web) | [comscore](https://github.com/THEOplayer/web-connectors/tree/main/comscore) | | Conviva | [![@theoplayer/conviva-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fconviva-connector-web?label=%40theoplayer%2Fconviva-connector-web)](https://npmjs.com/package/@theoplayer/conviva-connector-web) | [conviva](https://github.com/THEOplayer/web-connectors/tree/main/conviva) | | Nielsen | [![@theoplayer/nielsen-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fnielsen-connector-web?label=%40theoplayer%2Fnielsen-connector-web)](https://npmjs.com/package/@theoplayer/nielsen-connector-web) | [nielsen](https://github.com/THEOplayer/web-connectors/tree/main/nielsen) | | Yospace | [![@theoplayer/yospace-connector-web](https://img.shields.io/npm/v/%40theoplayer%2Fyospace-connector-web?label=%40theoplayer%2Fyospace-connector-web)](https://npmjs.com/package/@theoplayer/yospace-connector-web) | [yospace](https://github.com/THEOplayer/web-connectors/tree/main/yospace) | diff --git a/cmcd/package.json b/cmcd/package.json index 9da990b5..b7e76e98 100644 --- a/cmcd/package.json +++ b/cmcd/package.json @@ -8,6 +8,9 @@ "url": "git+https://github.com/THEOplayer/web-connectors.git", "directory": "cmcd" }, + "bugs": { + "url": "https://github.com/THEOplayer/web-connectors/issues" + }, "homepage": "https://theoplayer.com/", "module": "dist/cmcd-connector.esm.js", "types": "dist/types/index.d.ts", diff --git a/comscore/.gitignore b/comscore/.gitignore new file mode 100644 index 00000000..92b3d00f --- /dev/null +++ b/comscore/.gitignore @@ -0,0 +1,10 @@ +# Node artifact files +node_modules/ +lib/ +dist/ + +# Generated by MacOS +.DS_Store + +# Generated by Windows +Thumbs.db diff --git a/comscore/CHANGELOG.md b/comscore/CHANGELOG.md new file mode 100644 index 00000000..f037a0d7 --- /dev/null +++ b/comscore/CHANGELOG.md @@ -0,0 +1,7 @@ +# @theoplayer/comscore-connector-web + +## 1.0.21 + +### ✨ Features + +- Initial release as a connector diff --git a/comscore/README.md b/comscore/README.md new file mode 100644 index 00000000..773e446b --- /dev/null +++ b/comscore/README.md @@ -0,0 +1,110 @@ +# comscore-connector-web + +The Comscore connector provides a Comscore integration for THEOplayer. + +## Installation + +```sh +npm install @theoplayer/comscore-connector-web +``` + +This connector depends on the JavaScript ComScore SDK, which should be loaded and available in the global scope before the connector. Get it from your ComScore dashboard or talk to a ComScore representative. This connector was developed and tested with versions 7.2.0.200214 and 7.6.1.210506 + +```html + + + + + + + + + + +
+
+
+ +
+
+ +
+
+
+
+ + + + + + + diff --git a/comscore/test/pages/main_umd.html b/comscore/test/pages/main_umd.html new file mode 100644 index 00000000..03931c49 --- /dev/null +++ b/comscore/test/pages/main_umd.html @@ -0,0 +1,105 @@ + + + + + Connector test page + + + + + + + + + + + + +
+
+
+ +
+
+ +
+
+
+
+ + + + + + diff --git a/comscore/test/pages/test-assets.json b/comscore/test/pages/test-assets.json new file mode 100644 index 00000000..0ef74505 --- /dev/null +++ b/comscore/test/pages/test-assets.json @@ -0,0 +1,179 @@ +[ + { + "label": "VOD (HLS)", + "source": { + "sources": [ + { + "src": "https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny.m3u8", + "type": "application/x-mpegurl" + } + ] + }, + "metadata": { + "mediaType": "longformOnDemand", + "uniqueId": "testuniqueId", + "length": 634566, + "stationTitle": "THEOTV", + "programTitle": "Big Buck Bunny", + "episodeTitle": "Intro", + "genreName": "Animation", + "classifyAsAudioStream": false, + "customLabels": { + "testcustomlabel": "testcustomvalue" + } + } + }, + { + "label": "VOD (HLS) - VMAP (IMA)", + "source": { + "sources": [ + { + "src": "https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny.m3u8", + "type": "application/x-mpegurl" + } + ], + "ads": [ + { + "integration": "google-ima", + "sources": "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpremidpost&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&cmsid=496&vid=short_onecue&correlator=" + } + ] + }, + "metadata": { + "mediaType": "longformOnDemand", + "uniqueId": "testuniqueId", + "length": 634566, + "stationTitle": "THEOTV", + "programTitle": "Big Buck Bunny", + "episodeTitle": "Intro", + "genreName": "Animation", + "classifyAsAudioStream": false, + "customLabels": { + "testcustomlabel": "testcustomvalue" + } + } + }, + { + "label": "VOD (HLS) - VMAP (THEOAds)", + "source": { + "sources": [ + { + "src": "https://cdn.theoplayer.com/video/big_buck_bunny/big_buck_bunny.m3u8", + "type": "application/x-mpegurl" + } + ], + "ads": [ + { + "integration": "theo", + "sources": "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpremidpost&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&impl=s&cmsid=496&vid=short_onecue&correlator=" + } + ] + }, + "metadata": { + "mediaType": "longformOnDemand", + "uniqueId": "testuniqueId", + "length": 634566, + "stationTitle": "THEOTV", + "programTitle": "Big Buck Bunny", + "episodeTitle": "Intro", + "genreName": "Animation", + "classifyAsAudioStream": false, + "customLabels": { + "testcustomlabel": "testcustomvalue" + } + } + }, + { + "label": "LIVE (DASH) - VAST pre-roll (IMA)", + "source": { + "sources": [ + { + "src": "https://livesim2.dashif.org/livesim2/testpic_2s/Manifest.mpd", + "useCredentials": false + } + ], + "ads": [ + { + "integration": "google-ima", + "timeOffset": "start", + "sources": "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=" + } + ] + }, + "metadata": { + "mediaType": "live", + "uniqueId": "testuniqueId", + "length": 0, + "stationTitle": "DASHIF", + "programTitle": "Livesim", + "episodeTitle": "Test", + "genreName": "Animation", + "classifyAsAudioStream": false, + "customLabels": { + "testcustomlabel": "testcustomvalue" + } + } + }, + { + "label": "LIVE (DASH) - VAST pre-roll (THEOAds)", + "source": { + "sources": [ + { + "src": "https://livesim2.dashif.org/livesim2/testpic_2s/Manifest.mpd", + "useCredentials": false + } + ], + "ads": [ + { + "integration": "theo", + "timeOffset": "start", + "sources": "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_preroll_skippable&sz=640x480&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=" + } + ] + }, + "metadata": { + "mediaType": "live", + "uniqueId": "testuniqueId", + "length": 0, + "stationTitle": "DASHIF", + "programTitle": "Livesim", + "episodeTitle": "Test", + "genreName": "Animation", + "classifyAsAudioStream": false, + "customLabels": { + "testcustomlabel": "testcustomvalue" + } + } + }, + { + "label": "VOD - Google DAI", + "source": { + "sources": [ + { + "type": "application/x-mpegurl", + "ssai": { + "integration": "google-dai", + "availabilityType": "vod", + "contentSourceID": "2528370", + "videoID": "tears-of-steel", + "assetKey": "", + "apiKey": "" + } + } + ] + }, + "metadata": { + "mediaType": "longformOnDemand", + "uniqueId": "testuniqueId", + "length": 634566, + "stationTitle": "DAI", + "programTitle": "Google Ad Manager Samples", + "episodeTitle": "Tears of Steel", + "genreName": "Animation", + "classifyAsAudioStream": false, + "customLabels": { + "testcustomlabel": "testcustomvalue" + } + } + } +] \ No newline at end of file diff --git a/comscore/tsconfig.json b/comscore/tsconfig.json new file mode 100644 index 00000000..d416c1ae --- /dev/null +++ b/comscore/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "declarationDir": "dist/types" + }, + "include": [ + "src/**/*" + ] +} diff --git a/comscore/typedoc.json b/comscore/typedoc.json new file mode 100644 index 00000000..d531c6a5 --- /dev/null +++ b/comscore/typedoc.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://typedoc.org/schema.json", + "extends": [ + "../typedoc.base.json" + ], + "entryPoints": [ + "src/index.ts" + ], + "tsconfig": "tsconfig.json", + "readme": "README.md", + "name": "Comscore Connector" +} diff --git a/conviva/package.json b/conviva/package.json index d735f4de..4844c04b 100644 --- a/conviva/package.json +++ b/conviva/package.json @@ -3,7 +3,6 @@ "version": "2.1.0", "description": "A connector implementing Conviva for web.", "main": "dist/conviva-connector.umd.js", - "repository": "https://github.com/THEOplayer/conviva-connector-web", "homepage": "https://theoplayer.com/", "module": "dist/conviva-connector.esm.js", "types": "dist/types/index.d.ts", @@ -25,6 +24,14 @@ "test": "jest" }, "author": "THEO Technologies NV", + "repository": { + "type": "git", + "url": "git+https://github.com/THEOplayer/web-connectors.git", + "directory": "conviva" + }, + "bugs": { + "url": "https://github.com/THEOplayer/web-connectors/issues" + }, "license": "MIT", "files": [ "dist/", diff --git a/nielsen/package.json b/nielsen/package.json index cd3eb54f..4858cffd 100644 --- a/nielsen/package.json +++ b/nielsen/package.json @@ -23,6 +23,14 @@ "test": "jest" }, "author": "THEO Technologies NV", + "repository": { + "type": "git", + "url": "git+https://github.com/THEOplayer/web-connectors.git", + "directory": "nielsen" + }, + "bugs": { + "url": "https://github.com/THEOplayer/web-connectors/issues" + }, "license": "MIT", "files": [ "dist/", diff --git a/package-lock.json b/package-lock.json index 464f6951..8d1a055a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "yospace", "conviva", "nielsen", - "cmcd" + "cmcd", + "comscore" ], "devDependencies": { "@changesets/cli": "^2.27.1", @@ -43,22 +44,30 @@ }, "cmcd": { "name": "@theoplayer/cmcd-connector-web", - "version": "1.0.1", + "version": "1.0.2", "license": "MIT", "peerDependencies": { "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" } }, + "comscore": { + "name": "@theoplayer/comscore-connector-web", + "version": "1.0.20", + "license": "MIT", + "peerDependencies": { + "theoplayer": "^7.0.0" + } + }, "conviva": { "name": "@theoplayer/conviva-connector-web", - "version": "2.0.2", + "version": "2.1.0", "license": "MIT", "devDependencies": { "@convivainc/conviva-js-coresdk": "^4.7.4" }, "peerDependencies": { "@convivainc/conviva-js-coresdk": "^4.7.4", - "@theoplayer/yospace-connector-web": "^2.1.1", + "@theoplayer/yospace-connector-web": "^2.1.2", "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "peerDependenciesMeta": { @@ -2391,6 +2400,10 @@ "resolved": "cmcd", "link": true }, + "node_modules/@theoplayer/comscore-connector-web": { + "resolved": "comscore", + "link": true + }, "node_modules/@theoplayer/conviva-connector-web": { "resolved": "conviva", "link": true @@ -8724,7 +8737,7 @@ }, "yospace": { "name": "@theoplayer/yospace-connector-web", - "version": "2.1.1", + "version": "2.1.2", "license": "MIT", "peerDependencies": { "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" diff --git a/package.json b/package.json index 15f71885..9bbbee84 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "yospace", "conviva", "nielsen", - "cmcd" + "cmcd", + "comscore" ], "scripts": { "changeset:version": "changeset version && node .changeset/post-process.js", diff --git a/yospace/package.json b/yospace/package.json index 8ca2c583..e1de7b0b 100644 --- a/yospace/package.json +++ b/yospace/package.json @@ -41,7 +41,7 @@ "theoplayer": "^5.0.0 || ^6.0.0 || ^7.0.0" }, "bugs": { - "url": "https://github.com/THEOplayer/yospace-connector-web/issues" + "url": "https://github.com/THEOplayer/web-connectors/issues" }, "directories": { "test": "test"