@newrelic/video-videojs 4.1.1 → 4.1.2

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": "@newrelic/video-videojs",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "description": "New relic tracker for Videojs",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -31,8 +31,15 @@
31
31
  "@babel/plugin-transform-modules-commonjs": "^7.24.1",
32
32
  "@babel/preset-env": "^7.24.5",
33
33
  "@newrelic/newrelic-oss-cli": "^0.1.2",
34
+ "@semantic-release/changelog": "^6.0.3",
35
+ "@semantic-release/commit-analyzer": "^12.0.0",
36
+ "@semantic-release/git": "^10.0.1",
37
+ "@semantic-release/github": "^10.0.3",
38
+ "@semantic-release/npm": "^12.0.0",
39
+ "@semantic-release/release-notes-generator": "^13.0.0",
34
40
  "aws-sdk": "^2.920.0",
35
41
  "babel-loader": "^9.1.3",
42
+ "semantic-release": "^23.0.8",
36
43
  "videojs-ima": "2.1.0",
37
44
  "webpack": "^5.91.0",
38
45
  "webpack-cli": "^4.9.2"
@@ -49,6 +56,6 @@
49
56
  "access": "public"
50
57
  },
51
58
  "dependencies": {
52
- "@newrelic/video-core": "^4.0.0"
59
+ "@newrelic/video-core": "^4.1.5"
53
60
  }
54
61
  }
package/src/ads/dai.js CHANGED
@@ -449,15 +449,18 @@ export default class DaiAdsTracker extends VideojsAdsTracker {
449
449
 
450
450
  getBitrate() {
451
451
  const tech = this.getTech()
452
- if (tech && tech.tech && tech.tech.stats) {
453
- return tech.tech.stats.bandwidth;
452
+ if (tech && tech.tech && tech.tech.stats && tech.tech.stats.bandwidth) {
453
+ return Math.round(tech.tech.stats.bandwidth);
454
454
  }
455
+ return null;
455
456
  }
456
457
 
457
458
  getRenditionBitrate() {
458
459
  const tech = this.getTech();
459
460
  if (tech && tech.getRenditionBitrate) {
460
- return tech.getRenditionBitrate();
461
+ const bitrate = tech.getRenditionBitrate();
462
+ return bitrate !== null ? Math.round(bitrate) : null;
461
463
  }
464
+ return null;
462
465
  }
463
466
  }
package/src/ads/ima.js CHANGED
@@ -112,9 +112,10 @@ export default class ImaAdsTracker extends VideojsAdsTracker {
112
112
  }
113
113
 
114
114
  getRenditionBitrate() {
115
- if (this.lastAdData) {
116
- return this.lastAdData.renditionBitrate;
115
+ if (this.lastAdData && this.lastAdData.renditionBitrate) {
116
+ return Math.round(this.lastAdData.renditionBitrate);
117
117
  }
118
+ return null;
118
119
  }
119
120
 
120
121
  registerListeners() {