@gcorevideo/player 2.28.20 → 2.28.21
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 +1 -1
- package/dist/index.css +259 -259
- package/dist/index.embed.js +94 -23
- package/dist/index.js +95 -24
- package/lib/plugins/audio-selector/AudioTracks.d.ts +2 -0
- package/lib/plugins/audio-selector/AudioTracks.d.ts.map +1 -1
- package/lib/plugins/audio-selector/AudioTracks.js +11 -0
- package/lib/plugins/bottom-gear/BottomGear.d.ts +2 -0
- package/lib/plugins/bottom-gear/BottomGear.d.ts.map +1 -1
- package/lib/plugins/bottom-gear/BottomGear.js +11 -0
- package/lib/plugins/media-control/MediaControl.d.ts +10 -0
- package/lib/plugins/media-control/MediaControl.d.ts.map +1 -1
- package/lib/plugins/media-control/MediaControl.js +20 -23
- package/lib/plugins/subtitles/ClosedCaptions.d.ts +3 -0
- package/lib/plugins/subtitles/ClosedCaptions.d.ts.map +1 -1
- package/lib/plugins/subtitles/ClosedCaptions.js +16 -0
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js +2 -0
- package/lib/utils/clickaway.d.ts +15 -0
- package/lib/utils/clickaway.d.ts.map +1 -0
- package/lib/utils/clickaway.js +40 -0
- package/package.json +1 -1
- package/src/plugins/audio-selector/AudioTracks.ts +15 -1
- package/src/plugins/bottom-gear/BottomGear.ts +13 -0
- package/src/plugins/media-control/MediaControl.ts +20 -25
- package/src/plugins/subtitles/ClosedCaptions.ts +19 -0
- package/src/testUtils.ts +2 -0
- package/src/utils/clickaway.ts +43 -0
- package/tsconfig.tsbuildinfo +1 -1
package/dist/index.embed.js
CHANGED
|
@@ -51528,6 +51528,46 @@ const fullscreenOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"
|
|
|
51528
51528
|
|
|
51529
51529
|
const fullscreenOnIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15.1568 23.15C15.7408 23.15 16.2142 22.6766 16.2142 22.0926V17.1947C16.2142 16.7253 16.5948 16.3447 17.0642 16.3447H21.9621C22.5461 16.3447 23.0195 15.8713 23.0195 15.2873C23.0195 14.7034 22.5461 14.2299 21.9621 14.2299H16.0642C14.9832 14.2299 14.0995 15.1137 14.0995 16.1947V22.0926C14.0995 22.6766 14.5729 23.15 15.1568 23.15Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M1.90739 10.7701H7.80528C8.88627 10.7701 9.77006 9.88627 9.77006 8.80528V2.90739C9.77006 2.32341 9.29665 1.85 8.71267 1.85C8.12869 1.85 7.65528 2.32341 7.65528 2.90739V7.80528C7.65528 8.27472 7.27472 8.65528 6.80528 8.65528H1.90739C1.32341 8.65528 0.85 9.12869 0.85 9.71267C0.85 10.2966 1.32341 10.7701 1.90739 10.7701Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M8.71261 23.15C9.29659 23.15 9.77 22.6766 9.77 22.0926V16.1947C9.77 15.1137 8.88621 14.2299 7.80521 14.2299H1.90733C1.32335 14.2299 0.849939 14.7034 0.849939 15.2873C0.849939 15.8713 1.32335 16.3447 1.90733 16.3447H6.80521C7.27466 16.3447 7.65521 16.7253 7.65521 17.1947V22.0926C7.65521 22.6766 8.12862 23.15 8.71261 23.15Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M21.9621 10.7701C22.5461 10.7701 23.0195 10.2966 23.0195 9.71267C23.0195 9.12869 22.5461 8.65528 21.9621 8.65528H17.0642C16.5948 8.65528 16.2142 8.27472 16.2142 7.80528V2.90739C16.2142 2.32341 15.7408 1.85 15.1568 1.85C14.5729 1.85 14.0995 2.32341 14.0995 2.90739V8.80528C14.0995 9.88627 14.9832 10.7701 16.0642 10.7701H21.9621Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n</svg>\n";
|
|
51530
51530
|
|
|
51531
|
+
/**
|
|
51532
|
+
*
|
|
51533
|
+
* @param {() => void} callback - The callback to call when the user clicks away from the element
|
|
51534
|
+
* @returns {(HTMLElement | null) => void}
|
|
51535
|
+
*/
|
|
51536
|
+
function clickaway(callback) {
|
|
51537
|
+
let handler = (event) => { };
|
|
51538
|
+
return (node) => {
|
|
51539
|
+
window.removeEventListener('click', handler);
|
|
51540
|
+
if (!node) {
|
|
51541
|
+
return;
|
|
51542
|
+
}
|
|
51543
|
+
handler = (event) => {
|
|
51544
|
+
if (!node.contains(event.target)) {
|
|
51545
|
+
window.removeEventListener('click', handler);
|
|
51546
|
+
callback();
|
|
51547
|
+
}
|
|
51548
|
+
};
|
|
51549
|
+
window.addEventListener('click', handler);
|
|
51550
|
+
};
|
|
51551
|
+
}
|
|
51552
|
+
/**
|
|
51553
|
+
* Sets up a clickaway handler for the media control on mobile devices.
|
|
51554
|
+
* The handler is deferred to ensure it is called after the next event loop tick.
|
|
51555
|
+
*
|
|
51556
|
+
* @param {() => void} callback - The callback to call when the user clicks away from the media control
|
|
51557
|
+
* @returns {(HTMLElement | null) => void}
|
|
51558
|
+
*/
|
|
51559
|
+
function mediaControlClickaway(callback) {
|
|
51560
|
+
if (!Browser.isMobile) {
|
|
51561
|
+
return () => { };
|
|
51562
|
+
}
|
|
51563
|
+
const cw = clickaway(callback);
|
|
51564
|
+
return (node) => {
|
|
51565
|
+
setTimeout(() => {
|
|
51566
|
+
cw(node);
|
|
51567
|
+
}, 0);
|
|
51568
|
+
};
|
|
51569
|
+
}
|
|
51570
|
+
|
|
51531
51571
|
// This is a derived work from the {@link https://github.com/clappr/clappr-plugins/tree/ffaa9d27005fa5a8a7c243ffc47eb5655b84b371/src/plugins/media_control | Clappr MediaControl plugin}
|
|
51532
51572
|
// It is redistributed under the terms of the {@link ../../../../../LICENSE | Apache 2.0} license.
|
|
51533
51573
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
@@ -51781,6 +51821,7 @@ class MediaControl extends UICorePlugin {
|
|
|
51781
51821
|
}
|
|
51782
51822
|
/**
|
|
51783
51823
|
* @internal
|
|
51824
|
+
* The methods declared here will be exposed via the main player object API
|
|
51784
51825
|
*/
|
|
51785
51826
|
getExternalInterface() {
|
|
51786
51827
|
return {
|
|
@@ -52445,6 +52486,23 @@ class MediaControl extends UICorePlugin {
|
|
|
52445
52486
|
mount(name, element) {
|
|
52446
52487
|
mountTo(this.getMountParent(name), element);
|
|
52447
52488
|
}
|
|
52489
|
+
/**
|
|
52490
|
+
* Set or reset the keep visibility state
|
|
52491
|
+
*
|
|
52492
|
+
* Keep visibility state controls whether the media control is hidden automatically after a delay.
|
|
52493
|
+
* Keep visibility prevents the the auto-hide behaviour
|
|
52494
|
+
*
|
|
52495
|
+
* @param keepVisible - The state
|
|
52496
|
+
*/
|
|
52497
|
+
setKeepVisible(keepVisible) {
|
|
52498
|
+
this.keepVisible = keepVisible;
|
|
52499
|
+
if (keepVisible) {
|
|
52500
|
+
this.clickaway(this.core.activeContainer.$el[0]);
|
|
52501
|
+
}
|
|
52502
|
+
else {
|
|
52503
|
+
this.clickaway(null);
|
|
52504
|
+
}
|
|
52505
|
+
}
|
|
52448
52506
|
getMountParent(name) {
|
|
52449
52507
|
switch (name) {
|
|
52450
52508
|
case 'root':
|
|
@@ -52744,13 +52802,7 @@ class MediaControl extends UICorePlugin {
|
|
|
52744
52802
|
delayHide() {
|
|
52745
52803
|
this.hide(this.options.hideMediaControlDelay || DEFAULT_HIDE_DELAY);
|
|
52746
52804
|
}
|
|
52747
|
-
|
|
52748
|
-
// as opposed to the click event
|
|
52749
|
-
clickaway = clickaway(() => {
|
|
52750
|
-
if (Browser.isMobile) {
|
|
52751
|
-
setTimeout(this.resetUserKeepVisible, 0);
|
|
52752
|
-
}
|
|
52753
|
-
});
|
|
52805
|
+
clickaway = mediaControlClickaway(() => this.resetUserKeepVisible());
|
|
52754
52806
|
}
|
|
52755
52807
|
MediaControl.extend = function (properties) {
|
|
52756
52808
|
return extend(MediaControl, properties);
|
|
@@ -52791,22 +52843,6 @@ function mergeElements(a, b) {
|
|
|
52791
52843
|
return acc;
|
|
52792
52844
|
}, a);
|
|
52793
52845
|
}
|
|
52794
|
-
function clickaway(callback) {
|
|
52795
|
-
let handler = (event) => { };
|
|
52796
|
-
return (node) => {
|
|
52797
|
-
window.removeEventListener('click', handler);
|
|
52798
|
-
if (!node) {
|
|
52799
|
-
return;
|
|
52800
|
-
}
|
|
52801
|
-
handler = (event) => {
|
|
52802
|
-
if (!node.contains(event.target)) {
|
|
52803
|
-
window.removeEventListener('click', handler);
|
|
52804
|
-
callback();
|
|
52805
|
-
}
|
|
52806
|
-
};
|
|
52807
|
-
window.addEventListener('click', handler);
|
|
52808
|
-
};
|
|
52809
|
-
}
|
|
52810
52846
|
|
|
52811
52847
|
const VERSION$6 = '2.22.4';
|
|
52812
52848
|
// const T = 'plugins.audiotracks'
|
|
@@ -52900,6 +52936,9 @@ class AudioTracks extends UICorePlugin {
|
|
|
52900
52936
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_CLICK, () => {
|
|
52901
52937
|
this.hideMenu();
|
|
52902
52938
|
});
|
|
52939
|
+
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_DESTROYED, () => {
|
|
52940
|
+
this.clickaway(null);
|
|
52941
|
+
});
|
|
52903
52942
|
}
|
|
52904
52943
|
shouldRender() {
|
|
52905
52944
|
// Render is called from the parent class constructor so tracks aren't available
|
|
@@ -52939,6 +52978,7 @@ class AudioTracks extends UICorePlugin {
|
|
|
52939
52978
|
this.open = false;
|
|
52940
52979
|
this.$el.find('#gplayer-audiotracks-menu').hide();
|
|
52941
52980
|
this.$el.find('#gplayer-audiotracks-button').attr('aria-expanded', 'false');
|
|
52981
|
+
this.setKeepVisible(false);
|
|
52942
52982
|
}
|
|
52943
52983
|
toggleMenu() {
|
|
52944
52984
|
this.open = !this.open;
|
|
@@ -52954,6 +52994,11 @@ class AudioTracks extends UICorePlugin {
|
|
|
52954
52994
|
this.$el
|
|
52955
52995
|
.find('#gplayer-audiotracks-button')
|
|
52956
52996
|
.attr('aria-expanded', this.open);
|
|
52997
|
+
this.setKeepVisible(this.open);
|
|
52998
|
+
}
|
|
52999
|
+
setKeepVisible(keepVisible) {
|
|
53000
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
53001
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
52957
53002
|
}
|
|
52958
53003
|
buttonElement() {
|
|
52959
53004
|
return this.$('#gplayer-audiotracks-button');
|
|
@@ -52999,6 +53044,7 @@ class AudioTracks extends UICorePlugin {
|
|
|
52999
53044
|
this.core.getPlugin('media_control')?.slot('audiotracks', this.$el);
|
|
53000
53045
|
}
|
|
53001
53046
|
}
|
|
53047
|
+
clickaway = mediaControlClickaway(() => this.hideMenu());
|
|
53002
53048
|
}
|
|
53003
53049
|
|
|
53004
53050
|
const templateHtml$2 = "<div class=\"big-mute-icon-wrapper\" data-big-mute id=\"gplayer-big-mute-button\">\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon id=\"gplayer-big-mute-icon\"></div>\n</div>\n";
|
|
@@ -53329,6 +53375,9 @@ class BottomGear extends UICorePlugin {
|
|
|
53329
53375
|
this.listenTo(container, Events$1.CONTAINER_CLICK, () => {
|
|
53330
53376
|
this.collapse();
|
|
53331
53377
|
});
|
|
53378
|
+
this.listenTo(container, Events$1.CONTAINER_DESTROYED, () => {
|
|
53379
|
+
this.clickaway(null);
|
|
53380
|
+
});
|
|
53332
53381
|
}
|
|
53333
53382
|
highDefinitionUpdate(isHd) {
|
|
53334
53383
|
this.hd = isHd;
|
|
@@ -53381,6 +53430,11 @@ class BottomGear extends UICorePlugin {
|
|
|
53381
53430
|
this.$el
|
|
53382
53431
|
.find('#gear-button')
|
|
53383
53432
|
.attr('aria-expanded', (!this.collapsed).toString());
|
|
53433
|
+
this.setKeepVisible(!this.collapsed);
|
|
53434
|
+
}
|
|
53435
|
+
setKeepVisible(keepVisible) {
|
|
53436
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
53437
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
53384
53438
|
}
|
|
53385
53439
|
collapse() {
|
|
53386
53440
|
this.collapsed = true;
|
|
@@ -53388,6 +53442,7 @@ class BottomGear extends UICorePlugin {
|
|
|
53388
53442
|
this.$el.find('#gear-button').attr('aria-expanded', 'false');
|
|
53389
53443
|
// TODO hide submenus
|
|
53390
53444
|
this.collapseSubmenus();
|
|
53445
|
+
this.setKeepVisible(false);
|
|
53391
53446
|
}
|
|
53392
53447
|
onCoreReady() {
|
|
53393
53448
|
const mediaControl = this.core.getPlugin('media_control');
|
|
@@ -53420,6 +53475,7 @@ class BottomGear extends UICorePlugin {
|
|
|
53420
53475
|
.find('.gear-sub-menu')
|
|
53421
53476
|
.css('max-height', `${availableHeight - MENU_BACKLINK_HEIGHT}px`);
|
|
53422
53477
|
}
|
|
53478
|
+
clickaway = mediaControlClickaway(() => this.collapse());
|
|
53423
53479
|
}
|
|
53424
53480
|
|
|
53425
53481
|
/**
|
|
@@ -58450,6 +58506,9 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58450
58506
|
onContainerChanged() {
|
|
58451
58507
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_FULLSCREEN, this.onContainerResize);
|
|
58452
58508
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_RESIZE, this.onContainerResize);
|
|
58509
|
+
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_DESTROYED, () => {
|
|
58510
|
+
this.clickaway(null);
|
|
58511
|
+
});
|
|
58453
58512
|
this.listenTo(this.core.activeContainer, 'container:advertisement:start', this.onStartAd);
|
|
58454
58513
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SUBTITLE_AVAILABLE, this.onSubtitleAvailable);
|
|
58455
58514
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SUBTITLE_CHANGED, this.onSubtitleChanged);
|
|
@@ -58644,6 +58703,7 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58644
58703
|
this.open = false;
|
|
58645
58704
|
this.$el.find('#gplayer-cc-menu').hide();
|
|
58646
58705
|
this.$el.find('#gplayer-cc-button').attr('aria-expanded', 'false');
|
|
58706
|
+
this.setKeepVisible(false);
|
|
58647
58707
|
}
|
|
58648
58708
|
toggleMenu() {
|
|
58649
58709
|
this.core
|
|
@@ -58657,6 +58717,13 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58657
58717
|
this.$el.find('#gplayer-cc-menu').hide();
|
|
58658
58718
|
}
|
|
58659
58719
|
this.$el.find('#gplayer-cc-button').attr('aria-expanded', this.open);
|
|
58720
|
+
this.setKeepVisible(this.open);
|
|
58721
|
+
}
|
|
58722
|
+
setKeepVisible(keepVisible) {
|
|
58723
|
+
if (this.shouldKeepVisible) {
|
|
58724
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
58725
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
58726
|
+
}
|
|
58660
58727
|
}
|
|
58661
58728
|
itemElement(id) {
|
|
58662
58729
|
// TODO fix semantically
|
|
@@ -58731,6 +58798,10 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
58731
58798
|
mediaControl.slot('cc', this.$el);
|
|
58732
58799
|
}
|
|
58733
58800
|
}
|
|
58801
|
+
get shouldKeepVisible() {
|
|
58802
|
+
return !!this.options.cc?.keepVisible;
|
|
58803
|
+
}
|
|
58804
|
+
clickaway = mediaControlClickaway(() => this.hideMenu());
|
|
58734
58805
|
}
|
|
58735
58806
|
|
|
58736
58807
|
// An example implementation of client side performancestatistics
|
package/dist/index.js
CHANGED
|
@@ -51409,7 +51409,7 @@ class Player {
|
|
|
51409
51409
|
}
|
|
51410
51410
|
}
|
|
51411
51411
|
|
|
51412
|
-
var version$1 = "2.28.
|
|
51412
|
+
var version$1 = "2.28.21";
|
|
51413
51413
|
|
|
51414
51414
|
var packages = {
|
|
51415
51415
|
"node_modules/@clappr/core": {
|
|
@@ -51712,6 +51712,46 @@ const fullscreenOffIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"
|
|
|
51712
51712
|
|
|
51713
51713
|
const fullscreenOnIcon = "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15.1568 23.15C15.7408 23.15 16.2142 22.6766 16.2142 22.0926V17.1947C16.2142 16.7253 16.5948 16.3447 17.0642 16.3447H21.9621C22.5461 16.3447 23.0195 15.8713 23.0195 15.2873C23.0195 14.7034 22.5461 14.2299 21.9621 14.2299H16.0642C14.9832 14.2299 14.0995 15.1137 14.0995 16.1947V22.0926C14.0995 22.6766 14.5729 23.15 15.1568 23.15Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M1.90739 10.7701H7.80528C8.88627 10.7701 9.77006 9.88627 9.77006 8.80528V2.90739C9.77006 2.32341 9.29665 1.85 8.71267 1.85C8.12869 1.85 7.65528 2.32341 7.65528 2.90739V7.80528C7.65528 8.27472 7.27472 8.65528 6.80528 8.65528H1.90739C1.32341 8.65528 0.85 9.12869 0.85 9.71267C0.85 10.2966 1.32341 10.7701 1.90739 10.7701Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M8.71261 23.15C9.29659 23.15 9.77 22.6766 9.77 22.0926V16.1947C9.77 15.1137 8.88621 14.2299 7.80521 14.2299H1.90733C1.32335 14.2299 0.849939 14.7034 0.849939 15.2873C0.849939 15.8713 1.32335 16.3447 1.90733 16.3447H6.80521C7.27466 16.3447 7.65521 16.7253 7.65521 17.1947V22.0926C7.65521 22.6766 8.12862 23.15 8.71261 23.15Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n <path\n d=\"M21.9621 10.7701C22.5461 10.7701 23.0195 10.2966 23.0195 9.71267C23.0195 9.12869 22.5461 8.65528 21.9621 8.65528H17.0642C16.5948 8.65528 16.2142 8.27472 16.2142 7.80528V2.90739C16.2142 2.32341 15.7408 1.85 15.1568 1.85C14.5729 1.85 14.0995 2.32341 14.0995 2.90739V8.80528C14.0995 9.88627 14.9832 10.7701 16.0642 10.7701H21.9621Z\"\n fill=\"#C9C9C9\" stroke=\"#C9C9C9\" stroke-width=\"0.3\"/>\n</svg>\n";
|
|
51714
51714
|
|
|
51715
|
+
/**
|
|
51716
|
+
*
|
|
51717
|
+
* @param {() => void} callback - The callback to call when the user clicks away from the element
|
|
51718
|
+
* @returns {(HTMLElement | null) => void}
|
|
51719
|
+
*/
|
|
51720
|
+
function clickaway(callback) {
|
|
51721
|
+
let handler = (event) => { };
|
|
51722
|
+
return (node) => {
|
|
51723
|
+
window.removeEventListener('click', handler);
|
|
51724
|
+
if (!node) {
|
|
51725
|
+
return;
|
|
51726
|
+
}
|
|
51727
|
+
handler = (event) => {
|
|
51728
|
+
if (!node.contains(event.target)) {
|
|
51729
|
+
window.removeEventListener('click', handler);
|
|
51730
|
+
callback();
|
|
51731
|
+
}
|
|
51732
|
+
};
|
|
51733
|
+
window.addEventListener('click', handler);
|
|
51734
|
+
};
|
|
51735
|
+
}
|
|
51736
|
+
/**
|
|
51737
|
+
* Sets up a clickaway handler for the media control on mobile devices.
|
|
51738
|
+
* The handler is deferred to ensure it is called after the next event loop tick.
|
|
51739
|
+
*
|
|
51740
|
+
* @param {() => void} callback - The callback to call when the user clicks away from the media control
|
|
51741
|
+
* @returns {(HTMLElement | null) => void}
|
|
51742
|
+
*/
|
|
51743
|
+
function mediaControlClickaway(callback) {
|
|
51744
|
+
if (!Browser.isMobile) {
|
|
51745
|
+
return () => { };
|
|
51746
|
+
}
|
|
51747
|
+
const cw = clickaway(callback);
|
|
51748
|
+
return (node) => {
|
|
51749
|
+
setTimeout(() => {
|
|
51750
|
+
cw(node);
|
|
51751
|
+
}, 0);
|
|
51752
|
+
};
|
|
51753
|
+
}
|
|
51754
|
+
|
|
51715
51755
|
// This is a derived work from the {@link https://github.com/clappr/clappr-plugins/tree/ffaa9d27005fa5a8a7c243ffc47eb5655b84b371/src/plugins/media_control | Clappr MediaControl plugin}
|
|
51716
51756
|
// It is redistributed under the terms of the {@link ../../../../../LICENSE | Apache 2.0} license.
|
|
51717
51757
|
// Copyright 2014 Globo.com Player authors. All rights reserved.
|
|
@@ -51965,6 +52005,7 @@ class MediaControl extends UICorePlugin {
|
|
|
51965
52005
|
}
|
|
51966
52006
|
/**
|
|
51967
52007
|
* @internal
|
|
52008
|
+
* The methods declared here will be exposed via the main player object API
|
|
51968
52009
|
*/
|
|
51969
52010
|
getExternalInterface() {
|
|
51970
52011
|
return {
|
|
@@ -52633,6 +52674,23 @@ class MediaControl extends UICorePlugin {
|
|
|
52633
52674
|
mount(name, element) {
|
|
52634
52675
|
mountTo(this.getMountParent(name), element);
|
|
52635
52676
|
}
|
|
52677
|
+
/**
|
|
52678
|
+
* Set or reset the keep visibility state
|
|
52679
|
+
*
|
|
52680
|
+
* Keep visibility state controls whether the media control is hidden automatically after a delay.
|
|
52681
|
+
* Keep visibility prevents the the auto-hide behaviour
|
|
52682
|
+
*
|
|
52683
|
+
* @param keepVisible - The state
|
|
52684
|
+
*/
|
|
52685
|
+
setKeepVisible(keepVisible) {
|
|
52686
|
+
this.keepVisible = keepVisible;
|
|
52687
|
+
if (keepVisible) {
|
|
52688
|
+
this.clickaway(this.core.activeContainer.$el[0]);
|
|
52689
|
+
}
|
|
52690
|
+
else {
|
|
52691
|
+
this.clickaway(null);
|
|
52692
|
+
}
|
|
52693
|
+
}
|
|
52636
52694
|
getMountParent(name) {
|
|
52637
52695
|
switch (name) {
|
|
52638
52696
|
case 'root':
|
|
@@ -52932,13 +52990,7 @@ class MediaControl extends UICorePlugin {
|
|
|
52932
52990
|
delayHide() {
|
|
52933
52991
|
this.hide(this.options.hideMediaControlDelay || DEFAULT_HIDE_DELAY);
|
|
52934
52992
|
}
|
|
52935
|
-
|
|
52936
|
-
// as opposed to the click event
|
|
52937
|
-
clickaway = clickaway(() => {
|
|
52938
|
-
if (Browser.isMobile) {
|
|
52939
|
-
setTimeout(this.resetUserKeepVisible, 0);
|
|
52940
|
-
}
|
|
52941
|
-
});
|
|
52993
|
+
clickaway = mediaControlClickaway(() => this.resetUserKeepVisible());
|
|
52942
52994
|
}
|
|
52943
52995
|
MediaControl.extend = function (properties) {
|
|
52944
52996
|
return extend(MediaControl, properties);
|
|
@@ -52979,22 +53031,6 @@ function mergeElements(a, b) {
|
|
|
52979
53031
|
return acc;
|
|
52980
53032
|
}, a);
|
|
52981
53033
|
}
|
|
52982
|
-
function clickaway(callback) {
|
|
52983
|
-
let handler = (event) => { };
|
|
52984
|
-
return (node) => {
|
|
52985
|
-
window.removeEventListener('click', handler);
|
|
52986
|
-
if (!node) {
|
|
52987
|
-
return;
|
|
52988
|
-
}
|
|
52989
|
-
handler = (event) => {
|
|
52990
|
-
if (!node.contains(event.target)) {
|
|
52991
|
-
window.removeEventListener('click', handler);
|
|
52992
|
-
callback();
|
|
52993
|
-
}
|
|
52994
|
-
};
|
|
52995
|
-
window.addEventListener('click', handler);
|
|
52996
|
-
};
|
|
52997
|
-
}
|
|
52998
53034
|
|
|
52999
53035
|
const VERSION$7 = '2.22.4';
|
|
53000
53036
|
// const T = 'plugins.audiotracks'
|
|
@@ -53088,6 +53124,9 @@ class AudioTracks extends UICorePlugin {
|
|
|
53088
53124
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_CLICK, () => {
|
|
53089
53125
|
this.hideMenu();
|
|
53090
53126
|
});
|
|
53127
|
+
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_DESTROYED, () => {
|
|
53128
|
+
this.clickaway(null);
|
|
53129
|
+
});
|
|
53091
53130
|
}
|
|
53092
53131
|
shouldRender() {
|
|
53093
53132
|
// Render is called from the parent class constructor so tracks aren't available
|
|
@@ -53127,6 +53166,7 @@ class AudioTracks extends UICorePlugin {
|
|
|
53127
53166
|
this.open = false;
|
|
53128
53167
|
this.$el.find('#gplayer-audiotracks-menu').hide();
|
|
53129
53168
|
this.$el.find('#gplayer-audiotracks-button').attr('aria-expanded', 'false');
|
|
53169
|
+
this.setKeepVisible(false);
|
|
53130
53170
|
}
|
|
53131
53171
|
toggleMenu() {
|
|
53132
53172
|
this.open = !this.open;
|
|
@@ -53142,6 +53182,11 @@ class AudioTracks extends UICorePlugin {
|
|
|
53142
53182
|
this.$el
|
|
53143
53183
|
.find('#gplayer-audiotracks-button')
|
|
53144
53184
|
.attr('aria-expanded', this.open);
|
|
53185
|
+
this.setKeepVisible(this.open);
|
|
53186
|
+
}
|
|
53187
|
+
setKeepVisible(keepVisible) {
|
|
53188
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
53189
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
53145
53190
|
}
|
|
53146
53191
|
buttonElement() {
|
|
53147
53192
|
return this.$('#gplayer-audiotracks-button');
|
|
@@ -53187,6 +53232,7 @@ class AudioTracks extends UICorePlugin {
|
|
|
53187
53232
|
this.core.getPlugin('media_control')?.slot('audiotracks', this.$el);
|
|
53188
53233
|
}
|
|
53189
53234
|
}
|
|
53235
|
+
clickaway = mediaControlClickaway(() => this.hideMenu());
|
|
53190
53236
|
}
|
|
53191
53237
|
|
|
53192
53238
|
const templateHtml$2 = "<div class=\"big-mute-icon-wrapper\" data-big-mute id=\"gplayer-big-mute-button\">\n <div class=\"big-mute-icon gcore-skin-border-color\" data-big-mute-icon id=\"gplayer-big-mute-icon\"></div>\n</div>\n";
|
|
@@ -53515,6 +53561,9 @@ class BottomGear extends UICorePlugin {
|
|
|
53515
53561
|
this.listenTo(container, Events$1.CONTAINER_CLICK, () => {
|
|
53516
53562
|
this.collapse();
|
|
53517
53563
|
});
|
|
53564
|
+
this.listenTo(container, Events$1.CONTAINER_DESTROYED, () => {
|
|
53565
|
+
this.clickaway(null);
|
|
53566
|
+
});
|
|
53518
53567
|
}
|
|
53519
53568
|
highDefinitionUpdate(isHd) {
|
|
53520
53569
|
this.hd = isHd;
|
|
@@ -53567,6 +53616,11 @@ class BottomGear extends UICorePlugin {
|
|
|
53567
53616
|
this.$el
|
|
53568
53617
|
.find('#gear-button')
|
|
53569
53618
|
.attr('aria-expanded', (!this.collapsed).toString());
|
|
53619
|
+
this.setKeepVisible(!this.collapsed);
|
|
53620
|
+
}
|
|
53621
|
+
setKeepVisible(keepVisible) {
|
|
53622
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
53623
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
53570
53624
|
}
|
|
53571
53625
|
collapse() {
|
|
53572
53626
|
this.collapsed = true;
|
|
@@ -53574,6 +53628,7 @@ class BottomGear extends UICorePlugin {
|
|
|
53574
53628
|
this.$el.find('#gear-button').attr('aria-expanded', 'false');
|
|
53575
53629
|
// TODO hide submenus
|
|
53576
53630
|
this.collapseSubmenus();
|
|
53631
|
+
this.setKeepVisible(false);
|
|
53577
53632
|
}
|
|
53578
53633
|
onCoreReady() {
|
|
53579
53634
|
const mediaControl = this.core.getPlugin('media_control');
|
|
@@ -53606,6 +53661,7 @@ class BottomGear extends UICorePlugin {
|
|
|
53606
53661
|
.find('.gear-sub-menu')
|
|
53607
53662
|
.css('max-height', `${availableHeight - MENU_BACKLINK_HEIGHT}px`);
|
|
53608
53663
|
}
|
|
53664
|
+
clickaway = mediaControlClickaway(() => this.collapse());
|
|
53609
53665
|
}
|
|
53610
53666
|
|
|
53611
53667
|
/**
|
|
@@ -59817,6 +59873,9 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
59817
59873
|
onContainerChanged() {
|
|
59818
59874
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_FULLSCREEN, this.onContainerResize);
|
|
59819
59875
|
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_RESIZE, this.onContainerResize);
|
|
59876
|
+
this.listenTo(this.core.activeContainer, Events$1.CONTAINER_DESTROYED, () => {
|
|
59877
|
+
this.clickaway(null);
|
|
59878
|
+
});
|
|
59820
59879
|
this.listenTo(this.core.activeContainer, 'container:advertisement:start', this.onStartAd);
|
|
59821
59880
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SUBTITLE_AVAILABLE, this.onSubtitleAvailable);
|
|
59822
59881
|
this.listenTo(this.core.activePlayback, Events$1.PLAYBACK_SUBTITLE_CHANGED, this.onSubtitleChanged);
|
|
@@ -60014,6 +60073,7 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
60014
60073
|
this.open = false;
|
|
60015
60074
|
this.$el.find('#gplayer-cc-menu').hide();
|
|
60016
60075
|
this.$el.find('#gplayer-cc-button').attr('aria-expanded', 'false');
|
|
60076
|
+
this.setKeepVisible(false);
|
|
60017
60077
|
}
|
|
60018
60078
|
toggleMenu() {
|
|
60019
60079
|
this.core
|
|
@@ -60027,6 +60087,13 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
60027
60087
|
this.$el.find('#gplayer-cc-menu').hide();
|
|
60028
60088
|
}
|
|
60029
60089
|
this.$el.find('#gplayer-cc-button').attr('aria-expanded', this.open);
|
|
60090
|
+
this.setKeepVisible(this.open);
|
|
60091
|
+
}
|
|
60092
|
+
setKeepVisible(keepVisible) {
|
|
60093
|
+
if (this.shouldKeepVisible) {
|
|
60094
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
60095
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
60096
|
+
}
|
|
60030
60097
|
}
|
|
60031
60098
|
itemElement(id) {
|
|
60032
60099
|
// TODO fix semantically
|
|
@@ -60101,6 +60168,10 @@ class ClosedCaptions extends UICorePlugin {
|
|
|
60101
60168
|
mediaControl.slot('cc', this.$el);
|
|
60102
60169
|
}
|
|
60103
60170
|
}
|
|
60171
|
+
get shouldKeepVisible() {
|
|
60172
|
+
return !!this.options.cc?.keepVisible;
|
|
60173
|
+
}
|
|
60174
|
+
clickaway = mediaControlClickaway(() => this.hideMenu());
|
|
60104
60175
|
}
|
|
60105
60176
|
|
|
60106
60177
|
// An example implementation of client side performancestatistics
|
|
@@ -56,6 +56,7 @@ export declare class AudioTracks extends UICorePlugin {
|
|
|
56
56
|
private selectAudioTrack;
|
|
57
57
|
private hideMenu;
|
|
58
58
|
private toggleMenu;
|
|
59
|
+
private setKeepVisible;
|
|
59
60
|
private buttonElement;
|
|
60
61
|
private buttonElementText;
|
|
61
62
|
private trackElement;
|
|
@@ -64,5 +65,6 @@ export declare class AudioTracks extends UICorePlugin {
|
|
|
64
65
|
private updateText;
|
|
65
66
|
private highlightCurrentTrack;
|
|
66
67
|
private mount;
|
|
68
|
+
private clickaway;
|
|
67
69
|
}
|
|
68
70
|
//# sourceMappingURL=AudioTracks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AudioTracks.d.ts","sourceRoot":"","sources":["../../../src/plugins/audio-selector/AudioTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAY,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"AudioTracks.d.ts","sourceRoot":"","sources":["../../../src/plugins/audio-selector/AudioTracks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAY,MAAM,cAAc,CAAA;AAiB7D;;;;;;;;;GASG;AACH,qBAAa,WAAY,SAAQ,YAAY;IAC3C,OAAO,CAAC,YAAY,CAA0B;IAE9C,OAAO,CAAC,IAAI,CAAQ;IAEpB,OAAO,CAAC,MAAM,CAAmB;IAEjC;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;IACH,MAAM,KAAK,OAAO,WAEjB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,UAAU;;MAItB;IAED;;OAEG;IACH,IAAa,MAAM;;;MAKlB;IAED;;OAEG;IACM,UAAU;IASnB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,wBAAwB;IAgChC,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACM,MAAM;IAgBf,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,gBAAgB;IAMxB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,UAAU;IAkBlB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,qBAAqB;IAgB7B,OAAO,CAAC,KAAK;IAMb,OAAO,CAAC,SAAS,CAA+C;CACjE"}
|
|
@@ -5,6 +5,7 @@ import { CLAPPR_VERSION } from '../../build.js';
|
|
|
5
5
|
import pluginHtml from '../../../assets/audio-tracks/template.ejs';
|
|
6
6
|
import audioArrow from '../../../assets/icons/old/quality-arrow.svg';
|
|
7
7
|
import { ExtendedEvents } from '../media-control/MediaControl.js';
|
|
8
|
+
import { mediaControlClickaway } from '../../utils/clickaway.js';
|
|
8
9
|
const VERSION = '2.22.4';
|
|
9
10
|
// const T = 'plugins.audiotracks'
|
|
10
11
|
/**
|
|
@@ -97,6 +98,9 @@ export class AudioTracks extends UICorePlugin {
|
|
|
97
98
|
this.listenTo(this.core.activeContainer, Events.CONTAINER_CLICK, () => {
|
|
98
99
|
this.hideMenu();
|
|
99
100
|
});
|
|
101
|
+
this.listenTo(this.core.activeContainer, Events.CONTAINER_DESTROYED, () => {
|
|
102
|
+
this.clickaway(null);
|
|
103
|
+
});
|
|
100
104
|
}
|
|
101
105
|
shouldRender() {
|
|
102
106
|
// Render is called from the parent class constructor so tracks aren't available
|
|
@@ -136,6 +140,7 @@ export class AudioTracks extends UICorePlugin {
|
|
|
136
140
|
this.open = false;
|
|
137
141
|
this.$el.find('#gplayer-audiotracks-menu').hide();
|
|
138
142
|
this.$el.find('#gplayer-audiotracks-button').attr('aria-expanded', 'false');
|
|
143
|
+
this.setKeepVisible(false);
|
|
139
144
|
}
|
|
140
145
|
toggleMenu() {
|
|
141
146
|
this.open = !this.open;
|
|
@@ -151,6 +156,11 @@ export class AudioTracks extends UICorePlugin {
|
|
|
151
156
|
this.$el
|
|
152
157
|
.find('#gplayer-audiotracks-button')
|
|
153
158
|
.attr('aria-expanded', this.open);
|
|
159
|
+
this.setKeepVisible(this.open);
|
|
160
|
+
}
|
|
161
|
+
setKeepVisible(keepVisible) {
|
|
162
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
163
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
154
164
|
}
|
|
155
165
|
buttonElement() {
|
|
156
166
|
return this.$('#gplayer-audiotracks-button');
|
|
@@ -196,4 +206,5 @@ export class AudioTracks extends UICorePlugin {
|
|
|
196
206
|
this.core.getPlugin('media_control')?.slot('audiotracks', this.$el);
|
|
197
207
|
}
|
|
198
208
|
}
|
|
209
|
+
clickaway = mediaControlClickaway(() => this.hideMenu());
|
|
199
210
|
}
|
|
@@ -152,10 +152,12 @@ export declare class BottomGear extends UICorePlugin {
|
|
|
152
152
|
refresh(): void;
|
|
153
153
|
private collapseSubmenus;
|
|
154
154
|
private toggleMenu;
|
|
155
|
+
private setKeepVisible;
|
|
155
156
|
private collapse;
|
|
156
157
|
private onCoreReady;
|
|
157
158
|
private onMediaControlRendered;
|
|
158
159
|
private mount;
|
|
159
160
|
private clampPopup;
|
|
161
|
+
private clickaway;
|
|
160
162
|
}
|
|
161
163
|
//# sourceMappingURL=BottomGear.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomGear.d.ts","sourceRoot":"","sources":["../../../src/plugins/bottom-gear/BottomGear.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAKb,MAAM,cAAc,CAAA;AAOrB,OAAO,uCAAuC,CAAA;AAC9C,OAAO,gDAAgD,CAAA;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"BottomGear.d.ts","sourceRoot":"","sources":["../../../src/plugins/bottom-gear/BottomGear.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAKb,MAAM,cAAc,CAAA;AAOrB,OAAO,uCAAuC,CAAA;AAC9C,OAAO,gDAAgD,CAAA;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAU5C;;;GAGG;AACH,oBAAY,UAAU;IACpB;;OAEG;IACH,QAAQ,aAAa;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,qBAAa,UAAW,SAAQ,YAAY;IAC1C,OAAO,CAAC,EAAE,CAAQ;IAElB,OAAO,CAAC,QAAQ,CAAI;IAEpB,OAAO,CAAC,SAAS,CAAO;IAExB;;OAEG;IACH,IAAI,IAAI,WAEP;IAED;;OAEG;IACH,IAAI,gBAAgB;;MAEnB;IAED;;OAEG;IACH,MAAM,KAAK,OAAO,WAEjB;IAED,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAuB;IAEvD;;OAEG;IACH,IAAa,UAAU;;MAItB;IAED;;OAEG;IACH,IAAa,MAAM;;MAIlB;IAED;;OAEG;IACM,UAAU;IAInB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,WAAW,GAAG,WAAW;IAyB1D,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,oBAAoB;IAK5B;;OAEG;IACM,MAAM;IAqBf;;;;OAIG;IACH,OAAO;IAIP,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,UAAU;IAgBlB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,WAAW;IA6BnB,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,SAAS,CAA+C;CACjE"}
|
|
@@ -8,6 +8,7 @@ import '../../../assets/bottom-gear/gear-sub-menu.scss';
|
|
|
8
8
|
import gearIcon from '../../../assets/icons/new/gear.svg';
|
|
9
9
|
import gearHdIcon from '../../../assets/icons/new/gear-hd.svg';
|
|
10
10
|
import { ExtendedEvents } from '../media-control/MediaControl.js';
|
|
11
|
+
import { mediaControlClickaway } from '../../utils/clickaway.js';
|
|
11
12
|
const VERSION = '2.19.12';
|
|
12
13
|
// const T = 'plugins.bottom_gear'
|
|
13
14
|
const MENU_BACKLINK_HEIGHT = 44;
|
|
@@ -186,6 +187,9 @@ export class BottomGear extends UICorePlugin {
|
|
|
186
187
|
this.listenTo(container, ClapprEvents.CONTAINER_CLICK, () => {
|
|
187
188
|
this.collapse();
|
|
188
189
|
});
|
|
190
|
+
this.listenTo(container, ClapprEvents.CONTAINER_DESTROYED, () => {
|
|
191
|
+
this.clickaway(null);
|
|
192
|
+
});
|
|
189
193
|
}
|
|
190
194
|
highDefinitionUpdate(isHd) {
|
|
191
195
|
this.hd = isHd;
|
|
@@ -238,6 +242,11 @@ export class BottomGear extends UICorePlugin {
|
|
|
238
242
|
this.$el
|
|
239
243
|
.find('#gear-button')
|
|
240
244
|
.attr('aria-expanded', (!this.collapsed).toString());
|
|
245
|
+
this.setKeepVisible(!this.collapsed);
|
|
246
|
+
}
|
|
247
|
+
setKeepVisible(keepVisible) {
|
|
248
|
+
this.core.getPlugin('media_control').setKeepVisible(keepVisible);
|
|
249
|
+
this.clickaway(keepVisible ? this.core.activeContainer.$el[0] : null);
|
|
241
250
|
}
|
|
242
251
|
collapse() {
|
|
243
252
|
this.collapsed = true;
|
|
@@ -245,6 +254,7 @@ export class BottomGear extends UICorePlugin {
|
|
|
245
254
|
this.$el.find('#gear-button').attr('aria-expanded', 'false');
|
|
246
255
|
// TODO hide submenus
|
|
247
256
|
this.collapseSubmenus();
|
|
257
|
+
this.setKeepVisible(false);
|
|
248
258
|
}
|
|
249
259
|
onCoreReady() {
|
|
250
260
|
const mediaControl = this.core.getPlugin('media_control');
|
|
@@ -277,4 +287,5 @@ export class BottomGear extends UICorePlugin {
|
|
|
277
287
|
.find('.gear-sub-menu')
|
|
278
288
|
.css('max-height', `${availableHeight - MENU_BACKLINK_HEIGHT}px`);
|
|
279
289
|
}
|
|
290
|
+
clickaway = mediaControlClickaway(() => this.collapse());
|
|
280
291
|
}
|
|
@@ -205,6 +205,7 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
205
205
|
constructor(core: Core);
|
|
206
206
|
/**
|
|
207
207
|
* @internal
|
|
208
|
+
* The methods declared here will be exposed via the main player object API
|
|
208
209
|
*/
|
|
209
210
|
getExternalInterface(): {
|
|
210
211
|
setVolume: (value: number, isInitialVolume?: boolean) => void;
|
|
@@ -330,6 +331,15 @@ export declare class MediaControl extends UICorePlugin {
|
|
|
330
331
|
* ```
|
|
331
332
|
*/
|
|
332
333
|
mount(name: MediaControlSlotMountPoint, element: ZeptoResult): void;
|
|
334
|
+
/**
|
|
335
|
+
* Set or reset the keep visibility state
|
|
336
|
+
*
|
|
337
|
+
* Keep visibility state controls whether the media control is hidden automatically after a delay.
|
|
338
|
+
* Keep visibility prevents the the auto-hide behaviour
|
|
339
|
+
*
|
|
340
|
+
* @param keepVisible - The state
|
|
341
|
+
*/
|
|
342
|
+
setKeepVisible(keepVisible: boolean): void;
|
|
333
343
|
private getMountParent;
|
|
334
344
|
/**
|
|
335
345
|
* Toggle the visibility of a media control element
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaControl.d.ts","sourceRoot":"","sources":["../../../src/plugins/media-control/MediaControl.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,YAAY,EAMZ,IAAI,EACL,MAAM,cAAc,CAAA;AASrB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAI5C,OAAO,kDAAkD,CAAA;
|
|
1
|
+
{"version":3,"file":"MediaControl.d.ts","sourceRoot":"","sources":["../../../src/plugins/media-control/MediaControl.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,YAAY,EAMZ,IAAI,EACL,MAAM,cAAc,CAAA;AASrB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAI5C,OAAO,kDAAkD,CAAA;AA2BzD;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GACnC,UAAU,GACV,YAAY,GACZ,cAAc,GACd,WAAW,GACX,UAAU,GACV,UAAU,GACV,SAAS,GACT,QAAQ,CAAA;AAEZ;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAClC,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,CAAA;AAEb;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAA;AAExC;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,mBAAmB,EAAE,CAAA;IAC3B,KAAK,EAAE,mBAAmB,EAAE,CAAA;IAC5B,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,WAAW,EAAE,OAAO,CAAA;CACrB,CAAA;AAuBD;;;GAGG;AACH,oBAAY,cAAc;IACxB,mBAAmB,wBAAwB;IAC3C,0BAA0B,+BAA+B;CAC1D;AAID;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAa,SAAQ,YAAY;IAG5C,OAAO,CAAC,YAAY,CAAsB;IAE1C,OAAO,CAAC,oBAAoB,CAAY;IACxC,OAAO,CAAC,oBAAoB,CAAY;IACxC,OAAO,CAAC,wBAAwB,CAAI;IAGpC,OAAO,CAAC,iBAAiB,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