UNPKG

nativescript-cast

Version:

NativeScript Chromecast Plugin.

113 lines 5.84 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var cast_common_1 = require("./cast.common"); var cast_types_1 = require("./cast.types"); var SessionManagerListenerImpl = (function (_super) { __extends(SessionManagerListenerImpl, _super); function SessionManagerListenerImpl() { return _super !== null && _super.apply(this, arguments) || this; } SessionManagerListenerImpl.prototype.sessionManagerWillStartSession = function (sessionManager, session) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionStarting, session: session, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerDidStartSession = function (sessionManager, session) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionStarted, session: session, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerWillStartCastSession = function (sessionManager, session) { }; SessionManagerListenerImpl.prototype.sessionManagerDidStartCastSession = function (sessionManager, session) { }; SessionManagerListenerImpl.prototype.sessionManagerWillEndSession = function (sessionManager, session) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionEnding, session: session, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerDidEndSessionWithError = function (sessionManager, session, error) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionEnded, session: session, error: error, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerWillEndCastSession = function (sessionManager, session) { }; SessionManagerListenerImpl.prototype.sessionManagerDidEndCastSessionWithError = function (sessionManager, session, error) { }; SessionManagerListenerImpl.prototype.sessionManagerDidFailToStartSessionWithError = function (sessionManager, session, error) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionStartFailed, session: session, error: error, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerDidFailToStartCastSessionWithError = function (sessionManager, session, error) { }; SessionManagerListenerImpl.prototype.sessionManagerDidSuspendSessionWithReason = function (sessionManager, session, reason) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionSuspended, session: session, reason: reason, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerDidSuspendCastSessionWithReason = function (sessionManager, session, reason) { }; SessionManagerListenerImpl.prototype.sessionManagerWillResumeSession = function (sessionManager, session) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionResuming, session: session, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerDidResumeSession = function (sessionManager, session) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onSessionResumed, session: session, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerWillResumeCastSession = function (sessionManager, session) { }; SessionManagerListenerImpl.prototype.sessionManagerDidResumeCastSession = function (sessionManager, session) { }; SessionManagerListenerImpl.prototype.sessionManagerSessionDidUpdateDevice = function (sessionManager, session, device) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onDeviceChanged, session: session, device: device, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerSessionDidReceiveDeviceVolumeMuted = function (sessionManager, session, volume) { this.owner.sendEvent(cast_common_1.CastButtonBase.castEvent, { eventName: cast_types_1.CastEvent.onDeviceVolumeChanged, session: session, volume: volume, ios: this.owner.nativeView }); }; SessionManagerListenerImpl.prototype.sessionManagerCastSessionDidReceiveDeviceVolumeMuted = function (sessionManager, session, volume) { }; SessionManagerListenerImpl.prototype.sessionManagerSessionDidReceiveDeviceStatus = function (sessionManager, session, statusText) { }; SessionManagerListenerImpl.prototype.sessionManagerCastSessionDidReceiveDeviceStatus = function (sessionManager, session, statusText) { }; SessionManagerListenerImpl.prototype.sessionManagerDidUpdateDefaultSessionOptionsForDeviceCategory = function (sessionManager, category) { }; SessionManagerListenerImpl.ObjCProtocols = [GCKSessionManagerListener]; return SessionManagerListenerImpl; }(NSObject)); exports.SessionManagerListenerImpl = SessionManagerListenerImpl; //# sourceMappingURL=session-manager-listener.ios.js.map