import*as SDK from"../sdk/sdk.js";export class MediaModel extends SDK.SDKModel.SDKModel{constructor(e){super(e),this._enabled=!1,this._agent=e.mediaAgent(),e.registerMediaDispatcher(this)}async resumeModel(){if(!this._enabled)return Promise.resolve();await this._agent.invoke_enable()}ensureEnabled(){this._agent.invoke_enable(),this._enabled=!0}playerPropertiesChanged(e){this.dispatchEventToListeners("PlayerPropertiesChanged",e)}playerEventsAdded(e){this.dispatchEventToListeners("PlayerEventsAdded",e)}playerMessagesLogged(e){this.dispatchEventToListeners("PlayerMessagesLogged",e)}playerErrorsRaised(e){this.dispatchEventToListeners("PlayerErrorsRaised",e)}playersCreated({players:e}){this.dispatchEventToListeners("PlayersCreated",e)}}SDK.SDKModel.SDKModel.register(MediaModel,SDK.SDKModel.Capability.DOM,!1);