Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / ui / file_manager / externs / chrome_cast.js
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6  * @namespace
7  */
8 chrome.cast = {};
9
10
11 /**
12  * @enum {string}
13  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.AutoJoinPolicy
14  */
15 chrome.cast.AutoJoinPolicy = {
16   TAB_AND_ORIGIN_SCOPED: 'tab_and_origin_scoped',
17   ORIGIN_SCOPED: 'origin_scoped',
18   PAGE_SCOPED: 'page_scoped'
19 };
20
21
22 /**
23  * @enum {string}
24  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.DefaultActionPolicy
25  */
26 chrome.cast.DefaultActionPolicy = {
27   CREATE_SESSION: 'create_session',
28   CAST_THIS_TAB: 'cast_this_tab'
29 };
30
31
32 /**
33  * @enum {string}
34  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Capability
35  */
36 chrome.cast.Capability = {
37   VIDEO_OUT: 'video_out',
38   AUDIO_OUT: 'audio_out',
39   VIDEO_IN: 'video_in',
40   AUDIO_IN: 'audio_in'
41 };
42
43
44 /**
45  * @enum {string}
46  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ErrorCode
47  */
48 chrome.cast.ErrorCode = {
49   CANCEL: 'cancel',
50   TIMEOUT: 'timeout',
51   API_NOT_INITIALIZED: 'api_not_initialized',
52   INVALID_PARAMETER: 'invalid_parameter',
53   EXTENSION_NOT_COMPATIBLE: 'extension_not_compatible',
54   EXTENSION_MISSING: 'extension_missing',
55   RECEIVER_UNAVAILABLE: 'receiver_unavailable',
56   SESSION_ERROR: 'session_error',
57   CHANNEL_ERROR: 'channel_error',
58   LOAD_MEDIA_FAILED: 'load_media_failed'
59 };
60
61
62 /**
63  * @enum {string}
64  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverAvailability
65  */
66 chrome.cast.ReceiverAvailability = {
67   AVAILABLE: 'available',
68   UNAVAILABLE: 'unavailable'
69 };
70
71
72 /**
73  * @enum {string}
74  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SenderPlatform
75  */
76 chrome.cast.SenderPlatform = {
77   CHROME: 'chrome',
78   IOS: 'ios',
79   ANDROID: 'android'
80 };
81
82
83 /**
84  * @enum {string}
85  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverType
86  */
87 chrome.cast.ReceiverType = {
88   CAST: 'cast',
89   HANGOUT: 'hangout',
90   CUSTOM: 'custom'
91 };
92
93
94 /**
95  * @enum {string}
96  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverAction
97  */
98 chrome.cast.ReceiverAction = {
99   CAST: 'cast',
100   STOP: 'stop'
101 };
102
103
104 /**
105  * @enum {string}
106  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SessionStatus
107  */
108 chrome.cast.SessionStatus = {
109   CONNECTED: 'connected',
110   DISCONNECTED: 'disconnected',
111   STOPPED: 'stopped'
112 };
113
114
115 /**
116  * @namespace
117  */
118 chrome.cast.media = {};
119
120
121 /**
122  * @enum {string}
123  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MediaCommand
124  */
125 chrome.cast.media.MediaCommand = {
126   PAUSE: 'pause',
127   SEEK: 'seek',
128   STREAM_VOLUME: 'stream_volume',
129   STREAM_MUTE: 'stream_mute'
130 };
131
132
133 /**
134  * @enum {number}
135  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MetadataType
136  */
137 chrome.cast.media.MetadataType = {
138   GENERIC: 0,
139   TV_SHOW: 1,
140   MOVIE: 2,
141   MUSIC_TRACK: 3,
142   PHOTO: 4
143 };
144
145
146 /**
147  * @enum {string}
148  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PlayerState
149  */
150 chrome.cast.media.PlayerState = {
151   IDLE: 'IDLE',
152   PLAYING: 'PLAYING',
153   PAUSED: 'PAUSED',
154   BUFFERING: 'BUFFERING'
155 };
156
157
158 /**
159  * @enum {string}
160  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.ResumeState
161  */
162 chrome.cast.media.ResumeState = {
163   PLAYBACK_START: 'PLAYBACK_START',
164   PLAYBACK_PAUSE: 'PLAYBACK_PAUSE'
165 };
166
167
168 /**
169  * @enum {string}
170  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.StreamType
171  */
172 chrome.cast.media.StreamType = {
173   BUFFERED: 'BUFFERED',
174   LIVE: 'LIVE',
175   OTHER: 'OTHER'
176 };
177
178
179 /**
180  * @enum {string}
181  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.IdleReason
182  */
183 chrome.cast.media.IdleReason = {
184   CANCELLED: 'CANCELLED',
185   INTERRUPTED: 'INTERRUPTED',
186   FINISHED: 'FINISHED',
187   ERROR: 'ERROR'
188 };
189
190
191 /**
192  * @enum {string}
193  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TrackType
194  */
195 chrome.cast.media.TrackType = {
196   TEXT: 'TEXT',
197   AUDIO: 'AUDIO',
198   VIDEO: 'VIDEO'
199 };
200
201
202 /**
203  * @enum {string}
204  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackType
205  */
206 chrome.cast.media.TextTrackType = {
207   SUBTITLES: 'SUBTITLES',
208   CAPTIONS: 'CAPTIONS',
209   DESCRIPTIONS: 'DESCRIPTIONS',
210   CHAPTERS: 'CHAPTERS',
211   METADATA: 'METADATA'
212 };
213
214
215 /**
216  * @enum {string}
217  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackEdgeType
218  */
219 chrome.cast.media.TextTrackEdgeType = {
220   NONE: 'NONE',
221   OUTLINE: 'OUTLINE',
222   DROP_SHADOW: 'DROP_SHADOW',
223   RAISED: 'RAISED',
224   DEPRESSED: 'DEPRESSED'
225 };
226
227
228 /**
229  * @enum {string}
230  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackWindowType
231  */
232 chrome.cast.media.TextTrackWindowType = {
233   NONE: 'NONE',
234   NORMAL: 'NORMAL',
235   ROUNDED_CORNERS: 'ROUNDED_CORNERS'
236 };
237
238
239 /**
240  * @enum {string}
241  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackFontGenericFamily
242  */
243 chrome.cast.media.TextTrackFontGenericFamily = {
244   SANS_SERIF: 'SANS_SERIF',
245   MONOSPACED_SANS_SERIF: 'MONOSPACED_SANS_SERIF',
246   SERIF: 'SERIF',
247   MONOSPACED_SERIF: 'MONOSPACED_SERIF',
248   CASUAL: 'CASUAL',
249   CURSIVE: 'CURSIVE',
250   SMALL_CAPITALS: 'SMALL_CAPITALS'
251 };
252
253
254 /**
255  * @enum {string}
256  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackFontStyle
257  */
258 chrome.cast.media.TextTrackFontStyle = {
259   NORMAL: 'NORMAL',
260   BOLD: 'BOLD',
261   BOLD_ITALIC: 'BOLD_ITALIC',
262   ITALIC: 'ITALIC'
263 };
264
265
266 /**
267  * @param {!chrome.cast.ErrorCode} code
268  * @param {string=} opt_description
269  * @param {Object=} opt_details
270  * @constructor
271  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Error
272  */
273 chrome.cast.Error = function(code, opt_description, opt_details) {}
274
275 /** @type {!chrome.cast.ErrorCode} */
276 chrome.cast.Error.prototype.code;
277
278 /** @type {?string} */
279 chrome.cast.Error.prototype.description;
280
281 /** @type {Object} */
282 chrome.cast.Error.prototype.details;
283
284
285 /**
286  * @param {!chrome.cast.SenderPlatform} platform
287  * @constructor
288  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SenderApplication
289  */
290 chrome.cast.SenderApplication = function(platform) {};
291
292 /** @type {!chrome.cast.SenderPlatform} */
293 chrome.cast.SenderApplication.prototype.platform;
294
295 /** @type {?string} */
296 chrome.cast.SenderApplication.prototype.url;
297
298 /** @type {?string} */
299 chrome.cast.SenderApplication.prototype.packageId;
300
301
302 /**
303  * @param {string} url
304  * @constructor
305  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Image
306  */
307 chrome.cast.Image = function(url) {};
308
309 /** @type {string} */
310 chrome.cast.Image.prototype.url;
311
312 /** @type {?number} */
313 chrome.cast.Image.prototype.height;
314
315 /** @type {?number} */
316 chrome.cast.Image.prototype.width;
317
318
319 /**
320  * @param {?number=} opt_level
321  * @param {?boolean=} opt_muted
322  * @constructor
323  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Volume
324  */
325 chrome.cast.Volume = function(opt_level, opt_muted) {};
326
327 /** @type {?number} */
328 chrome.cast.Volume.prototype.level;
329
330 /** @type {?boolean} */
331 chrome.cast.Volume.prototype.muted;
332
333
334 /**
335  * @param {!chrome.cast.SessionRequest} sessionRequest
336  * @param {function(!chrome.cast.Session)} sessionListener
337  * @param {function(!chrome.cast.ReceiverAvailability)} receiverListener
338  * @param {chrome.cast.AutoJoinPolicy=} opt_autoJoinPolicy
339  * @param {chrome.cast.DefaultActionPolicy=} opt_defaultActionPolicy
340  * @constructor
341  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ApiConfig
342  */
343 chrome.cast.ApiConfig = function(sessionRequest, sessionListener,
344     receiverListener, opt_autoJoinPolicy, opt_defaultActionPolicy) {};
345
346 /** @type {!chrome.cast.SessionRequest} */
347 chrome.cast.ApiConfig.prototype.sessionRequest;
348
349 /** @type {function(!chrome.cast.Session)} */
350 chrome.cast.ApiConfig.prototype.sessionListener;
351
352 /** @type {function(!chrome.cast.ReceiverAvailability)} */
353 chrome.cast.ApiConfig.prototype.receiverListener;
354
355 /** @type {!chrome.cast.AutoJoinPolicy} */
356 chrome.cast.ApiConfig.prototype.autoJoinPolicy;
357
358 /** @type {!chrome.cast.DefaultActionPolicy} */
359 chrome.cast.ApiConfig.prototype.defaultActionPolicy;
360
361
362 /**
363  * @param {string} appId
364  * @param {!Array.<chrome.cast.Capability>=} opt_capabilities
365  * @param {number=} opt_timeout
366  * @constructor
367  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.SessionRequest
368  */
369 chrome.cast.SessionRequest = function(appId, opt_capabilities, opt_timeout) {};
370
371 /** @type {string} */
372 chrome.cast.SessionRequest.prototype.appId;
373
374 /** @type {!Array.<chrome.cast.Capability>} */
375 chrome.cast.SessionRequest.prototype.capabilities;
376
377 /** @type {number} */
378 chrome.cast.SessionRequest.prototype.requestSessionTimeout;
379
380 /** @type {?string} */
381 chrome.cast.SessionRequest.prototype.language;
382
383
384 /**
385  * @param {string} label
386  * @param {string} friendlyName
387  * @param {Array.<chrome.cast.Capability>=} opt_capabilities
388  * @param {chrome.cast.Volume=} opt_volume
389  * @constructor
390  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Receiver
391  */
392 chrome.cast.Receiver =
393     function(label, friendlyName, opt_capabilities, opt_volume) {};
394
395 /** @type {string} */
396 chrome.cast.Receiver.prototype.label;
397
398 /** @type {string} */
399 chrome.cast.Receiver.prototype.friendlyName;
400
401 /** @type {!Array.<!chrome.cast.Capability>} */
402 chrome.cast.Receiver.prototype.capabilities;
403
404 /** @type {chrome.cast.Volume} */
405 chrome.cast.Receiver.prototype.volume;
406
407 /** @type {!chrome.cast.ReceiverType} */
408 chrome.cast.Receiver.prototype.receiverType;
409
410 /** @type {chrome.cast.ReceiverDisplayStatus} */
411 chrome.cast.Receiver.prototype.displayStatus;
412
413
414 /**
415  * @param {string} statusText
416  * @param {!Array.<chrome.cast.Image>} appImages
417  * @constructor
418  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.ReceiverDisplayStatus
419  */
420 chrome.cast.ReceiverDisplayStatus = function(statusText, appImages) {};
421
422 /** @type {string} */
423 chrome.cast.ReceiverDisplayStatus.prototype.statusText;
424
425 /** @type {!Array.<chrome.cast.Image>} */
426 chrome.cast.ReceiverDisplayStatus.prototype.appImages;
427
428
429 /**
430  * @param {string} sessionId
431  * @param {string} appId
432  * @param {string} displayName
433  * @param {!Array.<chrome.cast.Image>} appImages
434  * @param {!chrome.cast.Receiver} receiver
435  * @constructor
436  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.Session
437  */
438 chrome.cast.Session =
439     function(sessionId, appId, displayName, appImages, receiver) {};
440
441 /** @type {string} */
442 chrome.cast.Session.prototype.sessionId;
443
444 /** @type {string} */
445 chrome.cast.Session.prototype.appId;
446
447 /** @type {string} */
448 chrome.cast.Session.prototype.displayName;
449
450 /** @type {?string} */
451 chrome.cast.Session.prototype.statusText;
452
453 /** @type {!Array.<chrome.cast.Image>} */
454 chrome.cast.Session.prototype.appImages;
455
456 /** @type {!chrome.cast.Receiver} */
457 chrome.cast.Session.prototype.receiver;
458
459 /** @type {!Array.<!chrome.cast.SenderApplication>} The applications. */
460 chrome.cast.Session.prototype.senderApps;
461
462 /** @type {!Array.<!{name: string}>} The namespaces. */
463 chrome.cast.Session.prototype.namespaces;
464
465 /** @type {!Array.<!chrome.cast.media.Media>} */
466 chrome.cast.Session.prototype.media;
467
468 /** @type {!chrome.cast.SessionStatus} */
469 chrome.cast.Session.prototype.status;
470
471 /**
472  * @param {number} newLevel
473  * @param {function()} successCallback
474  * @param {function(chrome.cast.Error)} errorCallback
475  */
476 chrome.cast.Session.prototype.setReceiverVolumeLevel =
477     function(newLevel, successCallback, errorCallback) {};
478
479 /**
480  * @param {boolean} muted
481  * @param {function()} successCallback
482  * @param {function(chrome.cast.Error)} errorCallback
483  */
484 chrome.cast.Session.prototype.setReceiverMuted =
485     function(muted, successCallback, errorCallback) {};
486
487 /**
488  * @param {function()} successCallback
489  * @param {function(chrome.cast.Error)} errorCallback
490  */
491 chrome.cast.Session.prototype.leave =
492     function(successCallback, errorCallback) {};
493
494 /**
495  * @param {function()} successCallback
496  * @param {function(chrome.cast.Error)} errorCallback
497  */
498 chrome.cast.Session.prototype.stop =
499     function(successCallback, errorCallback) {};
500
501 /**
502  * @param {string} namespace
503  * @param {!Object|string} message
504  * @param {!function()} successCallback
505  * @param {function(!chrome.cast.Error)} errorCallback
506  */
507 chrome.cast.Session.prototype.sendMessage =
508     function(namespace, message, successCallback, errorCallback) {};
509
510 /**
511  * @param {function(boolean)} listener
512  */
513 chrome.cast.Session.prototype.addUpdateListener = function(listener) {};
514
515 /**
516  * @param {function(boolean)} listener
517  */
518 chrome.cast.Session.prototype.removeUpdateListener = function(listener) {};
519
520 /**
521  * @param {string} namespace
522  * @param {function(string,string)} listener
523  */
524 chrome.cast.Session.prototype.addMessageListener =
525     function(namespace, listener) {};
526
527 /**
528  * @param {string} namespace
529  * @param {function(string,string)} listener
530  */
531 chrome.cast.Session.prototype.removeMessageListener =
532     function(namespace, listener) {};
533
534 /**
535  * @param {function(!chrome.cast.media.Media)} listener
536  */
537 chrome.cast.Session.prototype.addMediaListener = function(listener) {};
538
539 /**
540  * @param {function(chrome.cast.media.Media)} listener
541  */
542 chrome.cast.Session.prototype.removeMediaListener = function(listener) {};
543
544 /**
545  * @param {!chrome.cast.media.LoadRequest} loadRequest
546  * @param {function(!chrome.cast.media.Media)} successCallback
547  * @param {function(!chrome.cast.Error)} errorCallback
548  */
549 chrome.cast.Session.prototype.loadMedia =
550     function(loadRequest, successCallback, errorCallback) {};
551
552
553 /**
554  * @namespace
555  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.timeout
556  */
557 chrome.cast.timeout = {};
558
559
560 /**
561  * @const {!Array.<number>}
562  * @see https://developers.google.com/cast/docs/reference/chrome/
563  */
564 chrome.cast.VERSION;
565
566
567 /**
568  * @typedef {!function(?chrome.cast.Receiver, !chrome.cast.ReceiverAction)}
569  */
570 chrome.cast.ReceiverActionListener;
571
572
573 /**
574  * @type {boolean}
575  */
576 chrome.cast.isAvailable = false;
577
578
579 /**
580  * @param {!chrome.cast.ApiConfig} apiConfig
581  * @param {function()} successCallback
582  * @param {function(chrome.cast.Error)} errorCallback
583  */
584 chrome.cast.initialize = function(apiConfig, successCallback, errorCallback) {};
585
586
587 /**
588  * @param {function(!chrome.cast.Session)} successCallback
589  * @param {function(chrome.cast.Error)} errorCallback
590  * @param {chrome.cast.SessionRequest=} opt_sessionRequest
591  */
592 chrome.cast.requestSession = function(
593     successCallback, errorCallback, opt_sessionRequest) {};
594
595
596 /**
597  * @param {string} sessionId The id of the session to join.
598  */
599 chrome.cast.requestSessionById = function(sessionId) {};
600
601
602 /**
603  * @param {chrome.cast.ReceiverActionListener} listener
604  */
605 chrome.cast.addReceiverActionListener = function(listener) {};
606
607
608 /**
609  * @param {chrome.cast.ReceiverActionListener} listener
610  */
611 chrome.cast.removeReceiverActionListener = function(listener) {};
612
613
614 /**
615  * @param {string} message The message to log.
616  */
617 chrome.cast.logMessage = function(message) {};
618
619
620 /**
621  * @param {!Array.<chrome.cast.Receiver>} receivers
622  * @param {function()} successCallback
623  * @param {function(chrome.cast.Error)} errorCallback
624  */
625 chrome.cast.setCustomReceivers =
626     function(receivers, successCallback, errorCallback) {};
627
628
629 /**
630  * @param {!chrome.cast.Receiver} receiver
631  * @param {function()} successCallback
632  * @param {function(chrome.cast.Error)} errorCallback
633  */
634 chrome.cast.setReceiverDisplayStatus =
635     function(receiver, successCallback, errorCallback) {};
636
637
638 /**
639  * @constructor
640  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.GetStatusRequest
641  */
642 chrome.cast.media.GetStatusRequest = function() {};
643
644 /** @type {Object} */
645 chrome.cast.media.GetStatusRequest.prototype.customData;
646
647
648 /**
649  * @constructor
650  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PauseRequest
651  */
652 chrome.cast.media.PauseRequest = function() {};
653
654 /** @type {Object} */
655 chrome.cast.media.PauseRequest.prototype.customData;
656
657
658 /**
659  * @constructor
660  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PlayRequest
661  */
662 chrome.cast.media.PlayRequest = function() {};
663
664 /** @type {Object} */
665 chrome.cast.media.PlayRequest.prototype.customData;
666
667
668 /**
669  * @constructor
670  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.SeekRequest
671  */
672 chrome.cast.media.SeekRequest = function() {};
673
674 /** @type {?number} */
675 chrome.cast.media.SeekRequest.prototype.currentTime;
676
677 /** @type {?chrome.cast.media.ResumeState} */
678 chrome.cast.media.SeekRequest.prototype.resumeState;
679
680 /** @type {Object} */
681 chrome.cast.media.SeekRequest.prototype.customData;
682
683
684 /**
685  * @constructor
686  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.StopRequest
687  */
688 chrome.cast.media.StopRequest = function() {};
689
690 /** @type {Object} */
691 chrome.cast.media.StopRequest.prototype.customData;
692
693
694 /**
695  * @param {!chrome.cast.Volume} volume
696  * @constructor
697  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.VolumeRequest
698  */
699 chrome.cast.media.VolumeRequest = function(volume) {};
700
701 /** @type {!chrome.cast.Volume} */
702 chrome.cast.media.VolumeRequest.prototype.volume = volume;
703
704 /** @type {Object} */
705 chrome.cast.media.VolumeRequest.prototype.customData;
706
707
708 /**
709  * @param {!chrome.cast.media.MediaInfo} mediaInfo
710  * @constructor
711  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.LoadRequest
712  */
713 chrome.cast.media.LoadRequest = function(mediaInfo) {};
714
715 /** @type {Array.<number>} */
716 chrome.cast.media.LoadRequest.prototype.activeTrackIds;
717
718 /** @type {boolean} */
719 chrome.cast.media.LoadRequest.prototype.autoplay;
720
721 /** @type {?number} */
722 chrome.cast.media.LoadRequest.prototype.currentTime;
723
724 /** @type {Object} */
725 chrome.cast.media.LoadRequest.prototype.customData;
726
727 /** @type {!chrome.cast.media.MediaInfo} */
728 chrome.cast.media.LoadRequest.prototype.media;
729
730
731 /**
732  * @param {Array.<number>=} opt_activeTrackIds
733  * @param {chrome.cast.media.TextTrackStyle=} opt_textTrackStyle
734  * @constructor
735  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.EditTracksInfoRequest
736  */
737 chrome.cast.media.EditTracksInfoRequest =
738     function(opt_activeTrackIds, opt_textTrackStyle) {};
739
740 /** @type {Array.<number>} */
741 chrome.cast.media.EditTracksInfoRequest.prototype.activeTrackIds;
742
743 /** @type {?chrome.cast.media.TextTrackStyle} */
744 chrome.cast.media.EditTracksInfoRequest.prototype.textTrackStyle;
745
746
747 /**
748  * @constructor
749  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.GenericMediaMetadata
750  */
751 chrome.cast.media.GenericMediaMetadata = function() {};
752
753 /** @type {chrome.cast.media.MetadataType} */
754 chrome.cast.media.GenericMediaMetadata.prototype.metadataType;
755
756 /** @type {?string} */
757 chrome.cast.media.GenericMediaMetadata.prototype.title;
758
759 /** @type {?string} */
760 chrome.cast.media.GenericMediaMetadata.prototype.subtitle;
761
762 /** @type {Array.<chrome.cast.Image>} */
763 chrome.cast.media.GenericMediaMetadata.prototype.images;
764
765 /** @type {?string} */
766 chrome.cast.media.GenericMediaMetadata.prototype.releaseDate;
767
768 /**
769  * @type {chrome.cast.media.MetadataType}
770  * @deprecated Please use metadataType instead.
771  */
772 chrome.cast.media.GenericMediaMetadata.prototype.type;
773
774 /**
775  * @type {?number}
776  * @deprecated Use releaseDate instead.
777  */
778 chrome.cast.media.GenericMediaMetadata.prototype.releaseYear;
779
780
781 /**
782  * @constructor
783  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MovieMediaMetadata
784  */
785 chrome.cast.media.MovieMediaMetadata = function() {};
786
787 /** @type {chrome.cast.media.MetadataType} */
788 chrome.cast.media.MovieMediaMetadata.prototype.metadataType;
789
790 /** @type {?string} */
791 chrome.cast.media.MovieMediaMetadata.prototype.title;
792
793 /** @type {?string} */
794 chrome.cast.media.MovieMediaMetadata.prototype.studio;
795
796 /** @type {?string} */
797 chrome.cast.media.MovieMediaMetadata.prototype.subtitle;
798
799 /** @type {Array.<chrome.cast.Image>} */
800 chrome.cast.media.MovieMediaMetadata.prototype.images;
801
802 /** @type {?string} */
803 chrome.cast.media.MovieMediaMetadata.prototype.releaseDate;
804
805 /**
806  * @type {chrome.cast.media.MetadataType}
807  * @deprecated Please use metadataType instead.
808  */
809 chrome.cast.media.MovieMediaMetadata.prototype.type;
810
811 /**
812  * @type {?number}
813  * @deprecated Use releaseDate instead.
814  */
815 chrome.cast.media.MovieMediaMetadata.prototype.releaseYear;
816
817
818 /**
819  * @constructor
820  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TvShowMediaMetadata
821  */
822 chrome.cast.media.TvShowMediaMetadata = function() {};
823
824 /** @type {chrome.cast.media.MetadataType} */
825 chrome.cast.media.TvShowMediaMetadata.prototype.metadataType;
826
827 /** @type {?string} */
828 chrome.cast.media.TvShowMediaMetadata.prototype.seriesTitle;
829
830 /** @type {?string} */
831 chrome.cast.media.TvShowMediaMetadata.prototype.title;
832
833 /** @type {?number} */
834 chrome.cast.media.TvShowMediaMetadata.prototype.season;
835
836 /** @type {?number} */
837 chrome.cast.media.TvShowMediaMetadata.prototype.episode;
838
839 /** @type {Array.<chrome.cast.Image>} */
840 chrome.cast.media.TvShowMediaMetadata.prototype.images;
841
842 /** @type {?string} */
843 chrome.cast.media.TvShowMediaMetadata.prototype.originalAirdate;
844
845 /**
846  * @type {chrome.cast.media.MetadataType}
847  * @deprecated Please use metadataType instead.
848  */
849 chrome.cast.media.TvShowMediaMetadata.prototype.type;
850
851 /**
852  * @type {?string}
853  * @deprecated Use title instead.
854  */
855 chrome.cast.media.TvShowMediaMetadata.prototype.episodeTitle;
856
857 /**
858  * @type {?number}
859  * @deprecated Use season instead.
860  */
861 chrome.cast.media.TvShowMediaMetadata.prototype.seasonNumber;
862
863 /**
864  * @type {?number}
865  * @deprecated Use episode instead.
866  */
867 chrome.cast.media.TvShowMediaMetadata.prototype.episodeNumber;
868
869 /**
870  * @type {?number}
871  * @deprecated Use originalAirdate instead.
872  */
873 chrome.cast.media.TvShowMediaMetadata.prototype.releaseYear;
874
875
876 /**
877  * @constructor
878  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MusicTrackMediaMetadata
879  */
880 chrome.cast.media.MusicTrackMediaMetadata = function() {};
881
882
883 /** @type {chrome.cast.media.MetadataType} */
884 chrome.cast.media.MusicTrackMediaMetadata.prototype.metadataType;
885
886 /** @type {?string} */
887 chrome.cast.media.MusicTrackMediaMetadata.prototype.albumName;
888
889 /** @type {?string} */
890 chrome.cast.media.MusicTrackMediaMetadata.prototype.title;
891
892 /** @type {?string} */
893 chrome.cast.media.MusicTrackMediaMetadata.prototype.albumArtist;
894
895 /** @type {?string} */
896 chrome.cast.media.MusicTrackMediaMetadata.prototype.artist;
897
898 /** @type {?string} */
899 chrome.cast.media.MusicTrackMediaMetadata.prototype.composer;
900
901 /** @type {?string} */
902 chrome.cast.media.MusicTrackMediaMetadata.prototype.songName;
903
904 /** @type {?number} */
905 chrome.cast.media.MusicTrackMediaMetadata.prototype.trackNumber;
906
907 /** @type {?number} */
908 chrome.cast.media.MusicTrackMediaMetadata.prototype.discNumber;
909
910 /** @type {Array.<chrome.cast.Image>} */
911 chrome.cast.media.MusicTrackMediaMetadata.prototype.images;
912
913 /**
914  * @type {chrome.cast.media.MetadataType}
915  * @deprecated Please use metadataType instead.
916  */
917 chrome.cast.media.MusicTrackMediaMetadata.prototype.type;
918
919 /**
920  * @type {?string}
921  * @deprecated Use artist instead.
922  */
923 chrome.cast.media.MusicTrackMediaMetadata.prototype.artistName;
924
925 /**
926  * @type {?number}
927  * @deprecated Use releaseDate instead.
928  */
929 chrome.cast.media.MusicTrackMediaMetadata.prototype.releaseYear;
930
931 /**
932  * @type {?string}
933  */
934 chrome.cast.media.MusicTrackMediaMetadata.prototype.releaseDate;
935
936
937 /**
938  * @constructor
939  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.PhotoMediaMetadata
940  */
941 chrome.cast.media.PhotoMediaMetadata = function() {};
942
943 /** @type {chrome.cast.media.MetadataType} */
944 chrome.cast.media.PhotoMediaMetadata.prototype.metadataType;
945
946 /** @type {?string} */
947 chrome.cast.media.PhotoMediaMetadata.prototype.title;
948
949 /** @type {?string} */
950 chrome.cast.media.PhotoMediaMetadata.prototype.artist;
951
952 /** @type {?string} */
953 chrome.cast.media.PhotoMediaMetadata.prototype.location;
954
955 /** @type {Array.<chrome.cast.Image>} */
956 chrome.cast.media.PhotoMediaMetadata.prototype.images;
957
958 /** @type {?number} */
959 chrome.cast.media.PhotoMediaMetadata.prototype.latitude;
960
961 /** @type {?number} */
962 chrome.cast.media.PhotoMediaMetadata.prototype.longitude;
963
964 /** @type {?number} */
965 chrome.cast.media.PhotoMediaMetadata.prototype.width;
966
967 /** @type {?number} */
968 chrome.cast.media.PhotoMediaMetadata.prototype.height;
969
970 /** @type {?string} */
971 chrome.cast.media.PhotoMediaMetadata.prototype.creationDateTime;
972
973 /**
974  * @type {chrome.cast.media.MetadataType}
975  * @deprecated Please use metadataType instead.
976  */
977 chrome.cast.media.PhotoMediaMetadata.prototype.type;
978
979
980 /**
981  * @param {string} contentId
982  * @param {string} contentType
983  * @constructor
984  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.MediaInfo
985  */
986 chrome.cast.media.MediaInfo = function(contentId, contentType) {};
987
988 /** @type {string} */
989 chrome.cast.media.MediaInfo.prototype.contentId;
990
991 /** @type {chrome.cast.media.StreamType} */
992 chrome.cast.media.MediaInfo.prototype.streamType;
993
994 /** @type {string} */
995 chrome.cast.media.MediaInfo.prototype.contentType;
996
997 /** @type {*} */
998 chrome.cast.media.MediaInfo.prototype.metadata;
999
1000 /** @type {?number} */
1001 chrome.cast.media.MediaInfo.prototype.duration;
1002
1003 /** @type {Array.<!chrome.cast.media.Track>} */
1004 chrome.cast.media.MediaInfo.prototype.tracks;
1005
1006 /** @type {?chrome.cast.media.TextTrackStyle} */
1007 chrome.cast.media.MediaInfo.prototype.textTrackStyle;
1008
1009 /** @type {Object} */
1010 chrome.cast.media.MediaInfo.prototype.customData;
1011
1012
1013 /**
1014  * @param {string} sessionId
1015  * @param {number} mediaSessionId
1016  * @constructor
1017  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.Media
1018  */
1019 chrome.cast.media.Media = function(sessionId, mediaSessionId) {};
1020
1021 /** @type {string} */
1022 chrome.cast.media.Media.prototype.sessionId;
1023
1024 /** @type {number} */
1025 chrome.cast.media.Media.prototype.mediaSessionId;
1026
1027 /** @type {chrome.cast.media.MediaInfo} */
1028 chrome.cast.media.Media.prototype.media;
1029
1030 /** @type {number} */
1031 chrome.cast.media.Media.prototype.playbackRate;
1032
1033 /** @type {!chrome.cast.media.PlayerState} */
1034 chrome.cast.media.Media.prototype.playerState;
1035
1036 /** @type {!Array.<!chrome.cast.media.MediaCommand>} */
1037 chrome.cast.media.Media.prototype.supportedMediaCommands;
1038
1039 /** @type {!chrome.cast.Volume} */
1040 chrome.cast.media.Media.prototype.volume;
1041
1042 /** @type {?chrome.cast.media.IdleReason} */
1043 chrome.cast.media.Media.prototype.idleReason;
1044
1045 /** @type {Array.<number>} */
1046 chrome.cast.media.Media.prototype.activeTrackIds;
1047
1048 /** @type {Object} */
1049 chrome.cast.media.Media.prototype.customData;
1050
1051 /**
1052  * @type {number}
1053  * @deprecated Use getEstimatedTime instead.
1054  */
1055 chrome.cast.media.Media.prototype.currentTime;
1056
1057 /**
1058  * @param {chrome.cast.media.GetStatusRequest} getStatusRequest
1059  * @param {function()} successCallback
1060  * @param {function(!chrome.cast.Error)} errorCallback
1061  */
1062 chrome.cast.media.Media.prototype.getStatus =
1063     function(getStatusRequest, successCallback, errorCallback) {};
1064
1065 /**
1066  * @param {chrome.cast.media.PlayRequest} playRequest
1067  * @param {function()} successCallback
1068  * @param {function(!chrome.cast.Error)} errorCallback
1069  */
1070 chrome.cast.media.Media.prototype.play =
1071     function(playRequest, successCallback, errorCallback) {};
1072
1073 /**
1074  * @param {chrome.cast.media.PauseRequest} pauseRequest
1075  * @param {function()} successCallback
1076  * @param {function(!chrome.cast.Error)} errorCallback
1077  */
1078 chrome.cast.media.Media.prototype.pause =
1079     function(pauseRequest, successCallback, errorCallback) {};
1080
1081 /**
1082  * @param {!chrome.cast.media.SeekRequest} seekRequest
1083  * @param {function()} successCallback
1084  * @param {function(!chrome.cast.Error)} errorCallback
1085  */
1086 chrome.cast.media.Media.prototype.seek =
1087     function(seekRequest, successCallback, errorCallback) {};
1088
1089 /**
1090  * @param {chrome.cast.media.StopRequest} stopRequest
1091  * @param {function()} successCallback
1092  * @param {function(!chrome.cast.Error)} errorCallback
1093  */
1094 chrome.cast.media.Media.prototype.stop =
1095     function(stopRequest, successCallback, errorCallback) {};
1096
1097 /**
1098  * @param {!chrome.cast.media.VolumeRequest} volumeRequest
1099  * @param {function()} successCallback
1100  * @param {function(!chrome.cast.Error)} errorCallback
1101  */
1102 chrome.cast.media.Media.prototype.setVolume =
1103     function(volumeRequest, successCallback, errorCallback) {};
1104
1105 /**
1106  * @param {!chrome.cast.media.EditTracksInfoRequest} editTracksInfoRequest
1107  * @param {function()} successCallback
1108  * @param {function(!chrome.cast.Error)} errorCallback
1109  */
1110 chrome.cast.media.Media.prototype.editTracksInfo =
1111     function(editTracksInfoRequest, successCallback, errorCallback) {};
1112
1113 /**
1114  * @param {!chrome.cast.media.MediaCommand} command
1115  * @return {boolean}
1116  */
1117 chrome.cast.media.Media.prototype.supportsCommand = function(command) {};
1118
1119 /**
1120  * @return {number}
1121  * @suppress {deprecated} Uses currentTime member to compute estimated time.
1122  */
1123 chrome.cast.media.Media.prototype.getEstimatedTime = function() {};
1124
1125 /**
1126  * @param {function(boolean)} listener
1127  */
1128 chrome.cast.media.Media.prototype.addUpdateListener = function(listener) {};
1129
1130 /**
1131  * @param {function(boolean)} listener
1132  */
1133 chrome.cast.media.Media.prototype.removeUpdateListener = function(listener) {};
1134
1135
1136 /**
1137  * @namespace
1138  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.timeout
1139  */
1140 chrome.cast.media.timeout = {};
1141
1142 /** @type {number} */
1143 chrome.cast.media.timeout.load;
1144
1145 /** @type {number} */
1146 chrome.cast.media.timeout.getStatus;
1147
1148 /** @type {number} */
1149 chrome.cast.media.timeout.play;
1150
1151 /** @type {number} */
1152 chrome.cast.media.timeout.pause;
1153
1154 /** @type {number} */
1155 chrome.cast.media.timeout.seek;
1156
1157 /** @type {number} */
1158 chrome.cast.media.timeout.stop;
1159
1160 /** @type {number} */
1161 chrome.cast.media.timeout.setVolume;
1162
1163 /** @type {number} */
1164 chrome.cast.media.timeout.editTracksInfo;
1165
1166
1167 /**
1168  * @param {number} trackId
1169  * @param {!chrome.cast.media.TrackType} trackType
1170  * @constructor
1171  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.Track
1172  */
1173 chrome.cast.media.Track = function(trackId, trackType) {};
1174
1175 /** @type {number} */
1176 chrome.cast.media.Track.prototype.trackId;
1177
1178 /** @type {?string} */
1179 chrome.cast.media.Track.prototype.trackContentId;
1180
1181 /** @type {?string} */
1182 chrome.cast.media.Track.prototype.trackContentType;
1183
1184 /** @type {!chrome.cast.media.TrackType} */
1185 chrome.cast.media.Track.prototype.type;
1186
1187 /** @type {?string} */
1188 chrome.cast.media.Track.prototype.name;
1189
1190 /** @type {?string} */
1191 chrome.cast.media.Track.prototype.language;
1192
1193 /** @type {?chrome.cast.media.TextTrackType} */
1194 chrome.cast.media.Track.prototype.subtype;
1195
1196 /** @type {Object} */
1197 chrome.cast.media.Track.prototype.customData;
1198
1199
1200 /**
1201  * @constructor
1202  * @see https://developers.google.com/cast/docs/reference/chrome/chrome.cast.media.TextTrackStyle
1203  */
1204 chrome.cast.media.TextTrackStyle = function() {};
1205
1206 /** @type {?string} */
1207 chrome.cast.media.TextTrackStyle.prototype.foregroundColor;
1208
1209 /** @type {?string} */
1210 chrome.cast.media.TextTrackStyle.prototype.backgroundColor;
1211
1212 /** @type {?chrome.cast.media.TextTrackEdgeType} */
1213 chrome.cast.media.TextTrackStyle.prototype.edgeType;
1214
1215 /** @type {?string} */
1216 chrome.cast.media.TextTrackStyle.prototype.edgeColor;
1217
1218 /** @type {?chrome.cast.media.TextTrackWindowType} */
1219 chrome.cast.media.TextTrackStyle.prototype.windowType;
1220
1221 /** @type {?string} */
1222 chrome.cast.media.TextTrackStyle.prototype.windowColor;
1223
1224 /** @type {?number} */
1225 chrome.cast.media.TextTrackStyle.prototype.windowRoundedCornerRadius;
1226
1227 /** @type {?number} */
1228 chrome.cast.media.TextTrackStyle.prototype.fontScale;
1229
1230 /** @type {?string} */
1231 chrome.cast.media.TextTrackStyle.prototype.fontFamily;
1232
1233 /** @type {?chrome.cast.media.TextTrackFontGenericFamily} */
1234 chrome.cast.media.TextTrackStyle.prototype.fontGenericFamily;
1235
1236 /** @type {?chrome.cast.media.TextTrackFontStyle} */
1237 chrome.cast.media.TextTrackStyle.prototype.fontStyle;
1238
1239 /** @type {Object} */
1240 chrome.cast.media.TextTrackStyle.prototype.customData;