@gcorevideo/player 2.20.21 → 2.20.22

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.
@@ -37249,7 +37249,7 @@ class ClipsPlugin extends UICorePlugin {
37249
37249
 
37250
37250
  const templateHtml$1 = "<ul class=\"context-menu-list\">\n <% if(options) { %>\n <% for (var i = 0; i < options.length; i++) { %>\n <li class=\"context-menu-list-item <%= options[i].class %>\"\n data-<%= options[i].name %>><%= options[i].label %></li>\n <% } %>\n <% } %>\n</ul>\n";
37251
37251
 
37252
- var version$1 = "2.20.21";
37252
+ var version$1 = "2.20.22";
37253
37253
 
37254
37254
  var packages = {
37255
37255
  "node_modules/@clappr/core": {
@@ -1 +1 @@
1
- {"version":3,"file":"HTML5Video.d.ts","sourceRoot":"","sources":["../../src/playback/HTML5Video.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAG3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAQhD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,OAAO,CAAC,YAAY,CAAuB;IAE3C;;OAEG;IACM,WAAW,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY;IAyBlD,UAAU;IAKV,QAAQ;IASR,sBAAsB;IAsBtB,UAAU;IASV,QAAQ;CAQlB"}
1
+ {"version":3,"file":"HTML5Video.d.ts","sourceRoot":"","sources":["../../src/playback/HTML5Video.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAG3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAQhD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,OAAO,CAAC,YAAY,CAAuB;IAE3C;;OAEG;IACM,WAAW,CAAC,SAAS,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY;IAyBlD,UAAU;IAKV,QAAQ;IASR,sBAAsB;IAwBtB,UAAU;IASV,QAAQ;CAQlB"}
@@ -1,4 +1,4 @@
1
- import { PlayerError } from '@clappr/core';
1
+ import { PlayerError, Events as ClapprEvents } from '@clappr/core';
2
2
  import { PlaybackErrorCode } from '../playback.types.js';
3
3
  import { BasePlayback } from './BasePlayback.js';
4
4
  import { trace } from '@gcorevideo/utils';
@@ -52,12 +52,14 @@ export default class HTML5Video extends BasePlayback {
52
52
  ended: this.ended,
53
53
  });
54
54
  this.stallTimerId = null;
55
- this.createError({
55
+ const error = this.createError({
56
56
  code: PlaybackErrorCode.MediaSourceUnavailable,
57
57
  level: PlayerError.Levels.FATAL,
58
58
  message: 'Stall timeout',
59
59
  description: 'Playback stalled for too long',
60
60
  });
61
+ this.trigger(ClapprEvents.PLAYBACK_ERROR, error);
62
+ setTimeout(() => this.stop(), 0);
61
63
  }, STALL_TIMEOUT);
62
64
  }
63
65
  super._handleBufferingEvents();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gcorevideo/player",
3
- "version": "2.20.21",
3
+ "version": "2.20.22",
4
4
  "description": "Gcore JavaScript video player",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -1,4 +1,4 @@
1
- import { PlayerError } from '@clappr/core'
1
+ import { PlayerError, Events as ClapprEvents } from '@clappr/core'
2
2
  import { ErrorOptions } from '@clappr/core'
3
3
 
4
4
  import { PlaybackErrorCode } from '../playback.types.js'
@@ -66,12 +66,14 @@ export default class HTML5Video extends BasePlayback {
66
66
  ended: this.ended,
67
67
  })
68
68
  this.stallTimerId = null
69
- this.createError({
69
+ const error = this.createError({
70
70
  code: PlaybackErrorCode.MediaSourceUnavailable,
71
71
  level: PlayerError.Levels.FATAL,
72
72
  message: 'Stall timeout',
73
73
  description: 'Playback stalled for too long',
74
74
  })
75
+ this.trigger(ClapprEvents.PLAYBACK_ERROR, error)
76
+ setTimeout(() => this.stop(), 0)
75
77
  }, STALL_TIMEOUT)
76
78
  }
77
79
  super._handleBufferingEvents()