* @param {ReadyState_Enum} state * @param {*=} opt_failure * @private
(state, opt_failure)
| 588 | * @private |
| 589 | */ |
| 590 | onReadyState_(state, opt_failure) { |
| 591 | this.setReadyState?.(state, opt_failure); |
| 592 | |
| 593 | const Ctor = /** @type {typeof PreactBaseElement} */ ( |
| 594 | /** @type {?} */ (this.constructor) |
| 595 | ); |
| 596 | if (Ctor.unloadOnPause) { |
| 597 | // These are typically iframe-based elements where we don't know |
| 598 | // whether a media is currently playing. So we have to assume that |
| 599 | // it is whenever the element is loaded. |
| 600 | this.updateIsPlaying_(state == ReadyState_Enum.COMPLETE); |
| 601 | } |
| 602 | |
| 603 | // Reset "loading" property back to "auto". |
| 604 | if (this.resetLoading_) { |
| 605 | this.resetLoading_ = false; |
| 606 | this.mutateProps({'loading': Loading_Enum.AUTO}); |
| 607 | } |
| 608 | } |
| 609 | |
| 610 | /** @private */ |
| 611 | rerender_() { |
no test coverage detected