@param {!Window} win
(win)
| 68 | export class AmpVideoIntegration { |
| 69 | /** @param {!Window} win */ |
| 70 | constructor(win) { |
| 71 | /** |
| 72 | * Used for checking callback return type. |
| 73 | * @visibleForTesting |
| 74 | */ |
| 75 | this.isAmpVideoIntegration_ = true; |
| 76 | |
| 77 | /** @private @const */ |
| 78 | this.callCounter_ = 0; |
| 79 | |
| 80 | /** @private @const {!{[key: number]: function()}} */ |
| 81 | this.callbacks_ = {}; |
| 82 | |
| 83 | /** @private @const {!Window} */ |
| 84 | this.win_ = win; |
| 85 | |
| 86 | /** @private @const {!{[key: string]: function()}} */ |
| 87 | this.methods_ = {}; |
| 88 | |
| 89 | /** @private @const {function()} */ |
| 90 | this.listenToOnce_ = once(() => { |
| 91 | listenTo(this.win_, (e) => this.onMessage_(e)); |
| 92 | }); |
| 93 | |
| 94 | /** @private {boolean} */ |
| 95 | this.muted_ = false; |
| 96 | |
| 97 | /** @private {boolean} */ |
| 98 | this.usedListenToHelper_ = false; |
| 99 | |
| 100 | /** |
| 101 | * @return {!JsonObject} |
| 102 | * @private |
| 103 | */ |
| 104 | this.getMetadataOnce_ = once(() => tryParseJson(this.win_.name)); |
| 105 | } |
| 106 | |
| 107 | /** @return {!JsonObject} */ |
| 108 | getMetadata() { |
nothing calls this directly
no test coverage detected