THEOliveControllerWeb constructor
THEOliveControllerWeb(
- THEOplayerTheoLiveApi _theoLiveApi
Implementation
THEOliveControllerWeb(this._theoLiveApi) {
publicationLoadedEventListener = allowInterop((PublicationLoadedEventJS event) {
_eventManager.dispatchEvent(PublicationLoadedEvent(publicationId: event.publicationId));
});
publicationLoadStartEventListener = allowInterop((PublicationLoadStartEventJS event) {
_eventManager.dispatchEvent(PublicationLoadStartEvent(publicationId: event.publicationId));
});
publicationOfflineEventListener = allowInterop((PublicationOfflineEventJS event) {
_eventManager.dispatchEvent(PublicationOfflineEvent(publicationId: event.publicationId));
});
intentToFallbackEventListener = allowInterop((IntentToFallbackEventJS event) {
_eventManager.dispatchEvent(IntentToFallbackEvent());
});
enterBadNetworkModeEventListener = allowInterop((EnterBadNetworkModeEventJS event) {
_eventManager.dispatchEvent(EnterBadNetworkModeEvent());
});
exitBadNetworkModeEventListener = allowInterop((ExitBadNetworkModeEventJS event) {
_eventManager.dispatchEvent(ExitBadNetworkModeEvent());
});
_theoLiveApi.addEventListener(THEOliveApiEventTypes.PUBLICATIONLOADED.toLowerCase(), publicationLoadedEventListener);
_theoLiveApi.addEventListener(THEOliveApiEventTypes.PUBLICATIONLOADSTART.toLowerCase(), publicationLoadStartEventListener);
_theoLiveApi.addEventListener(THEOliveApiEventTypes.PUBLICATIONOFFLINE.toLowerCase(), publicationOfflineEventListener);
_theoLiveApi.addEventListener(THEOliveApiEventTypes.INTENTTOFALLBACK.toLowerCase(), intentToFallbackEventListener);
_theoLiveApi.addEventListener(THEOliveApiEventTypes.ENTERBADNETWORKMODE.toLowerCase(), enterBadNetworkModeEventListener);
_theoLiveApi.addEventListener(THEOliveApiEventTypes.EXITBADNETWORKMODE.toLowerCase(), exitBadNetworkModeEventListener);
}