UNPKG

@nodert-win10/windows.media.playto

Version:

Use the Windows.Media.PlayTo UWP API directly from Node.js

368 lines (275 loc) 9.9 kB
_PlayToConnectionState = function () { this.disconnected = 0; this.connected = 1; this.rendering = 2; } exports.PlayToConnectionState = new _PlayToConnectionState(); _PlayToConnectionError = function () { this.none = 0; this.deviceNotResponding = 1; this.deviceError = 2; this.deviceLocked = 3; this.protectedPlaybackFailed = 4; } exports.PlayToConnectionError = new _PlayToConnectionError(); SourceChangeRequestedEventArgs = (function () { var cls = function SourceChangeRequestedEventArgs() { this.album = new String(); this.author = new String(); this.date = new Date(); this.description = new String(); this.genre = new String(); this.properties = new Object(); this.rating = new Number(); this.stream = new Object(); this.thumbnail = new Object(); this.title = new String(); }; return cls; }) (); exports.SourceChangeRequestedEventArgs = SourceChangeRequestedEventArgs; PlaybackRateChangeRequestedEventArgs = (function () { var cls = function PlaybackRateChangeRequestedEventArgs() { this.rate = new Number(); }; return cls; }) (); exports.PlaybackRateChangeRequestedEventArgs = PlaybackRateChangeRequestedEventArgs; CurrentTimeChangeRequestedEventArgs = (function () { var cls = function CurrentTimeChangeRequestedEventArgs() { this.time = new Number(); }; return cls; }) (); exports.CurrentTimeChangeRequestedEventArgs = CurrentTimeChangeRequestedEventArgs; MuteChangeRequestedEventArgs = (function () { var cls = function MuteChangeRequestedEventArgs() { this.mute = new Boolean(); }; return cls; }) (); exports.MuteChangeRequestedEventArgs = MuteChangeRequestedEventArgs; VolumeChangeRequestedEventArgs = (function () { var cls = function VolumeChangeRequestedEventArgs() { this.volume = new Number(); }; return cls; }) (); exports.VolumeChangeRequestedEventArgs = VolumeChangeRequestedEventArgs; PlayToReceiver = (function () { var cls = function PlayToReceiver() { this.supportsVideo = new Boolean(); this.supportsImage = new Boolean(); this.supportsAudio = new Boolean(); this.friendlyName = new String(); this.properties = new Object(); }; cls.prototype.startAsync = function startAsync(callback) { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.stopAsync = function stopAsync(callback) { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyVolumeChange = function notifyVolumeChange(volume, mute) { /// <signature> /// <summary>Function summary.</summary> /// <param name="volume" type="Number">A param.</param> /// <param name="mute" type="Boolean">A param.</param> /// </signature> } cls.prototype.notifyRateChange = function notifyRateChange(rate) { /// <signature> /// <summary>Function summary.</summary> /// <param name="rate" type="Number">A param.</param> /// </signature> } cls.prototype.notifyLoadedMetadata = function notifyLoadedMetadata() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyTimeUpdate = function notifyTimeUpdate(currentTime) { /// <signature> /// <summary>Function summary.</summary> /// <param name="currentTime" type="Number">A param.</param> /// </signature> } cls.prototype.notifyDurationChange = function notifyDurationChange(duration) { /// <signature> /// <summary>Function summary.</summary> /// <param name="duration" type="Number">A param.</param> /// </signature> } cls.prototype.notifySeeking = function notifySeeking() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifySeeked = function notifySeeked() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyPaused = function notifyPaused() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyPlaying = function notifyPlaying() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyEnded = function notifyEnded() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyError = function notifyError() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.notifyStopped = function notifyStopped() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.PlayToReceiver = PlayToReceiver; PlayToConnection = (function () { var cls = function PlayToConnection() { this.state = new PlayToConnectionState(); }; cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.PlayToConnection = PlayToConnection; PlayToSource = (function () { var cls = function PlayToSource() { this.next = new PlayToSource(); this.connection = new PlayToConnection(); this.preferredSourceUri = new Object(); }; cls.prototype.playNext = function playNext() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } return cls; }) (); exports.PlayToSource = PlayToSource; PlayToConnectionStateChangedEventArgs = (function () { var cls = function PlayToConnectionStateChangedEventArgs() { this.currentState = new PlayToConnectionState(); this.previousState = new PlayToConnectionState(); }; return cls; }) (); exports.PlayToConnectionStateChangedEventArgs = PlayToConnectionStateChangedEventArgs; PlayToConnectionTransferredEventArgs = (function () { var cls = function PlayToConnectionTransferredEventArgs() { this.currentSource = new PlayToSource(); this.previousSource = new PlayToSource(); }; return cls; }) (); exports.PlayToConnectionTransferredEventArgs = PlayToConnectionTransferredEventArgs; PlayToConnectionErrorEventArgs = (function () { var cls = function PlayToConnectionErrorEventArgs() { this.code = new PlayToConnectionError(); this.message = new String(); }; return cls; }) (); exports.PlayToConnectionErrorEventArgs = PlayToConnectionErrorEventArgs; PlayToSourceSelectedEventArgs = (function () { var cls = function PlayToSourceSelectedEventArgs() { this.friendlyName = new String(); this.icon = new Object(); this.supportsAudio = new Boolean(); this.supportsImage = new Boolean(); this.supportsVideo = new Boolean(); }; return cls; }) (); exports.PlayToSourceSelectedEventArgs = PlayToSourceSelectedEventArgs; PlayToSourceDeferral = (function () { var cls = function PlayToSourceDeferral() { }; cls.prototype.complete = function complete() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } return cls; }) (); exports.PlayToSourceDeferral = PlayToSourceDeferral; PlayToSourceRequest = (function () { var cls = function PlayToSourceRequest() { this.deadline = new Date(); }; cls.prototype.displayErrorString = function displayErrorString(errorString) { /// <signature> /// <summary>Function summary.</summary> /// <param name="errorString" type="String">A param.</param> /// </signature> } cls.prototype.getDeferral = function getDeferral() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="PlayToSourceDeferral" /> /// </signature> return new PlayToSourceDeferral(); } cls.prototype.setSource = function setSource(value) { /// <signature> /// <summary>Function summary.</summary> /// <param name="value" type="PlayToSource">A param.</param> /// </signature> } return cls; }) (); exports.PlayToSourceRequest = PlayToSourceRequest; PlayToSourceRequestedEventArgs = (function () { var cls = function PlayToSourceRequestedEventArgs() { this.sourceRequest = new PlayToSourceRequest(); }; return cls; }) (); exports.PlayToSourceRequestedEventArgs = PlayToSourceRequestedEventArgs; PlayToManager = (function () { var cls = function PlayToManager() { this.defaultSourceSelection = new Boolean(); }; cls.getForCurrentView = function getForCurrentView() { /// <signature> /// <summary>Function summary.</summary> /// <returns type="PlayToManager" /> /// </signature> return new PlayToManager(); } cls.showPlayToUI = function showPlayToUI() { /// <signature> /// <summary>Function summary.</summary> /// </signature> } cls.prototype.addListener = function addListener(eventName, callback){} cls.prototype.removeListener = function removeListener(eventName, callback){} cls.prototype.on = function on(eventName, callback){} cls.prototype.off = function off(eventName, callback){} return cls; }) (); exports.PlayToManager = PlayToManager;