@gcorevideo/player 2.28.9 → 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 +16 -15
- package/dist/index.css +144 -144
- package/dist/index.embed.js +17 -15
- package/dist/index.js +18 -16
- package/lib/playback/HTML5Video.d.ts.map +1 -1
- package/lib/playback/HTML5Video.js +15 -14
- package/lib/plugins/big-mute-button/BigMuteButton.d.ts.map +1 -1
- package/lib/plugins/big-mute-button/BigMuteButton.js +2 -1
- package/package.json +1 -1
- package/src/playback/HTML5Video.ts +15 -14
- package/src/plugins/big-mute-button/BigMuteButton.ts +7 -2
- package/tsconfig.tsbuildinfo +1 -1
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.
|
|
49961
|
+
var version$1 = "2.28.11";
|
|
49961
49962
|
|
|
49962
49963
|
var packages = {
|
|
49963
49964
|
"node_modules/@clappr/core": {
|
package/dist/index.css
CHANGED
|
@@ -697,6 +697,40 @@
|
|
|
697
697
|
.context-menu .context-menu-list-item_icon {
|
|
698
698
|
width: 20px;
|
|
699
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;
|
|
700
734
|
}.dvr-controls {
|
|
701
735
|
--disabled-opacity: 0.3;
|
|
702
736
|
--circle-radius: 5px;
|
|
@@ -889,48 +923,48 @@
|
|
|
889
923
|
}
|
|
890
924
|
.multicamera[data-multicamera] li.current a {
|
|
891
925
|
color: #f00;
|
|
892
|
-
}
|
|
893
|
-
|
|
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;
|
|
894
938
|
position: absolute;
|
|
895
|
-
top: 0;
|
|
896
939
|
height: 100%;
|
|
897
940
|
width: 100%;
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
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%;
|
|
903
948
|
}
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
color: #CCCACA;
|
|
907
|
-
margin-top: 45px;
|
|
949
|
+
.player-poster.clickable {
|
|
950
|
+
cursor: pointer;
|
|
908
951
|
}
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
line-height: 30px;
|
|
912
|
-
font-size: 18px;
|
|
952
|
+
.player-poster:hover .play-wrapper {
|
|
953
|
+
opacity: 1;
|
|
913
954
|
}
|
|
914
|
-
|
|
915
|
-
width:
|
|
955
|
+
.player-poster .play-wrapper {
|
|
956
|
+
width: 100%;
|
|
957
|
+
height: 25%;
|
|
916
958
|
margin: 0 auto;
|
|
959
|
+
opacity: 0.75;
|
|
960
|
+
transition: opacity 0.1s ease;
|
|
917
961
|
}
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}
|
|
922
|
-
div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
923
|
-
cursor: pointer;
|
|
924
|
-
width: 30px;
|
|
925
|
-
margin: 15px auto 0;
|
|
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;
|
|
962
|
+
.player-poster .play-wrapper svg {
|
|
963
|
+
height: 100%;
|
|
964
|
+
display: inline;
|
|
931
965
|
}
|
|
932
|
-
.
|
|
933
|
-
|
|
966
|
+
.player-poster .play-wrapper svg path {
|
|
967
|
+
fill: #fff;
|
|
934
968
|
}[data-player] {
|
|
935
969
|
--bottom-panel: 40px;
|
|
936
970
|
}
|
|
@@ -1552,117 +1586,6 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1552
1586
|
100% {
|
|
1553
1587
|
color: #B80000;
|
|
1554
1588
|
}
|
|
1555
|
-
}.player-poster {
|
|
1556
|
-
display: flex;
|
|
1557
|
-
justify-content: center;
|
|
1558
|
-
align-items: center;
|
|
1559
|
-
position: absolute;
|
|
1560
|
-
height: 100%;
|
|
1561
|
-
width: 100%;
|
|
1562
|
-
z-index: 998;
|
|
1563
|
-
top: 0;
|
|
1564
|
-
left: 0;
|
|
1565
|
-
background-color: #000;
|
|
1566
|
-
background-size: cover;
|
|
1567
|
-
background-repeat: no-repeat;
|
|
1568
|
-
background-position: 50% 50%;
|
|
1569
|
-
}
|
|
1570
|
-
.player-poster.clickable {
|
|
1571
|
-
cursor: pointer;
|
|
1572
|
-
}
|
|
1573
|
-
.player-poster:hover .play-wrapper {
|
|
1574
|
-
opacity: 1;
|
|
1575
|
-
}
|
|
1576
|
-
.player-poster .play-wrapper {
|
|
1577
|
-
width: 100%;
|
|
1578
|
-
height: 25%;
|
|
1579
|
-
margin: 0 auto;
|
|
1580
|
-
opacity: 0.75;
|
|
1581
|
-
transition: opacity 0.1s ease;
|
|
1582
|
-
}
|
|
1583
|
-
.player-poster .play-wrapper svg {
|
|
1584
|
-
height: 100%;
|
|
1585
|
-
display: inline;
|
|
1586
|
-
}
|
|
1587
|
-
.player-poster .play-wrapper svg path {
|
|
1588
|
-
fill: #fff;
|
|
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
|
-
}.spinner-three-bounce[data-spinner] {
|
|
1629
|
-
position: absolute;
|
|
1630
|
-
width: 70px;
|
|
1631
|
-
text-align: center;
|
|
1632
|
-
z-index: 999;
|
|
1633
|
-
left: 0;
|
|
1634
|
-
right: 0;
|
|
1635
|
-
margin: 0 auto;
|
|
1636
|
-
margin-left: auto;
|
|
1637
|
-
margin-right: auto;
|
|
1638
|
-
/* center vertically */
|
|
1639
|
-
top: 50%;
|
|
1640
|
-
transform: translateY(-50%);
|
|
1641
|
-
}
|
|
1642
|
-
.spinner-three-bounce[data-spinner] > div {
|
|
1643
|
-
width: 18px;
|
|
1644
|
-
height: 18px;
|
|
1645
|
-
background-color: #FFF;
|
|
1646
|
-
border-radius: 100%;
|
|
1647
|
-
display: inline-block;
|
|
1648
|
-
animation: bouncedelay 1.4s infinite ease-in-out;
|
|
1649
|
-
/* Prevent first frame from flickering when animation starts */
|
|
1650
|
-
animation-fill-mode: both;
|
|
1651
|
-
}
|
|
1652
|
-
.spinner-three-bounce[data-spinner] [data-bounce1] {
|
|
1653
|
-
animation-delay: -0.32s;
|
|
1654
|
-
}
|
|
1655
|
-
.spinner-three-bounce[data-spinner] [data-bounce2] {
|
|
1656
|
-
animation-delay: -0.16s;
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
|
-
@keyframes bouncedelay {
|
|
1660
|
-
0%, 80%, 100% {
|
|
1661
|
-
transform: scale(0);
|
|
1662
|
-
}
|
|
1663
|
-
40% {
|
|
1664
|
-
transform: scale(1);
|
|
1665
|
-
}
|
|
1666
1589
|
}.share_plugin[data-share] {
|
|
1667
1590
|
pointer-events: auto;
|
|
1668
1591
|
z-index: 5;
|
|
@@ -1746,6 +1669,45 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1746
1669
|
display: inline-block;
|
|
1747
1670
|
margin-right: 5px;
|
|
1748
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;
|
|
1749
1711
|
}.container-with-poster-clickable .mc-skip-time {
|
|
1750
1712
|
height: 0;
|
|
1751
1713
|
}
|
|
@@ -1767,6 +1729,44 @@ div.player-error-screen__reload, [data-player] div.player-error-screen__reload {
|
|
|
1767
1729
|
.mc-skip-time .skip-container .skip-item {
|
|
1768
1730
|
flex: 1 0 0px;
|
|
1769
1731
|
height: 100%;
|
|
1732
|
+
}.spinner-three-bounce[data-spinner] {
|
|
1733
|
+
position: absolute;
|
|
1734
|
+
width: 70px;
|
|
1735
|
+
text-align: center;
|
|
1736
|
+
z-index: 999;
|
|
1737
|
+
left: 0;
|
|
1738
|
+
right: 0;
|
|
1739
|
+
margin: 0 auto;
|
|
1740
|
+
margin-left: auto;
|
|
1741
|
+
margin-right: auto;
|
|
1742
|
+
/* center vertically */
|
|
1743
|
+
top: 50%;
|
|
1744
|
+
transform: translateY(-50%);
|
|
1745
|
+
}
|
|
1746
|
+
.spinner-three-bounce[data-spinner] > div {
|
|
1747
|
+
width: 18px;
|
|
1748
|
+
height: 18px;
|
|
1749
|
+
background-color: #FFF;
|
|
1750
|
+
border-radius: 100%;
|
|
1751
|
+
display: inline-block;
|
|
1752
|
+
animation: bouncedelay 1.4s infinite ease-in-out;
|
|
1753
|
+
/* Prevent first frame from flickering when animation starts */
|
|
1754
|
+
animation-fill-mode: both;
|
|
1755
|
+
}
|
|
1756
|
+
.spinner-three-bounce[data-spinner] [data-bounce1] {
|
|
1757
|
+
animation-delay: -0.32s;
|
|
1758
|
+
}
|
|
1759
|
+
.spinner-three-bounce[data-spinner] [data-bounce2] {
|
|
1760
|
+
animation-delay: -0.16s;
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
@keyframes bouncedelay {
|
|
1764
|
+
0%, 80%, 100% {
|
|
1765
|
+
transform: scale(0);
|
|
1766
|
+
}
|
|
1767
|
+
40% {
|
|
1768
|
+
transform: scale(1);
|
|
1769
|
+
}
|
|
1770
1770
|
}.media-control-skin-1 .media-control-cc button.media-control-button {
|
|
1771
1771
|
display: flex;
|
|
1772
1772
|
justify-content: center;
|
package/dist/index.embed.js
CHANGED
|
@@ -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) {
|
|
@@ -51689,7 +51690,8 @@ class BigMuteButton extends UICorePlugin {
|
|
|
51689
51690
|
this.destroy();
|
|
51690
51691
|
}
|
|
51691
51692
|
}
|
|
51692
|
-
onStop(_,
|
|
51693
|
+
onStop(_, metadata) {
|
|
51694
|
+
const ui = metadata?.ui;
|
|
51693
51695
|
if (ui) {
|
|
51694
51696
|
this.destroy();
|
|
51695
51697
|
}
|
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.
|
|
50047
|
+
var version$1 = "2.28.11";
|
|
50047
50048
|
|
|
50048
50049
|
var packages = {
|
|
50049
50050
|
"node_modules/@clappr/core": {
|
|
@@ -51875,7 +51876,8 @@ class BigMuteButton extends UICorePlugin {
|
|
|
51875
51876
|
this.destroy();
|
|
51876
51877
|
}
|
|
51877
51878
|
}
|
|
51878
|
-
onStop(_,
|
|
51879
|
+
onStop(_, metadata) {
|
|
51880
|
+
const ui = metadata?.ui;
|
|
51879
51881
|
trace(`${T$9} onStop`, { ui });
|
|
51880
51882
|
if (ui) {
|
|
51881
51883
|
this.destroy();
|
|
@@ -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;
|
|
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) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BigMuteButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/big-mute-button/BigMuteButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAS,MAAM,cAAc,CAAA;AAOpE,OAAO,sDAAsD,CAAA;AAM7D;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,MAAM,CAAQ;IAGtB,OAAO,CAAC,YAAY,CAAQ;IAE5B;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAEzD;;OAEG;IACH,IAAa,MAAM;;MAIlB;IAED;;OAEG;IACM,UAAU;IAWnB,OAAO,CAAC,WAAW;IAEnB,OAAO,CAAC,kBAAkB;
|
|
1
|
+
{"version":3,"file":"BigMuteButton.d.ts","sourceRoot":"","sources":["../../../src/plugins/big-mute-button/BigMuteButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,YAAY,EAAS,MAAM,cAAc,CAAA;AAOpE,OAAO,sDAAsD,CAAA;AAM7D;;;;;;;;;;GAUG;AACH,qBAAa,aAAc,SAAQ,YAAY;IAC7C,OAAO,CAAC,QAAQ,CAAQ;IAExB,OAAO,CAAC,MAAM,CAAQ;IAGtB,OAAO,CAAC,YAAY,CAAQ;IAE5B;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAEzD;;OAEG;IACH,IAAa,MAAM;;MAIlB;IAED;;OAEG;IACM,UAAU;IAWnB,OAAO,CAAC,WAAW;IAEnB,OAAO,CAAC,kBAAkB;IAoB1B,OAAO,CAAC,MAAM;IAmBd,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,SAAS;IAKjB,OAAO,CAAC,UAAU;IAKlB;;OAEG;IACM,MAAM;IAUf,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,OAAO;CAiBhB"}
|
package/package.json
CHANGED
|
@@ -48,21 +48,22 @@ export default class HTML5Video extends BasePlayback {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
override _handleBufferingEvents() {
|
|
51
|
-
// 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
|
|
52
|
-
if (!this.stallTimerId) {
|
|
53
|
-
this.stallTimerId = setTimeout(() => {
|
|
54
|
-
this.stallTimerId = null
|
|
55
|
-
const error = this.createError({
|
|
56
|
-
code: PlaybackErrorCode.MediaSourceUnavailable,
|
|
57
|
-
level: PlayerError.Levels.FATAL,
|
|
58
|
-
message: 'Stall timeout',
|
|
59
|
-
description: 'Playback stalled for too long',
|
|
60
|
-
})
|
|
61
|
-
this.trigger(ClapprEvents.PLAYBACK_ERROR, error)
|
|
62
|
-
setTimeout(() => this.stop(), 0)
|
|
63
|
-
}, STALL_TIMEOUT)
|
|
64
|
-
}
|
|
65
51
|
super._handleBufferingEvents()
|
|
52
|
+
// TODO test case: playback stalled and then resumed. The should be no MediaSourceUnavailable/"Stall timeout" error
|
|
53
|
+
if (!this._isBuffering || this.stallTimerId) {
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
this.stallTimerId = setTimeout(() => {
|
|
57
|
+
this.stallTimerId = null
|
|
58
|
+
const error = this.createError({
|
|
59
|
+
code: PlaybackErrorCode.MediaSourceUnavailable,
|
|
60
|
+
level: PlayerError.Levels.FATAL,
|
|
61
|
+
message: 'Stall timeout',
|
|
62
|
+
description: 'Playback stalled for too long',
|
|
63
|
+
})
|
|
64
|
+
this.trigger(ClapprEvents.PLAYBACK_ERROR, error)
|
|
65
|
+
setTimeout(() => this.stop(), 0)
|
|
66
|
+
}, STALL_TIMEOUT)
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
override _onPlaying() {
|
|
@@ -84,7 +84,11 @@ export class BigMuteButton extends UICorePlugin {
|
|
|
84
84
|
)
|
|
85
85
|
this.listenTo(this.core.activeContainer, Events.CONTAINER_PLAY, this.onPlay)
|
|
86
86
|
this.listenTo(this.core.activeContainer, Events.CONTAINER_STOP, this.onStop)
|
|
87
|
-
this.listenTo(
|
|
87
|
+
this.listenTo(
|
|
88
|
+
this.core.activeContainer,
|
|
89
|
+
Events.CONTAINER_PAUSE,
|
|
90
|
+
this.onPause,
|
|
91
|
+
)
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
private onPlay(_: string, { autoPlay }: { autoPlay?: boolean }) {
|
|
@@ -106,7 +110,8 @@ export class BigMuteButton extends UICorePlugin {
|
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
|
|
109
|
-
private onStop(_: string,
|
|
113
|
+
private onStop(_: string, metadata?: { ui?: boolean }) {
|
|
114
|
+
const ui = metadata?.ui
|
|
110
115
|
trace(`${T} onStop`, { ui })
|
|
111
116
|
if (ui) {
|
|
112
117
|
this.destroy()
|