From 90805cf260bbc72a5e33e2048cead87452288358 Mon Sep 17 00:00:00 2001 From: Roy Bregman Date: Mon, 23 Nov 2020 13:53:10 +0200 Subject: [PATCH] feat(FEC-10087): player visibility - Auto Pause --- src/kaltura-player.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/kaltura-player.js b/src/kaltura-player.js index 335ab060a..75baeccb7 100644 --- a/src/kaltura-player.js +++ b/src/kaltura-player.js @@ -178,6 +178,15 @@ class KalturaPlayer extends FakeEventTarget { return Utils.Object.copyDeep(mediaConfig); } + /** + * The state of the browser tab + * @public + * @returns {boolean} - The state of the browser tab (active or not) + */ + get isTabActive(): boolean { + return this._localPlayer.isTabActive; + } + /** * Config the player. * @param {Object} [config={}] - The player config.