Skip to content

Commit

Permalink
fix: add missing properties to PlayButton type (#6130)
Browse files Browse the repository at this point in the history
Fixes #6125.

Backported to v4.3.x
  • Loading branch information
Reeska authored and joeyparrish committed Feb 17, 2024
1 parent 66936d5 commit b3ef659
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Expand Up @@ -80,6 +80,7 @@ Seongryun Jo <ocipap0531@gmail.com>
Swank Motion Pictures Inc. <*@swankmp.com>
TalkTalk Plc <*@talktalkplc.com>
Tatsiana Gelahova <tatsiana.gelahova@gmail.com>
Thomas Champion <thchampi@gmail.com>
Tomas Tichy <mr.tichyt@gmail.com>
Tomohiro Matsuzawa <thmatuza75@hotmail.com>
Toshihiro Suzuki <t.suzuki326@gmail.com>
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Expand Up @@ -120,6 +120,7 @@ Theodore Abshire <theodab@google.com>
Thomas Stephens <thomas@ustudio.com>
Tim Plummer <objelisks@google.com>
Timothy Drews <tdrews@google.com>
Thomas Champion <thchampi@gmail.com>
Tomas Bucher <collapsingtesseract@gmail.com>
Tomas Tichy <mr.tichyt@gmail.com>
Tomohiro Matsuzawa <thmatuza75@hotmail.com>
Expand Down
24 changes: 24 additions & 0 deletions ui/externs/ui.js
Expand Up @@ -443,3 +443,27 @@ shaka.extern.IUISeekBar.Factory = class {
*/
create(rootElement, controls) {}
};

/**
* @interface
* @exportDoc
*/
shaka.extern.IUIPlayButton = class {
/**
* @param {!HTMLElement} parent
* @param {!shaka.ui.Controls} controls
*/
constructor(parent, controls) {
/**
* @protected {!HTMLButtonElement}
* @exportDoc
*/
this.button;
}

/** @return {boolean} */
isPaused() {}

/** @return {boolean} */
isEnded() {}
};
3 changes: 3 additions & 0 deletions ui/play_button.js
Expand Up @@ -16,6 +16,7 @@ goog.requireType('shaka.ui.Controls');

/**
* @extends {shaka.ui.Element}
* @implements {shaka.extern.IUIPlayButton}
* @export
*/
shaka.ui.PlayButton = class extends shaka.ui.Element {
Expand Down Expand Up @@ -95,6 +96,7 @@ shaka.ui.PlayButton = class extends shaka.ui.Element {
/**
* @return {boolean}
* @protected
* @override
*/
isPaused() {
if (this.ad && this.ad.isLinear()) {
Expand All @@ -107,6 +109,7 @@ shaka.ui.PlayButton = class extends shaka.ui.Element {
/**
* @return {boolean}
* @protected
* @override
*/
isEnded() {
if (this.ad && this.ad.isLinear()) {
Expand Down

0 comments on commit b3ef659

Please sign in to comment.