@gcorevideo/player 2.28.10 → 2.28.11

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/dist/core.js CHANGED
@@ -49404,21 +49404,22 @@ class HTML5Video extends BasePlayback {
49404
49404
  super._onEnded();
49405
49405
  }
49406
49406
  _handleBufferingEvents() {
49407
- // TODO use the logic from the base class to detect if it's stalled or resumed, because in the latter case the current behavior is not correct
49408
- if (!this.stallTimerId) {
49409
- this.stallTimerId = setTimeout(() => {
49410
- this.stallTimerId = null;
49411
- const error = this.createError({
49412
- code: PlaybackErrorCode.MediaSourceUnavailable,
49413
- level: PlayerError.Levels.FATAL,
49414
- message: 'Stall timeout',
49415
- description: 'Playback stalled for too long',
49416
- });
49417
- this.trigger(Events$1.PLAYBACK_ERROR, error);
49418
- setTimeout(() => this.stop(), 0);
49419
- }, STALL_TIMEOUT);
49420
- }
49421
49407
  super._handleBufferingEvents();
49408
+ // TODO test case: playback stalled and then resumed. The should be no MediaSourceUnavailable/"Stall timeout" error
49409
+ if (!this._isBuffering || this.stallTimerId) {
49410
+ return;
49411
+ }
49412
+ this.stallTimerId = setTimeout(() => {
49413
+ this.stallTimerId = null;
49414
+ const error = this.createError({
49415
+ code: PlaybackErrorCode.MediaSourceUnavailable,
49416
+ level: PlayerError.Levels.FATAL,
49417
+ message: 'Stall timeout',
49418
+ description: 'Playback stalled for too long',
49419
+ });
49420
+ this.trigger(Events$1.PLAYBACK_ERROR, error);
49421
+ setTimeout(() => this.stop(), 0);
49422
+ }, STALL_TIMEOUT);
49422
49423
  }
49423
49424
  _onPlaying() {
49424
49425
  if (this.stallTimerId) {
@@ -49957,7 +49958,7 @@ class Player {
49957
49958
  }
49958
49959
  }
49959
49960
 
49960
- var version$1 = "2.28.10";
49961
+ var version$1 = "2.28.11";
49961
49962
 
49962
49963
  var packages = {
49963
49964
  "node_modules/@clappr/core": {
package/dist/index.css CHANGED
@@ -122,51 +122,55 @@
122
122
  .gplayer-lite-btn::-moz-focus-inner {
123
123
  border: 0;
124
124
  padding: 0;
125
- }.media-control-skin-1 .media-control-item.media-control-gear {
126
- order: 99;
127
- }
128
- .media-control-skin-1 .media-control-item.media-control-gear .gear-wrapper {
125
+ }.big-mute-icon-wrapper[data-big-mute] {
129
126
  position: absolute;
130
- right: 16px;
131
- bottom: 52px;
132
- width: 250px;
133
- min-height: 48px;
134
- z-index: 9999;
135
- border-radius: 4px;
136
- box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
127
+ z-index: 9998;
128
+ background-color: transparent;
129
+ display: flex;
130
+ justify-content: center;
131
+ width: 100%;
132
+ height: calc(100% - 50px);
133
+ margin: 0 auto;
134
+ opacity: 0.75;
135
+ transition: opacity 0.1s ease;
136
+ pointer-events: auto;
137
137
  }
138
- .media-control-skin-1 .media-control-item.media-control-gear .gear-options-list {
139
- padding: 8px 0;
138
+ .big-mute-icon-wrapper[data-big-mute].hide {
139
+ display: none;
140
140
  }
141
- .media-control-skin-1 .media-control-item.media-control-gear .gear-option {
142
- margin: 0;
143
- text-align: left;
144
- line-height: 22px;
145
- padding: 5px 14px;
146
- width: 250px;
147
- font-size: 12px;
141
+ .big-mute-icon-wrapper[data-big-mute]:hover {
142
+ cursor: pointer;
143
+ }
144
+
145
+ .big-mute-icon[data-big-mute-icon] {
148
146
  display: flex;
149
147
  align-items: center;
150
- justify-content: flex-start;
151
- gap: 8px;
152
- }
153
- .media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon {
154
- flex: 24px 0 0;
155
- height: 24px;
148
+ justify-content: center;
149
+ align-self: center;
150
+ width: 120px;
151
+ height: 120px;
152
+ border: 2px solid white;
153
+ border-radius: 50%;
154
+ filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
155
+ filter: alpha(opacity=60);
156
+ opacity: 1;
157
+ box-shadow: 0 0 1px 0 white;
158
+ background: rgba(240, 243, 247, 0.9411764706);
159
+ z-index: 10000;
156
160
  }
157
- .media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon.hidden {
158
- visibility: hidden;
159
- display: inline-block;
161
+ .big-mute-icon[data-big-mute-icon] svg {
162
+ margin-left: 5px;
163
+ width: 80px;
164
+ height: 80px;
160
165
  }
161
- .media-control-skin-1 .media-control-item.media-control-gear .gear-option_label {
162
- flex: 0 1 100%;
166
+ .big-mute-icon[data-big-mute-icon] svg path {
167
+ fill: #1f1e1e !important;
163
168
  }
164
- .media-control-skin-1 .media-control-item.media-control-gear .gear-option_arrow-right-icon {
165
- flex: 0 0 14px;
166
- height: 24px;
169
+ .big-mute-icon[data-big-mute-icon]:hover {
170
+ background: rgba(240, 243, 247, 0.8784313725);
167
171
  }
168
- .media-control-skin-1 .media-control-item.media-control-gear .gear-option_value {
169
- flex: 1 0 auto;
172
+ .big-mute-icon[data-big-mute-icon]:hover svg path {
173
+ fill: #151515 !important;
170
174
  }*, :focus, :visited {
171
175
  outline: none !important;
172
176
  }
@@ -225,55 +229,51 @@
225
229
  }
226
230
  .gear-wrapper ul.gear-sub-menu li.current a .check-icon svg {
227
231
  display: inline;
228
- }.big-mute-icon-wrapper[data-big-mute] {
229
- position: absolute;
230
- z-index: 9998;
231
- background-color: transparent;
232
- display: flex;
233
- justify-content: center;
234
- width: 100%;
235
- height: calc(100% - 50px);
236
- margin: 0 auto;
237
- opacity: 0.75;
238
- transition: opacity 0.1s ease;
239
- pointer-events: auto;
232
+ }.media-control-skin-1 .media-control-item.media-control-gear {
233
+ order: 99;
240
234
  }
241
- .big-mute-icon-wrapper[data-big-mute].hide {
242
- display: none;
235
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-wrapper {
236
+ position: absolute;
237
+ right: 16px;
238
+ bottom: 52px;
239
+ width: 250px;
240
+ min-height: 48px;
241
+ z-index: 9999;
242
+ border-radius: 4px;
243
+ box-shadow: 0 0 1px 1px var(--gplayer-mc-popup-border-color);
243
244
  }
244
- .big-mute-icon-wrapper[data-big-mute]:hover {
245
- cursor: pointer;
245
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-options-list {
246
+ padding: 8px 0;
246
247
  }
247
-
248
- .big-mute-icon[data-big-mute-icon] {
248
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-option {
249
+ margin: 0;
250
+ text-align: left;
251
+ line-height: 22px;
252
+ padding: 5px 14px;
253
+ width: 250px;
254
+ font-size: 12px;
249
255
  display: flex;
250
256
  align-items: center;
251
- justify-content: center;
252
- align-self: center;
253
- width: 120px;
254
- height: 120px;
255
- border: 2px solid white;
256
- border-radius: 50%;
257
- filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
258
- filter: alpha(opacity=60);
259
- opacity: 1;
260
- box-shadow: 0 0 1px 0 white;
261
- background: rgba(240, 243, 247, 0.9411764706);
262
- z-index: 10000;
257
+ justify-content: flex-start;
258
+ gap: 8px;
263
259
  }
264
- .big-mute-icon[data-big-mute-icon] svg {
265
- margin-left: 5px;
266
- width: 80px;
267
- height: 80px;
260
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon {
261
+ flex: 24px 0 0;
262
+ height: 24px;
268
263
  }
269
- .big-mute-icon[data-big-mute-icon] svg path {
270
- fill: #1f1e1e !important;
264
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-option_icon.hidden {
265
+ visibility: hidden;
266
+ display: inline-block;
271
267
  }
272
- .big-mute-icon[data-big-mute-icon]:hover {
273
- background: rgba(240, 243, 247, 0.8784313725);
268
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-option_label {
269
+ flex: 0 1 100%;
274
270
  }
275
- .big-mute-icon[data-big-mute-icon]:hover svg path {
276
- fill: #151515 !important;
271
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-option_arrow-right-icon {
272
+ flex: 0 0 14px;
273
+ height: 24px;
274
+ }
275
+ .media-control-skin-1 .media-control-item.media-control-gear .gear-option_value {
276
+ flex: 1 0 auto;
277
277
  }:root {
278
278
  --primary-background-color: #000;
279
279
  --secondary-background-color: #262626;
@@ -661,40 +661,6 @@
661
661
  }
662
662
  .gplayer-mc-clips .gplayer-mc-clips-text.compact {
663
663
  max-width: 100px;
664
- }div.player-error-screen, [data-player] div.player-error-screen {
665
- color: #CCCACA;
666
- position: absolute;
667
- top: 0;
668
- height: 100%;
669
- width: 100%;
670
- background-color: rgba(0, 0, 0, 0.7);
671
- z-index: 2000;
672
- display: flex;
673
- flex-direction: column;
674
- justify-content: center;
675
- }
676
- div.player-error-screen__content[data-error-screen], [data-player] div.player-error-screen__content[data-error-screen] {
677
- font-size: 14px;
678
- color: #CCCACA;
679
- margin-top: 45px;
680
- }
681
- div.player-error-screen__title[data-error-screen], [data-player] div.player-error-screen__title[data-error-screen] {
682
- font-weight: bold;
683
- line-height: 30px;
684
- font-size: 18px;
685
- }
686
- div.player-error-screen__message[data-error-screen], [data-player] div.player-error-screen__message[data-error-screen] {
687
- width: 90%;
688
- margin: 0 auto;
689
- }
690
- div.player-error-screen__code[data-error-screen], [data-player] div.player-error-screen__code[data-error-screen] {
691
- font-size: 13px;
692
- margin-top: 15px;
693
- }
694
- div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
695
- cursor: pointer;
696
- width: 30px;
697
- margin: 15px auto 0;
698
664
  }.context-menu {
699
665
  z-index: 999;
700
666
  position: absolute;
@@ -731,6 +697,40 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
731
697
  .context-menu .context-menu-list-item_icon {
732
698
  width: 20px;
733
699
  height: 20px;
700
+ }div.player-error-screen, [data-player] div.player-error-screen {
701
+ color: #CCCACA;
702
+ position: absolute;
703
+ top: 0;
704
+ height: 100%;
705
+ width: 100%;
706
+ background-color: rgba(0, 0, 0, 0.7);
707
+ z-index: 2000;
708
+ display: flex;
709
+ flex-direction: column;
710
+ justify-content: center;
711
+ }
712
+ div.player-error-screen__content[data-error-screen], [data-player] div.player-error-screen__content[data-error-screen] {
713
+ font-size: 14px;
714
+ color: #CCCACA;
715
+ margin-top: 45px;
716
+ }
717
+ div.player-error-screen__title[data-error-screen], [data-player] div.player-error-screen__title[data-error-screen] {
718
+ font-weight: bold;
719
+ line-height: 30px;
720
+ font-size: 18px;
721
+ }
722
+ div.player-error-screen__message[data-error-screen], [data-player] div.player-error-screen__message[data-error-screen] {
723
+ width: 90%;
724
+ margin: 0 auto;
725
+ }
726
+ div.player-error-screen__code[data-error-screen], [data-player] div.player-error-screen__code[data-error-screen] {
727
+ font-size: 13px;
728
+ margin-top: 15px;
729
+ }
730
+ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
731
+ cursor: pointer;
732
+ width: 30px;
733
+ margin: 15px auto 0;
734
734
  }.dvr-controls {
735
735
  --disabled-opacity: 0.3;
736
736
  --circle-radius: 5px;
@@ -788,40 +788,6 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
788
788
  .dvr-controls .live-button:hover {
789
789
  opacity: 1;
790
790
  text-shadow: rgba(255, 255, 255, 0.75) 0 0 5px;
791
- }.player-poster {
792
- display: flex;
793
- justify-content: center;
794
- align-items: center;
795
- position: absolute;
796
- height: 100%;
797
- width: 100%;
798
- z-index: 998;
799
- top: 0;
800
- left: 0;
801
- background-color: #000;
802
- background-size: cover;
803
- background-repeat: no-repeat;
804
- background-position: 50% 50%;
805
- }
806
- .player-poster.clickable {
807
- cursor: pointer;
808
- }
809
- .player-poster:hover .play-wrapper {
810
- opacity: 1;
811
- }
812
- .player-poster .play-wrapper {
813
- width: 100%;
814
- height: 25%;
815
- margin: 0 auto;
816
- opacity: 0.75;
817
- transition: opacity 0.1s ease;
818
- }
819
- .player-poster .play-wrapper svg {
820
- height: 100%;
821
- display: inline;
822
- }
823
- .player-poster .play-wrapper svg path {
824
- fill: #fff;
825
791
  }*,
826
792
  :focus,
827
793
  :visited {
@@ -957,6 +923,48 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
957
923
  }
958
924
  .multicamera[data-multicamera] li.current a {
959
925
  color: #f00;
926
+ }.media-control-skin-1 .media-control-item.media-control-pip {
927
+ order: 95;
928
+ }
929
+ .media-control-skin-1 .media-control-item.media-control-pip button {
930
+ height: 20px;
931
+ }
932
+ .media-control-skin-1 .media-control-item.media-control-pip button svg {
933
+ height: 20px;
934
+ }.player-poster {
935
+ display: flex;
936
+ justify-content: center;
937
+ align-items: center;
938
+ position: absolute;
939
+ height: 100%;
940
+ width: 100%;
941
+ z-index: 998;
942
+ top: 0;
943
+ left: 0;
944
+ background-color: #000;
945
+ background-size: cover;
946
+ background-repeat: no-repeat;
947
+ background-position: 50% 50%;
948
+ }
949
+ .player-poster.clickable {
950
+ cursor: pointer;
951
+ }
952
+ .player-poster:hover .play-wrapper {
953
+ opacity: 1;
954
+ }
955
+ .player-poster .play-wrapper {
956
+ width: 100%;
957
+ height: 25%;
958
+ margin: 0 auto;
959
+ opacity: 0.75;
960
+ transition: opacity 0.1s ease;
961
+ }
962
+ .player-poster .play-wrapper svg {
963
+ height: 100%;
964
+ display: inline;
965
+ }
966
+ .player-poster .play-wrapper svg path {
967
+ fill: #fff;
960
968
  }[data-player] {
961
969
  --bottom-panel: 40px;
962
970
  }
@@ -1578,74 +1586,6 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
1578
1586
  100% {
1579
1587
  color: #B80000;
1580
1588
  }
1581
- }.media-control-skin-1 .media-control-item.media-control-pip {
1582
- order: 95;
1583
- }
1584
- .media-control-skin-1 .media-control-item.media-control-pip button {
1585
- height: 20px;
1586
- }
1587
- .media-control-skin-1 .media-control-item.media-control-pip button svg {
1588
- height: 20px;
1589
- }.quality-levels li.disabled {
1590
- opacity: 0.5;
1591
- pointer-events: none;
1592
- }
1593
- .quality-levels li.current {
1594
- background-color: #000;
1595
- }.seek-time {
1596
- position: absolute;
1597
- white-space: nowrap;
1598
- height: 20px;
1599
- line-height: 20px;
1600
- font-size: 0;
1601
- left: -100%;
1602
- bottom: 55px;
1603
- background-color: rgba(2, 2, 2, 0.5);
1604
- z-index: 9999;
1605
- transition: opacity 0.1s ease;
1606
- }
1607
- .seek-time.hidden {
1608
- opacity: 0;
1609
- }
1610
- .seek-time .seek-time__pos {
1611
- display: inline-block;
1612
- color: white;
1613
- font-size: 10px;
1614
- padding-left: 7px;
1615
- padding-right: 7px;
1616
- vertical-align: top;
1617
- }
1618
- .seek-time .seek-time__duration {
1619
- display: inline-block;
1620
- color: rgba(255, 255, 255, 0.5);
1621
- font-size: 10px;
1622
- padding-right: 7px;
1623
- vertical-align: top;
1624
- }
1625
- .seek-time .seek-time__duration::before {
1626
- content: "|";
1627
- margin-right: 7px;
1628
- }.container-with-poster-clickable .mc-skip-time {
1629
- height: 0;
1630
- }
1631
-
1632
- .mc-skip-time {
1633
- position: absolute;
1634
- width: 100%;
1635
- height: calc(100% - 50px);
1636
- z-index: 9998;
1637
- background-color: transparent;
1638
- font-family: Roboto, "Open Sans", Arial, sans-serif;
1639
- }
1640
- .mc-skip-time .skip-container {
1641
- width: 100%;
1642
- height: 100%;
1643
- display: flex;
1644
- justify-content: space-between;
1645
- }
1646
- .mc-skip-time .skip-container .skip-item {
1647
- flex: 1 0 0px;
1648
- height: 100%;
1649
1589
  }.share_plugin[data-share] {
1650
1590
  pointer-events: auto;
1651
1591
  z-index: 5;
@@ -1729,6 +1669,66 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
1729
1669
  display: inline-block;
1730
1670
  margin-right: 5px;
1731
1671
  cursor: pointer;
1672
+ }.quality-levels li.disabled {
1673
+ opacity: 0.5;
1674
+ pointer-events: none;
1675
+ }
1676
+ .quality-levels li.current {
1677
+ background-color: #000;
1678
+ }.seek-time {
1679
+ position: absolute;
1680
+ white-space: nowrap;
1681
+ height: 20px;
1682
+ line-height: 20px;
1683
+ font-size: 0;
1684
+ left: -100%;
1685
+ bottom: 55px;
1686
+ background-color: rgba(2, 2, 2, 0.5);
1687
+ z-index: 9999;
1688
+ transition: opacity 0.1s ease;
1689
+ }
1690
+ .seek-time.hidden {
1691
+ opacity: 0;
1692
+ }
1693
+ .seek-time .seek-time__pos {
1694
+ display: inline-block;
1695
+ color: white;
1696
+ font-size: 10px;
1697
+ padding-left: 7px;
1698
+ padding-right: 7px;
1699
+ vertical-align: top;
1700
+ }
1701
+ .seek-time .seek-time__duration {
1702
+ display: inline-block;
1703
+ color: rgba(255, 255, 255, 0.5);
1704
+ font-size: 10px;
1705
+ padding-right: 7px;
1706
+ vertical-align: top;
1707
+ }
1708
+ .seek-time .seek-time__duration::before {
1709
+ content: "|";
1710
+ margin-right: 7px;
1711
+ }.container-with-poster-clickable .mc-skip-time {
1712
+ height: 0;
1713
+ }
1714
+
1715
+ .mc-skip-time {
1716
+ position: absolute;
1717
+ width: 100%;
1718
+ height: calc(100% - 50px);
1719
+ z-index: 9998;
1720
+ background-color: transparent;
1721
+ font-family: Roboto, "Open Sans", Arial, sans-serif;
1722
+ }
1723
+ .mc-skip-time .skip-container {
1724
+ width: 100%;
1725
+ height: 100%;
1726
+ display: flex;
1727
+ justify-content: space-between;
1728
+ }
1729
+ .mc-skip-time .skip-container .skip-item {
1730
+ flex: 1 0 0px;
1731
+ height: 100%;
1732
1732
  }.spinner-three-bounce[data-spinner] {
1733
1733
  position: absolute;
1734
1734
  width: 70px;
@@ -49329,21 +49329,22 @@ class HTML5Video extends BasePlayback {
49329
49329
  super._onEnded();
49330
49330
  }
49331
49331
  _handleBufferingEvents() {
49332
- // TODO use the logic from the base class to detect if it's stalled or resumed, because in the latter case the current behavior is not correct
49333
- if (!this.stallTimerId) {
49334
- this.stallTimerId = setTimeout(() => {
49335
- this.stallTimerId = null;
49336
- const error = this.createError({
49337
- code: PlaybackErrorCode.MediaSourceUnavailable,
49338
- level: PlayerError.Levels.FATAL,
49339
- message: 'Stall timeout',
49340
- description: 'Playback stalled for too long',
49341
- });
49342
- this.trigger(Events$1.PLAYBACK_ERROR, error);
49343
- setTimeout(() => this.stop(), 0);
49344
- }, STALL_TIMEOUT);
49345
- }
49346
49332
  super._handleBufferingEvents();
49333
+ // TODO test case: playback stalled and then resumed. The should be no MediaSourceUnavailable/"Stall timeout" error
49334
+ if (!this._isBuffering || this.stallTimerId) {
49335
+ return;
49336
+ }
49337
+ this.stallTimerId = setTimeout(() => {
49338
+ this.stallTimerId = null;
49339
+ const error = this.createError({
49340
+ code: PlaybackErrorCode.MediaSourceUnavailable,
49341
+ level: PlayerError.Levels.FATAL,
49342
+ message: 'Stall timeout',
49343
+ description: 'Playback stalled for too long',
49344
+ });
49345
+ this.trigger(Events$1.PLAYBACK_ERROR, error);
49346
+ setTimeout(() => this.stop(), 0);
49347
+ }, STALL_TIMEOUT);
49347
49348
  }
49348
49349
  _onPlaying() {
49349
49350
  if (this.stallTimerId) {
package/dist/index.js CHANGED
@@ -49490,21 +49490,22 @@ class HTML5Video extends BasePlayback {
49490
49490
  super._onEnded();
49491
49491
  }
49492
49492
  _handleBufferingEvents() {
49493
- // TODO use the logic from the base class to detect if it's stalled or resumed, because in the latter case the current behavior is not correct
49494
- if (!this.stallTimerId) {
49495
- this.stallTimerId = setTimeout(() => {
49496
- this.stallTimerId = null;
49497
- const error = this.createError({
49498
- code: PlaybackErrorCode.MediaSourceUnavailable,
49499
- level: PlayerError.Levels.FATAL,
49500
- message: 'Stall timeout',
49501
- description: 'Playback stalled for too long',
49502
- });
49503
- this.trigger(Events$1.PLAYBACK_ERROR, error);
49504
- setTimeout(() => this.stop(), 0);
49505
- }, STALL_TIMEOUT);
49506
- }
49507
49493
  super._handleBufferingEvents();
49494
+ // TODO test case: playback stalled and then resumed. The should be no MediaSourceUnavailable/"Stall timeout" error
49495
+ if (!this._isBuffering || this.stallTimerId) {
49496
+ return;
49497
+ }
49498
+ this.stallTimerId = setTimeout(() => {
49499
+ this.stallTimerId = null;
49500
+ const error = this.createError({
49501
+ code: PlaybackErrorCode.MediaSourceUnavailable,
49502
+ level: PlayerError.Levels.FATAL,
49503
+ message: 'Stall timeout',
49504
+ description: 'Playback stalled for too long',
49505
+ });
49506
+ this.trigger(Events$1.PLAYBACK_ERROR, error);
49507
+ setTimeout(() => this.stop(), 0);
49508
+ }, STALL_TIMEOUT);
49508
49509
  }
49509
49510
  _onPlaying() {
49510
49511
  if (this.stallTimerId) {
@@ -50043,7 +50044,7 @@ class Player {
50043
50044
  }
50044
50045
  }
50045
50046
 
50046
- var version$1 = "2.28.10";
50047
+ var version$1 = "2.28.11";
50047
50048
 
50048
50049
  var packages = {
50049
50050
  "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;AAGhD,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAA;AAMzE,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;IAkBlD,UAAU;IAIV,QAAQ;IAQR,sBAAsB;IAkBtB,UAAU;IAQV,QAAQ;IAQjB,IAAI,WAAW,IAAI,UAAU,EAAE,CAgB9B;IAGD,IAAI,iBAAiB,sBAiBpB;IAED,gBAAgB,CAAC,EAAE,EAAE,MAAM;CAa5B"}
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;AAGhD,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAA;AAMzE,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;IAkBlD,UAAU;IAIV,QAAQ;IAQR,sBAAsB;IAmBtB,UAAU;IAQV,QAAQ;IAQjB,IAAI,WAAW,IAAI,UAAU,EAAE,CAgB9B;IAGD,IAAI,iBAAiB,sBAiBpB;IAED,gBAAgB,CAAC,EAAE,EAAE,MAAM;CAa5B"}
@@ -33,21 +33,22 @@ export default class HTML5Video extends BasePlayback {
33
33
  super._onEnded();
34
34
  }
35
35
  _handleBufferingEvents() {
36
- // TODO use the logic from the base class to detect if it's stalled or resumed, because in the latter case the current behavior is not correct
37
- if (!this.stallTimerId) {
38
- this.stallTimerId = setTimeout(() => {
39
- this.stallTimerId = null;
40
- const error = this.createError({
41
- code: PlaybackErrorCode.MediaSourceUnavailable,
42
- level: PlayerError.Levels.FATAL,
43
- message: 'Stall timeout',
44
- description: 'Playback stalled for too long',
45
- });
46
- this.trigger(ClapprEvents.PLAYBACK_ERROR, error);
47
- setTimeout(() => this.stop(), 0);
48
- }, STALL_TIMEOUT);
49
- }
50
36
  super._handleBufferingEvents();
37
+ // TODO test case: playback stalled and then resumed. The should be no MediaSourceUnavailable/"Stall timeout" error
38
+ if (!this._isBuffering || this.stallTimerId) {
39
+ return;
40
+ }
41
+ this.stallTimerId = setTimeout(() => {
42
+ this.stallTimerId = null;
43
+ const error = this.createError({
44
+ code: PlaybackErrorCode.MediaSourceUnavailable,
45
+ level: PlayerError.Levels.FATAL,
46
+ message: 'Stall timeout',
47
+ description: 'Playback stalled for too long',
48
+ });
49
+ this.trigger(ClapprEvents.PLAYBACK_ERROR, error);
50
+ setTimeout(() => this.stop(), 0);
51
+ }, STALL_TIMEOUT);
51
52
  }
52
53
  _onPlaying() {
53
54
  if (this.stallTimerId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gcorevideo/player",
3
- "version": "2.28.10",
3
+ "version": "2.28.11",
4
4
  "description": "Gcore JavaScript video player",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",