diff --git a/lib/cast/cast_utils.js b/lib/cast/cast_utils.js index 91b1309deb..67990454f1 100644 --- a/lib/cast/cast_utils.js +++ b/lib/cast/cast_utils.js @@ -388,6 +388,7 @@ shaka.cast.CastUtils.PlayerVoidMethods = [ 'selectVariantsByLabel', 'setTextTrackVisibility', 'trickPlay', + 'goToLive', ]; diff --git a/lib/player.js b/lib/player.js index 169fa92697..977d7d3b40 100644 --- a/lib/player.js +++ b/lib/player.js @@ -3130,6 +3130,19 @@ shaka.Player = class extends shaka.util.FakeEventTarget { return {'start': 0, 'end': 0}; } + /** + * Go to live in a live stream. + * + * @export + */ + goToLive() { + if (this.isLive()) { + this.video_.currentTime = this.seekRange().end; + } else { + shaka.log.warning('goToLive is for live streams!'); + } + } + /** * Get the key system currently used by EME. If EME is not being used, this * will return an empty string. If the player has not loaded content, this