@gcorevideo/player 2.28.12 → 2.28.14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,MAAiB,CAAC"}
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../src/build.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,MAAiB,CAAA"}
package/lib/build.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // assert(process.env.CLAPPR_VERSION, 'CLAPPR_VERSION is required');
2
2
  // export const CLAPPR_VERSION: string = process.env.CLAPPR_VERSION || '0.11.3';
3
- export const CLAPPR_VERSION = '0.11.3';
3
+ export const CLAPPR_VERSION = '0.13.0';
@@ -1 +1 @@
1
- {"version":3,"file":"CmcdConfig.d.ts","sourceRoot":"","sources":["../../../src/plugins/cmcd-config/CmcdConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,IAAI,EAAE,UAAU,EAAU,MAAM,cAAc,CAAA;AA4BrE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,GAAG,CAAQ;IAEnB,OAAO,CAAC,GAAG,CAAK;IAEhB;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,OAAO,WAEV;IAED;;OAEG;IACH,IAAI,gBAAgB,WAEnB;gBAEW,IAAI,EAAE,IAAI;IAMtB;;OAEG;IACM,UAAU;IAOnB;;;;OAIG;IACH,SAAS,IAAI;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;YAO3B,cAAc;IAgC5B,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,YAAY;CAGrB"}
1
+ {"version":3,"file":"CmcdConfig.d.ts","sourceRoot":"","sources":["../../../src/plugins/cmcd-config/CmcdConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,IAAI,EAAE,UAAU,EAAU,MAAM,cAAc,CAAA;AA4BrE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,GAAG,CAAQ;IAEnB,OAAO,CAAC,GAAG,CAAK;IAEhB;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,OAAO,WAEV;IAED;;OAEG;IACH,IAAI,gBAAgB,WAEnB;gBAEW,IAAI,EAAE,IAAI;IAMtB;;OAEG;IACM,UAAU;IAOnB;;;;OAIG;IACH,SAAS,IAAI;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;YAO3B,cAAc;IAgC5B,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,YAAY;CAGrB"}
@@ -66,7 +66,7 @@ export class CmcdConfig extends CorePlugin {
66
66
  constructor(core) {
67
67
  super(core);
68
68
  this.sid = this.options.cmcd?.sessionId ?? generateSessionId();
69
- this.setContentId();
69
+ // this.setContentId()
70
70
  }
71
71
  /**
72
72
  * @internal
@@ -120,7 +120,11 @@ export class CmcdConfig extends CorePlugin {
120
120
  }
121
121
  }
122
122
  generateContentId() {
123
- return new URL(this.core.options.source ?? this.core.options.sources[0].source).pathname.slice(0, 64);
123
+ const src = this.core.options.source ??
124
+ (typeof this.core.options.sources[0] == 'string'
125
+ ? this.core.options.sources[0]
126
+ : this.core.options.sources[0].source);
127
+ return new URL(src).pathname.slice(0, 64);
124
128
  }
125
129
  setContentId() {
126
130
  this.cid = this.options.cmcd?.contentId ?? this.generateContentId();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gcorevideo/player",
3
- "version": "2.28.12",
3
+ "version": "2.28.14",
4
4
  "description": "Gcore JavaScript video player",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -46,7 +46,7 @@
46
46
  "@types/sinonjs__fake-timers": "^8.1.5",
47
47
  "assert": "^2.1.0",
48
48
  "eventemitter3": "^5.0.1",
49
- "happy-dom": "^17.4.4",
49
+ "happy-dom": "^20.0.8",
50
50
  "nodemon": "^3.1.9",
51
51
  "rollup": "^4.27.4",
52
52
  "rollup-plugin-polyfill-node": "^0.13.0",
@@ -57,7 +57,7 @@
57
57
  "vitest": "^3.0.4"
58
58
  },
59
59
  "dependencies": {
60
- "@clappr/core": "^0.12.0",
60
+ "@clappr/core": "^0.13.0",
61
61
  "@gcorevideo/utils": "^0.0.1",
62
62
  "@sentry/types": "^8.47.0",
63
63
  "dashjs": "^4.7.4",
package/src/build.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // assert(process.env.CLAPPR_VERSION, 'CLAPPR_VERSION is required');
2
2
  // export const CLAPPR_VERSION: string = process.env.CLAPPR_VERSION || '0.11.3';
3
- export const CLAPPR_VERSION: string = '0.11.3';
3
+ export const CLAPPR_VERSION: string = '0.13.0'
@@ -92,7 +92,7 @@ export class CmcdConfig extends CorePlugin {
92
92
  constructor(core: Core) {
93
93
  super(core)
94
94
  this.sid = this.options.cmcd?.sessionId ?? generateSessionId()
95
- this.setContentId()
95
+ // this.setContentId()
96
96
  }
97
97
 
98
98
  /**
@@ -150,9 +150,12 @@ export class CmcdConfig extends CorePlugin {
150
150
  }
151
151
 
152
152
  private generateContentId() {
153
- return new URL(
154
- this.core.options.source ?? this.core.options.sources[0].source,
155
- ).pathname.slice(0, 64)
153
+ const src =
154
+ this.core.options.source ??
155
+ (typeof this.core.options.sources[0] == 'string'
156
+ ? this.core.options.sources[0]
157
+ : this.core.options.sources[0].source)
158
+ return new URL(src).pathname.slice(0, 64)
156
159
  }
157
160
 
158
161
  private setContentId() {