Debian Codegraph @

contrib/externs/google_youtube_iframe.js

raw symbols SCIP
1 /*
2 * Copyright 2011 The Closure Compiler Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /**
18 * @fileoverview Externs for YouTube Player API for <iframe> Embeds
19 * @see http://code.google.com/apis/youtube/iframe_api_reference.html
20 * @externs
21 */
22
23 /** @return {undefined} */
24 var onYouTubePlayerAPIReady = function() {};
25
26 /** @return {undefined} */
27 window.onYouTubePlayerAPIReady = function() {};
28
29 /** @const */
30 var YT = {};
31
32 /**
33 * @constructor
34 * @param {(string|Element)} container
35 * @param {Object.<string, *>} opts
36 */
37 YT.Player = function(container, opts) {};
38
39 /**
40 * @param {string} videoId
41 * @param {number=} startSeconds
42 * @param {string=} suggestedQuality
43 */
44 YT.Player.prototype.cueVideoById =
45 function(videoId, startSeconds, suggestedQuality) {};
46
47 /**
48 * @param {string} videoId
49 * @param {number=} startSeconds
50 * @param {string=} suggestedQuality
51 */
52 YT.Player.prototype.loadVideoById =
53 function(videoId, startSeconds, suggestedQuality) {};
54
55 /**
56 * @param {string} mediaContentUrl
57 * @param {number} startSeconds
58 * @param {string=} suggestedQuality
59 */
60 YT.Player.prototype.cueVideoByUrl =
61 function(mediaContentUrl, startSeconds, suggestedQuality) {};
62
63 /**
64 * @param {string} mediaContentUrl
65 * @param {number} startSeconds
66 * @param {string=} suggestedQuality
67 */
68 YT.Player.prototype.loadVideoByUrl =
69 function(mediaContentUrl, startSeconds, suggestedQuality) {};
70
71 /**
72 * @param {(String|Array.<String>)} playlist
73 * @param {number=} index
74 * @param {number=} startSeconds
75 * @param {string=} suggestedQuality
76 */
77 YT.Player.prototype.cuePlaylist =
78 function(playlist, index, startSeconds, suggestedQuality) {};
79
80 /**
81 * @param {(String|Array.<String>)} playlist
82 * @param {number=} index
83 * @param {number=} startSeconds
84 * @param {string=} suggestedQuality
85 */
86 YT.Player.prototype.loadPlaylist =
87 function(playlist, index, startSeconds, suggestedQuality) {};
88
89 /** @return {undefined} */
90 YT.Player.prototype.playVideo = function() {};
91
92 /** @return {undefined} */
93 YT.Player.prototype.pauseVideo = function() {};
94
95 /** @return {undefined} */
96 YT.Player.prototype.stopVideo = function() {};
97
98 /**
99 * @param {number} seconds
100 * @param {boolean} allowSeekAhead
101 */
102 YT.Player.prototype.seekTo = function(seconds, allowSeekAhead) {};
103
104 /** @return {undefined} */
105 YT.Player.prototype.clearVideo = function() {};
106
107 /** @return {undefined} */
108 YT.Player.prototype.nextVideo = function() {};
109
110 /** @return {undefined} */
111 YT.Player.prototype.previousVideo = function() {};
112
113 /** @param {number} index */
114 YT.Player.prototype.playVideoAt = function(index) {};
115
116 /** @return {undefined} */
117 YT.Player.prototype.mute = function() {};
118
119 /** @return {undefined} */
120 YT.Player.prototype.unMute = function() {};
121
122 /** @return {boolean} */
123 YT.Player.prototype.isMuted = function() {};
124
125 /** @param {number} volume */
126 YT.Player.prototype.setVolume = function(volume) {};
127
128 /**
129 * @return {number}
130 * @nosideeffects
131 */
132 YT.Player.prototype.getVolume = function() {};
133
134 /** @param {boolean} loopPlaylists */
135 YT.Player.prototype.setLoop = function(loopPlaylists) {};
136
137 /** @param {boolean} shufflePlaylist */
138 YT.Player.prototype.setShuffle = function(shufflePlaylist) {};
139
140 /**
141 * @return {number}
142 * @nosideeffects
143 */
144 YT.Player.prototype.getVideoBytesLoaded = function() {};
145
146 /**
147 * @return {number}
148 * @nosideeffects
149 */
150 YT.Player.prototype.getVideoBytesTotal = function() {};
151
152 /**
153 * @return {number}
154 * @nosideeffects
155 */
156 YT.Player.prototype.getVideoStartBytes = function() {};
157
158 /**
159 * @return {YT.PlayerState|number}
160 * @nosideeffects
161 */
162 YT.Player.prototype.getPlayerState = function() {};
163
164 /**
165 * @return {number}
166 * @nosideeffects
167 */
168 YT.Player.prototype.getCurrentTime = function() {};
169
170 /**
171 * @return {(undefined|string)}
172 * @nosideeffects
173 */
174 YT.Player.prototype.getPlaybackQuality = function() {};
175
176 /** @param {string} suggestedQuality */
177 YT.Player.prototype.setPlaybackQuality = function(suggestedQuality) {};
178
179 /**
180 * @return {Array.<string>}
181 * @nosideeffects
182 */
183 YT.Player.prototype.getAvailableQualityLevels = function() {};
184
185 /**
186 * @return {number}
187 * @nosideeffects
188 */
189 YT.Player.prototype.getDuration = function() {};
190
191 /**
192 * @return {string}
193 * @nosideeffects
194 */
195 YT.Player.prototype.getVideoUrl = function() {};
196
197 /**
198 * @return {string}
199 * @nosideeffects
200 */
201 YT.Player.prototype.getVideoEmbedCode = function() {};
202
203 /**
204 * @return {Array.<string>}
205 * @nosideeffects
206 */
207 YT.Player.prototype.getPlaylist = function() {};
208
209 /**
210 * @return {number}
211 * @nosideeffects
212 */
213 YT.Player.prototype.getPlaylistIndex = function() {};
214
215 /**
216 * @param {string} eventName
217 * @param {string} listenerName
218 */
219 YT.Player.prototype.addEventListener = function(eventName, listenerName) {};
220
221 /** @enum */
222 YT.PlayerState = {
223 ENDED: 0,
224 PLAYING: 1,
225 PAUSED: 2,
226 BUFFERING: 3,
227 CUED: 4
228 };
229
230 /**
231 * @constructor
232 * @private
233 */
234 YT.Event = function() {};
235
236 /** @type {string|number|undefined} */
237 YT.Event.prototype.data;
238
239 /** @type {YT.Player} */
240 YT.Event.prototype.target = null;