UNPKG

176 kBHTMLView Raw
1<!DOCTYPE html>
2
3<html lang="en">
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width">
7 <title>CrossBrowdy API documentation Class: CB_AudioFile_API.WAAPI</title>
8
9 <!--[if lt IE 9]>
10 <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
11 <![endif]-->
12 <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
13
14 <link type="text/css" rel="stylesheet" href="styles/site.cosmo.css">
15
16</head>
17
18<body style="min-width:800px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
19
20<div class="navbar navbar-default navbar-fixed-top ">
21<div class="container">
22 <div class="navbar-header">
23 <a class="navbar-brand" href="index.html">CrossBrowdy API documentation</a>
24 <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation">
25 <span class="icon-bar"></span>
26 <span class="icon-bar"></span>
27 <span class="icon-bar"></span>
28 </button>
29 </div>
30 <div class="navbar-collapse collapse" id="topNavigation">
31 <ul class="nav navbar-nav">
32
33 <li class="dropdown">
34 <a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b class="caret"></b></a>
35 <ul class="dropdown-menu inline">
36 <li><a href="CB_Arrays.html">CB_Arrays</a></li><li><a href="CB_AudioDetector.html">CB_AudioDetector</a></li><li><a href="CB_Client.html">CB_Client</a></li><li><a href="CB_Collisions.html">CB_Collisions</a></li><li><a href="CB_Configuration.html">CB_Configuration</a></li><li><a href="CB_Configuration.CrossBase.html">CB_Configuration.CrossBase</a></li><li><a href="CB_Configuration.CrossBrowdy.html">CB_Configuration.CrossBrowdy</a></li><li><a href="CB_Controllers.html">CB_Controllers</a></li><li><a href="CB_Controllers_Proprietary.html">CB_Controllers_Proprietary</a></li><li><a href="CB_Controllers_Proprietary.WII.html">CB_Controllers_Proprietary.WII</a></li><li><a href="CB_Controllers_Proprietary.WII_U.html">CB_Controllers_Proprietary.WII_U</a></li><li><a href="CB_Device.html">CB_Device</a></li><li><a href="CB_Device.AmbientLight.html">CB_Device.AmbientLight</a></li><li><a href="CB_Device.Battery.html">CB_Device.Battery</a></li><li><a href="CB_Device.Location.html">CB_Device.Location</a></li><li><a href="CB_Device.Motion.html">CB_Device.Motion</a></li><li><a href="CB_Device.Orientation.html">CB_Device.Orientation</a></li><li><a href="CB_Device.Proximity.html">CB_Device.Proximity</a></li><li><a href="CB_Device.Vibration.html">CB_Device.Vibration</a></li><li><a href="CB_Elements.html">CB_Elements</a></li><li><a href="CB_Events.html">CB_Events</a></li><li><a href="CB_Keyboard.html">CB_Keyboard</a></li><li><a href="CB_Keyboard.chars.html">CB_Keyboard.chars</a></li><li><a href="CB_Keyboard.extended.html">CB_Keyboard.extended</a></li><li><a href="CB_Keyboard.keys.html">CB_Keyboard.keys</a></li><li><a href="CB_Modules.html">CB_Modules</a></li><li><a href="CB_Mouse.html">CB_Mouse</a></li><li><a href="CB_Mouse.CursorImage.html">CB_Mouse.CursorImage</a></li><li><a href="CB_Net.html">CB_Net</a></li><li><a href="CB_Net.Fetch.html">CB_Net.Fetch</a></li><li><a href="CB_Net.REST.html">CB_Net.REST</a></li><li><a href="CB_Net.Sockets.html">CB_Net.Sockets</a></li><li><a href="CB_Net.Sockets.SockJS.html">CB_Net.Sockets.SockJS</a></li><li><a href="CB_Net.XHR.html">CB_Net.XHR</a></li><li><a href="CB_Pointer.html">CB_Pointer</a></li><li><a href="CB_Screen.html">CB_Screen</a></li><li><a href="CB_Speaker.html">CB_Speaker</a></li><li><a href="CB_Touch.html">CB_Touch</a></li><li><a href="CB_baseSymbols.html">CB_baseSymbols</a></li>
37 </ul>
38 </li>
39
40 <li class="dropdown">
41 <a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b class="caret"></b></a>
42 <ul class="dropdown-menu inline">
43 <li><a href="CB_AudioFile.html">CB_AudioFile</a></li><li><a href="CB_AudioFileCache.html">CB_AudioFileCache</a></li><li><a href="CB_AudioFileSprites.html">CB_AudioFileSprites</a></li><li><a href="CB_AudioFileSpritesPool.html">CB_AudioFileSpritesPool</a></li><li><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></li><li><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></li><li><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></li><li><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></li><li><a href="CB_Canvas.html">CB_Canvas</a></li><li><a href="CB_GraphicSprites.html">CB_GraphicSprites</a></li><li><a href="CB_GraphicSpritesScene.html">CB_GraphicSpritesScene</a></li>
44 </ul>
45 </li>
46
47 <li class="dropdown">
48 <a href="global.html" class="dropdown-toggle" data-toggle="dropdown">Global<b class="caret"></b></a>
49 <ul class="dropdown-menu inline">
50 <li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</a></li><li><a href="global.html#CB_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_NAME">CB_NAME</a></li><li><a href="global.html#CB_OPTIONS">CB_OPTIONS</a></li><li><a href="global.html#CB_VERSION">CB_VERSION</a></li><li><a href="global.html#CB_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_baseToBase">CB_baseToBase</a></li><li><a href="global.html#CB_baseToInt">CB_baseToInt</a></li><li><a href="global.html#CB_br2nl">CB_br2nl</a></li><li><a href="global.html#CB_brToNl">CB_brToNl</a></li><li><a href="global.html#CB_combineArraysOrObjects">CB_combineArraysOrObjects</a></li><li><a href="global.html#CB_combineAutomatically">CB_combineAutomatically</a></li><li><a href="global.html#CB_combineJSON">CB_combineJSON</a></li><li><a href="global.html#CB_combineURIParameters">CB_combineURIParameters</a></li><li><a href="global.html#CB_combineURLParameters">CB_combineURLParameters</a></li><li><a href="global.html#CB_console">CB_console</a></li><li><a href="global.html#CB_copyObject">CB_copyObject</a></li><li><a href="global.html#CB_countDecimalDigits">CB_countDecimalDigits</a></li><li><a href="global.html#CB_countDecimalPart">CB_countDecimalPart</a></li><li><a href="global.html#CB_countDecimals">CB_countDecimals</a></li><li><a href="global.html#CB_countIntegerDigits">CB_countIntegerDigits</a></li><li><a href="global.html#CB_countIntegerPart">CB_countIntegerPart</a></li><li><a href="global.html#CB_credits">CB_credits</a></li><li><a href="global.html#CB_forEach">CB_forEach</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_getBase64StringObject">CB_getBase64StringObject</a></li><li><a href="global.html#CB_getCookie">CB_getCookie</a></li><li><a href="global.html#CB_getDatum">CB_getDatum</a></li><li><a href="global.html#CB_getJSONPropertyValue">CB_getJSONPropertyValue</a></li><li><a href="global.html#CB_getLZStringObject">CB_getLZStringObject</a></li><li><a href="global.html#CB_getValueIndex">CB_getValueIndex</a></li><li><a href="global.html#CB_getValuePath">CB_getValuePath</a></li><li><a href="global.html#CB_includeJSFile">CB_includeJSFile</a></li><li><a href="global.html#CB_indexOf">CB_indexOf</a></li><li><a href="global.html#CB_init">CB_init</a></li><li><a href="global.html#CB_intToBase">CB_intToBase</a></li><li><a href="global.html#CB_isArray">CB_isArray</a></li><li><a href="global.html#CB_isEmail">CB_isEmail</a></li><li><a href="global.html#CB_isFileLocal">CB_isFileLocal</a></li><li><a href="global.html#CB_isString">CB_isString</a></li><li><a href="global.html#CB_lastIndexOf">CB_lastIndexOf</a></li><li><a href="global.html#CB_ltrim">CB_ltrim</a></li><li><a href="global.html#CB_nl2br">CB_nl2br</a></li><li><a href="global.html#CB_nlToBr">CB_nlToBr</a></li><li><a href="global.html#CB_numberFormat">CB_numberFormat</a></li><li><a href="global.html#CB_numberOfDecimalDigits">CB_numberOfDecimalDigits</a></li><li><a href="global.html#CB_numberOfDecimals">CB_numberOfDecimals</a></li><li><a href="global.html#CB_numberOfIntegerDigits">CB_numberOfIntegerDigits</a></li><li><a href="global.html#CB_parseJSON">CB_parseJSON</a></li><li><a href="global.html#CB_parseString">CB_parseString</a></li><li><a href="global.html#CB_regularExpressionString">CB_regularExpressionString</a></li><li><a href="global.html#CB_renderString">CB_renderString</a></li><li><a href="global.html#CB_replaceAll">CB_replaceAll</a></li><li><a href="global.html#CB_rtrim">CB_rtrim</a></li><li><a href="global.html#CB_scriptPath">CB_scriptPath</a></li><li><a href="global.html#CB_scriptPathCalculate">CB_scriptPathCalculate</a></li><li><a href="global.html#CB_setCookie">CB_setCookie</a></li><li><a href="global.html#CB_setDatum">CB_setDatum</a></li><li><a href="global.html#CB_sizeOf">CB_sizeOf</a></li><li><a href="global.html#CB_sizeof">CB_sizeof</a></li><li><a href="global.html#CB_stringifyJSON">CB_stringifyJSON</a></li><li><a href="global.html#CB_symmetricCall">CB_symmetricCall</a></li><li><a href="global.html#CB_symmetricCallClear">CB_symmetricCallClear</a></li><li><a href="global.html#CB_this">CB_this</a></li><li><a href="global.html#CB_trim">CB_trim</a></li>
51 </ul>
52 </li>
53
54 </ul>
55
56 <div class="col-sm-3 col-md-3">
57 <form class="navbar-form" role="search">
58 <div class="input-group">
59 <input type="text" class="form-control" placeholder="Search" name="q" id="search-input">
60 <div class="input-group-btn">
61 <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button>
62 </div>
63 </div>
64 </form>
65 </div>
66
67 </div>
68
69</div>
70</div>
71
72
73<div class="container" id="toc-content" style="width:100%;">
74<div class="row" style="width:100%;">
75
76
77 <div class="col-md-8" style="width:85%;">
78
79 <div id="main">
80
81
82
83 <h1 class="page-title">Class: CB_AudioFile_API.WAAPI</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 CB_AudioFile_API.WAAPI
91 </h2>
92
93 <div class="class-description"><p>Class to manage an audio file using &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>). Used by the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> class internally and it shares most of its properties and methods. Recommended for internal usage only. Uses <a href="https://gist.github.com/htchaan/108b7aa6b71eb03e38019e64450ea095">Base64Binary</a> internally. Some old clients can use this audio API thanks to <a href="https://github.com/cwilso/AudioContext-MonkeyPatch">AudioContext-MonkeyPatch</a> and <a href="https://github.com/g200kg/WAAPISim">WAAPISim</a>.</p></div>
94
95
96</header>
97
98
99<article>
100 <div class="container-overview">
101
102
103<hr>
104<dt>
105 <h4 class="name" id="CB_AudioFile_API.WAAPI"><span class="type-signature"></span>new CB_AudioFile_API.WAAPI<span class="signature">(filePath [, audioId] [, options] [, callbackOk] [, callbackError])</span><span class="type-signature"> &rarr; {<a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a>}</span></h4>
106
107
108</dt>
109<dd>
110
111
112 <div class="description">
113 <p>The constructor is recommended to be called through a user-driven event (as onClick, onTouch, etc.) if the &quot;autoPlay&quot; option is set to true, as some web clients may need this at least the first time in order to be able to play the audio.</p>
114 </div>
115
116
117
118
119
120
121
122
123 <h5>Parameters:</h5>
124
125
126<table class="params table table-striped">
127 <thead>
128 <tr>
129
130 <th style="width:12%; min-width:110px;">Name</th>
131
132
133 <th style="width:12%; min-width:110px;">Type</th>
134
135
136 <th style="width:12%; min-width:110px;">Argument</th>
137
138
139
140 <th style="width:12%; min-width:110px;">Default</th>
141
142
143 <th class="last" style="min-width:310px;">Description</th>
144 </tr>
145 </thead>
146
147 <tbody>
148
149
150 <tr>
151
152 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>filePath</code></td>
153
154
155 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
156
157
158<span class="param-type">string</span>
159
160
161
162
163 </td>
164
165
166 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
167
168
169
170
171
172 </td>
173
174
175
176 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
177
178 </td>
179
180
181 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>The path of the audio file or a data URI. NOTE: Only some clients with some audio APIs will support data URIs.</p></td>
182 </tr>
183
184
185
186 <tr>
187
188 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>audioId</code></td>
189
190
191 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
192
193
194<span class="param-type">string</span>
195
196
197
198
199 </td>
200
201
202 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
203
204 &lt;optional><br>
205
206
207
208
209
210 </td>
211
212
213
214 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
215
216 'CB_AUDIOFILE_WAAPI_' + CB_AudioFile_API.WAAPI._idUnique++
217
218 </td>
219
220
221 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Desired identifier for the audio object. If not provided, an automatic unique ID will be calculated. Note that it is not case sensitive and it should be unique for each object.</p></td>
222 </tr>
223
224
225
226 <tr>
227
228 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>options</code></td>
229
230
231 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
232
233
234<span class="param-type"><a href="CB_AudioFile_API.WAAPI.html#.OPTIONS">CB_AudioFile_API.WAAPI.OPTIONS</a></span>
235
236
237
238
239 </td>
240
241
242 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
243
244 &lt;optional><br>
245
246
247
248
249
250 </td>
251
252
253
254 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
255
256 CB_AudioFile_API.WAAPI#DEFAULT_OPTIONS
257
258 </td>
259
260
261 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Object with the desired options.</p></td>
262 </tr>
263
264
265
266 <tr>
267
268 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackOk</code></td>
269
270
271 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
272
273
274<span class="param-type">function</span>
275
276
277
278
279 </td>
280
281
282 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
283
284 &lt;optional><br>
285
286
287
288
289
290 </td>
291
292
293
294 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
295
296 </td>
297
298
299 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function with no parameters to be called when the audio has been loaded successfully, being &quot;this&quot; the <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object itself.</p></td>
300 </tr>
301
302
303
304 <tr>
305
306 <td class="name" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><code>callbackError</code></td>
307
308
309 <td class="type" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
310
311
312<span class="param-type">function</span>
313
314
315
316
317 </td>
318
319
320 <td class="attributes" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
321
322 &lt;optional><br>
323
324
325
326
327
328 </td>
329
330
331
332 <td class="default" style="width:12%; min-width:110px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;">
333
334 </td>
335
336
337 <td class="description last" style="min-width:310px; overflow-wrap:break-word; word-wrap:break-word; word-break:break-word; line-break:strict; hyphens:none; -webkit-hyphens:none; -moz-hyphens:none;"><p>Function to be called if the audio has not been loaded successfully. The first and unique parameter will be a string describing the error found (if could be determined), being &quot;this&quot; the <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object itself.</p></td>
338 </tr>
339
340
341 </tbody>
342</table>
343
344
345
346
347<dl class="details">
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
378 <dd class="tag-source">
379 <ul class="dummy">
380 <li>
381 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
382 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-22">line 22</a>
383 </li>
384 </ul>
385 </dd>
386
387
388
389
390
391
392
393 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
394 <dd class="tag-todo">
395 <ul>
396 <li>Do not allow to create one object with an "id" which has already been used (unless the value is undefined, null...). Note that the "id" is not case sensitive and it should be unique for each object.</li>
397
398 <li>Method getCopy and static method filterProperties (similar to the ones from <a href="CB_GraphicSprites.html"><code>CB_GraphicSprites</code></a> and <a href="CB_GraphicSpritesScene.html"><code>CB_GraphicSpritesScene</code></a>).</li>
399 </ul>
400 </dd>
401
402</dl>
403
404
405
406
407
408
409
410
411
412
413
414
415
416 <h5>Returns:</h5>
417
418
419<div class="param-desc">
420 <p>Returns a new <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object.</p>
421</div>
422
423
424
425<dl>
426 <dt>
427 Type
428 </dt>
429 <dd>
430
431<span class="param-type"><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></span>
432
433
434
435 </dd>
436</dl>
437
438
439
440
441
442</dd>
443
444
445 </div>
446
447
448
449
450
451
452
453
454
455
456
457
458 <h3 class="subsection-title">Members</h3>
459
460 <dl>
461
462<hr>
463<dt class="name" id="DEFAULT_OPTIONS">
464 <h4 id="DEFAULT_OPTIONS"><span class="type-signature">&lt;constant> </span>DEFAULT_OPTIONS<span class="type-signature"> :<a href="CB_AudioFile_API.WAAPI.html#.OPTIONS">CB_AudioFile_API.WAAPI.OPTIONS</a></span></h4>
465
466
467</dt>
468<dd>
469
470 <div class="description">
471 <p>Keeps the default options when an object is created. Format: { autoLoad: boolean, autoPlay: boolean, loop: boolean, volume: number }.</p>
472 </div>
473
474
475
476 <h5>Type:</h5>
477 <ul>
478 <li>
479
480<span class="param-type"><a href="CB_AudioFile_API.WAAPI.html#.OPTIONS">CB_AudioFile_API.WAAPI.OPTIONS</a></span>
481
482
483
484 </li>
485 </ul>
486
487
488
489<dl class="details">
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
516 <dd class="tag-default">
517 <ul class="dummy">
518 <li>{ autoLoad: true, autoPlay: false, loop: false, volume: <a href="CB_AudioFile_API.WAAPI.html#DEFAULT_VOLUME"><code>CB_AudioFile_API.WAAPI.prototype.DEFAULT_VOLUME</code></a> }</li>
519 </ul>
520 </dd>
521
522
523
524
525
526 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
527 <dd class="tag-source">
528 <ul class="dummy">
529 <li>
530 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
531 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-50">line 50</a>
532 </li>
533 </ul>
534 </dd>
535
536
537
538
539
540
541
542</dl>
543
544
545
546</dd>
547
548
549
550<hr>
551<dt class="name" id="DEFAULT_VOLUME">
552 <h4 id="DEFAULT_VOLUME"><span class="type-signature">&lt;constant> </span>DEFAULT_VOLUME<span class="type-signature"> :number</span></h4>
553
554
555</dt>
556<dd>
557
558 <div class="description">
559 <p>Keeps the default volume. If the <a href="CB_Configuration.CrossBase.html#.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_DEFAULT"><code>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_DEFAULT</code></a> property is true, this will keep the result of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function. Otherwise, it will use the value of the <a href="CB_Configuration.CrossBase.html#.CB_Speaker_DEFAULT_VOLUME"><code>CB_Configuration.CrossBase.CB_Speaker_DEFAULT_VOLUME</code></a> variable.</p>
560 </div>
561
562
563
564 <h5>Type:</h5>
565 <ul>
566 <li>
567
568<span class="param-type">number</span>
569
570
571
572 </li>
573 </ul>
574
575
576
577<dl class="details">
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
604 <dd class="tag-default">
605 <ul class="dummy">
606 <li>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_DEFAULT ? CB_Speaker.getVolume() : CB_Configuration.CrossBase.CB_Speaker_DEFAULT_VOLUME</li>
607 </ul>
608 </dd>
609
610
611
612
613
614 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
615 <dd class="tag-source">
616 <ul class="dummy">
617 <li>
618 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
619 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-42">line 42</a>
620 </li>
621 </ul>
622 </dd>
623
624
625
626
627
628
629
630</dl>
631
632
633
634</dd>
635
636
637
638<hr>
639<dt class="name" id="buffer">
640 <h4 id="buffer"><span class="type-signature">&lt;readonly> </span>buffer<span class="type-signature"> :AudioBuffer</span></h4>
641
642
643</dt>
644<dd>
645
646 <div class="description">
647 <p>Stores the &quot;buffer&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/buffer">AudioBuffer</a> object) of the audio, used by the &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>).</p>
648 </div>
649
650
651
652 <h5>Type:</h5>
653 <ul>
654 <li>
655
656<span class="param-type">AudioBuffer</span>
657
658
659
660 </li>
661 </ul>
662
663
664
665<dl class="details">
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
696 <dd class="tag-source">
697 <ul class="dummy">
698 <li>
699 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
700 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-176">line 176</a>
701 </li>
702 </ul>
703 </dd>
704
705
706
707
708
709
710
711</dl>
712
713
714
715</dd>
716
717
718
719<hr>
720<dt class="name" id="filePath">
721 <h4 id="filePath"><span class="type-signature">&lt;readonly> </span>filePath<span class="type-signature"> :string</span></h4>
722
723
724</dt>
725<dd>
726
727 <div class="description">
728 <p>Stores the path of the audio file or the data URI. NOTE: Only some clients with some audio APIs will support data URIs.</p>
729 </div>
730
731
732
733 <h5>Type:</h5>
734 <ul>
735 <li>
736
737<span class="param-type">string</span>
738
739
740
741 </li>
742 </ul>
743
744
745
746<dl class="details">
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
777 <dd class="tag-source">
778 <ul class="dummy">
779 <li>
780 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
781 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-104">line 104</a>
782 </li>
783 </ul>
784 </dd>
785
786
787
788
789
790
791
792</dl>
793
794
795
796</dd>
797
798
799
800<hr>
801<dt class="name" id="gainNode">
802 <h4 id="gainNode"><span class="type-signature">&lt;readonly> </span>gainNode<span class="type-signature"> :GainNode</span></h4>
803
804
805</dt>
806<dd>
807
808 <div class="description">
809 <p>Stores the &quot;gain node&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/GainNode">GainNode</a> object created with the <a href="https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createGain">createGain</a> method) of the audio, used by the &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>).</p>
810 </div>
811
812
813
814 <h5>Type:</h5>
815 <ul>
816 <li>
817
818<span class="param-type">GainNode</span>
819
820
821
822 </li>
823 </ul>
824
825
826
827<dl class="details">
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
858 <dd class="tag-source">
859 <ul class="dummy">
860 <li>
861 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
862 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-186">line 186</a>
863 </li>
864 </ul>
865 </dd>
866
867
868
869
870
871
872
873</dl>
874
875
876
877</dd>
878
879
880
881<hr>
882<dt class="name" id="id">
883 <h4 id="id"><span class="type-signature">&lt;readonly> </span>id<span class="type-signature"> :string</span></h4>
884
885
886</dt>
887<dd>
888
889 <div class="description">
890 <p>Stores the identifier for the audio file.</p>
891 </div>
892
893
894
895 <h5>Type:</h5>
896 <ul>
897 <li>
898
899<span class="param-type">string</span>
900
901
902
903 </li>
904 </ul>
905
906
907
908<dl class="details">
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
935 <dd class="tag-default">
936 <ul class="dummy">
937 <li>'CB_AUDIOFILE_WAAPI_' + CB_AudioFile_API.WAAPI._idUnique++</li>
938 </ul>
939 </dd>
940
941
942
943
944
945 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
946 <dd class="tag-source">
947 <ul class="dummy">
948 <li>
949 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
950 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-95">line 95</a>
951 </li>
952 </ul>
953 </dd>
954
955
956
957
958
959
960
961</dl>
962
963
964
965</dd>
966
967
968
969<hr>
970<dt class="name" id="lastStartAt">
971 <h4 id="lastStartAt"><span class="type-signature">&lt;readonly> </span>lastStartAt<span class="type-signature"> :number</span></h4>
972
973
974</dt>
975<dd>
976
977 <div class="description">
978 <p>Stores the last &quot;startAt&quot; parameter value used by the <a href="CB_AudioFile_API.WAAPI.html#play"><code>CB_AudioFile_API.WAAPI#play</code></a> or the <a href="CB_AudioFile_API.WAAPI.html#resume"><code>CB_AudioFile_API.WAAPI#resume</code></a> method.</p>
979 </div>
980
981
982
983 <h5>Type:</h5>
984 <ul>
985 <li>
986
987<span class="param-type">number</span>
988
989
990
991 </li>
992 </ul>
993
994
995
996<dl class="details">
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1027 <dd class="tag-source">
1028 <ul class="dummy">
1029 <li>
1030 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1031 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-149">line 149</a>
1032 </li>
1033 </ul>
1034 </dd>
1035
1036
1037
1038
1039
1040
1041
1042</dl>
1043
1044
1045
1046</dd>
1047
1048
1049
1050<hr>
1051<dt class="name" id="lastStopAt">
1052 <h4 id="lastStopAt"><span class="type-signature">&lt;readonly> </span>lastStopAt<span class="type-signature"> :number</span></h4>
1053
1054
1055</dt>
1056<dd>
1057
1058 <div class="description">
1059 <p>Stores the last &quot;stopAt&quot; parameter value used by the <a href="CB_AudioFile_API.WAAPI.html#play"><code>CB_AudioFile_API.WAAPI#play</code></a> or the <a href="CB_AudioFile_API.WAAPI.html#resume"><code>CB_AudioFile_API.WAAPI#resume</code></a> method.</p>
1060 </div>
1061
1062
1063
1064 <h5>Type:</h5>
1065 <ul>
1066 <li>
1067
1068<span class="param-type">number</span>
1069
1070
1071
1072 </li>
1073 </ul>
1074
1075
1076
1077<dl class="details">
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1108 <dd class="tag-source">
1109 <ul class="dummy">
1110 <li>
1111 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1112 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-158">line 158</a>
1113 </li>
1114 </ul>
1115 </dd>
1116
1117
1118
1119
1120
1121
1122
1123</dl>
1124
1125
1126
1127</dd>
1128
1129
1130
1131<hr>
1132<dt class="name" id="loop">
1133 <h4 id="loop"><span class="type-signature">&lt;readonly> </span>loop<span class="type-signature"> :boolean</span></h4>
1134
1135
1136</dt>
1137<dd>
1138
1139 <div class="description">
1140 <p>Defines whether the file loops by default when the audio is played or not. Its value will be modified automatically whenever the <a href="CB_AudioFile_API.WAAPI.html#play"><code>CB_AudioFile_API.WAAPI#play</code></a> method is called, getting the value from the &quot;loop&quot; parameter (but only if contains a boolean).</p>
1141 </div>
1142
1143
1144
1145 <h5>Type:</h5>
1146 <ul>
1147 <li>
1148
1149<span class="param-type">boolean</span>
1150
1151
1152
1153 </li>
1154 </ul>
1155
1156
1157
1158<dl class="details">
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1185 <dd class="tag-default">
1186 <ul class="dummy">
1187 <li><a href="CB_AudioFile_API.WAAPI.html#DEFAULT_OPTIONS"><code>CB_AudioFile_API.WAAPI.prototype.DEFAULT_OPTIONS</code></a>.loop</li>
1188 </ul>
1189 </dd>
1190
1191
1192
1193
1194
1195 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1196 <dd class="tag-source">
1197 <ul class="dummy">
1198 <li>
1199 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1200 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-68">line 68</a>
1201 </li>
1202 </ul>
1203 </dd>
1204
1205
1206
1207
1208
1209
1210
1211</dl>
1212
1213
1214
1215</dd>
1216
1217
1218
1219<hr>
1220<dt class="name" id="onStopFunction">
1221 <h4 id="onStopFunction"><span class="type-signature">&lt;readonly> </span>onStopFunction<span class="type-signature"> :function</span></h4>
1222
1223
1224</dt>
1225<dd>
1226
1227 <div class="description">
1228 <p>Function to call when the audio stops.</p>
1229 </div>
1230
1231
1232
1233 <h5>Type:</h5>
1234 <ul>
1235 <li>
1236
1237<span class="param-type">function</span>
1238
1239
1240
1241 </li>
1242 </ul>
1243
1244
1245
1246<dl class="details">
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1277 <dd class="tag-source">
1278 <ul class="dummy">
1279 <li>
1280 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1281 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-140">line 140</a>
1282 </li>
1283 </ul>
1284 </dd>
1285
1286
1287
1288
1289
1290
1291
1292</dl>
1293
1294
1295
1296</dd>
1297
1298
1299
1300<hr>
1301<dt class="name" id="pauseTime">
1302 <h4 id="pauseTime"><span class="type-signature">&lt;readonly> </span>pauseTime<span class="type-signature"> :number</span></h4>
1303
1304
1305</dt>
1306<dd>
1307
1308 <div class="description">
1309 <p>Stores the time (in milliseconds) when the audio has been paused.</p>
1310 </div>
1311
1312
1313
1314 <h5>Type:</h5>
1315 <ul>
1316 <li>
1317
1318<span class="param-type">number</span>
1319
1320
1321
1322 </li>
1323 </ul>
1324
1325
1326
1327<dl class="details">
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1358 <dd class="tag-source">
1359 <ul class="dummy">
1360 <li>
1361 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1362 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-122">line 122</a>
1363 </li>
1364 </ul>
1365 </dd>
1366
1367
1368
1369
1370
1371
1372
1373</dl>
1374
1375
1376
1377</dd>
1378
1379
1380
1381<hr>
1382<dt class="name" id="paused">
1383 <h4 id="paused"><span class="type-signature">&lt;readonly> </span>paused<span class="type-signature"> :boolean</span></h4>
1384
1385
1386</dt>
1387<dd>
1388
1389 <div class="description">
1390 <p>Tells whether the audio is paused or not.</p>
1391 </div>
1392
1393
1394
1395 <h5>Type:</h5>
1396 <ul>
1397 <li>
1398
1399<span class="param-type">boolean</span>
1400
1401
1402
1403 </li>
1404 </ul>
1405
1406
1407
1408<dl class="details">
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1435 <dd class="tag-default">
1436 <ul class="dummy">
1437 <li>false</li>
1438 </ul>
1439 </dd>
1440
1441
1442
1443
1444
1445 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1446 <dd class="tag-source">
1447 <ul class="dummy">
1448 <li>
1449 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1450 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-113">line 113</a>
1451 </li>
1452 </ul>
1453 </dd>
1454
1455
1456
1457
1458
1459
1460
1461</dl>
1462
1463
1464
1465</dd>
1466
1467
1468
1469<hr>
1470<dt class="name" id="progressDownloading">
1471 <h4 id="progressDownloading"><span class="type-signature">&lt;readonly> </span>progressDownloading<span class="type-signature"> :number</span></h4>
1472
1473
1474</dt>
1475<dd>
1476
1477 <div class="description">
1478 <p>Progress of the loading process (or downloading through <a href="https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/XMLHttpRequest">XHR</a>) the audio data, used by the &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>). Internal usage only recommended (use the <a href="CB_AudioFile_API.WAAPI.html#getProgress"><code>CB_AudioFile_API.WAAPI#getProgress</code></a> method instead to know the progress).</p>
1479 </div>
1480
1481
1482
1483 <h5>Type:</h5>
1484 <ul>
1485 <li>
1486
1487<span class="param-type">number</span>
1488
1489
1490
1491 </li>
1492 </ul>
1493
1494
1495
1496<dl class="details">
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1523 <dd class="tag-default">
1524 <ul class="dummy">
1525 <li>0</li>
1526 </ul>
1527 </dd>
1528
1529
1530
1531
1532
1533 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1534 <dd class="tag-source">
1535 <ul class="dummy">
1536 <li>
1537 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1538 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-195">line 195</a>
1539 </li>
1540 </ul>
1541 </dd>
1542
1543
1544
1545
1546
1547
1548
1549</dl>
1550
1551
1552
1553</dd>
1554
1555
1556
1557<hr>
1558<dt class="name" id="source">
1559 <h4 id="source"><span class="type-signature">&lt;readonly> </span>source<span class="type-signature"> :AudioBufferSourceNode</span></h4>
1560
1561
1562</dt>
1563<dd>
1564
1565 <div class="description">
1566 <p>Stores the &quot;source&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode">AudioBufferSourceNode</a> object) of the audio, used by the &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>).</p>
1567 </div>
1568
1569
1570
1571 <h5>Type:</h5>
1572 <ul>
1573 <li>
1574
1575<span class="param-type">AudioBufferSourceNode</span>
1576
1577
1578
1579 </li>
1580 </ul>
1581
1582
1583
1584<dl class="details">
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1615 <dd class="tag-source">
1616 <ul class="dummy">
1617 <li>
1618 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1619 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-167">line 167</a>
1620 </li>
1621 </ul>
1622 </dd>
1623
1624
1625
1626
1627
1628
1629
1630</dl>
1631
1632
1633
1634</dd>
1635
1636
1637
1638<hr>
1639<dt class="name" id="status">
1640 <h4 id="status"><span class="type-signature">&lt;readonly> </span>status<span class="type-signature"> :integer</span></h4>
1641
1642
1643</dt>
1644<dd>
1645
1646 <div class="description">
1647 <p>Tells whether the file is unloaded (<a href="CB_AudioFile.html#.UNLOADED"><code>CB_AudioFile.UNLOADED</code></a>), loading (<a href="CB_AudioFile.html#.LOADING"><code>CB_AudioFile.LOADING</code></a>), unchecked (<a href="CB_AudioFile.html#.UNCHECKED"><code>CB_AudioFile.UNCHECKED</code></a>), checking (<a href="CB_AudioFile.html#.CHECKING"><code>CB_AudioFile.CHECKING</code></a>), loaded (<a href="CB_AudioFile.html#.LOADED"><code>CB_AudioFile.LOADED</code></a>), failed (<a href="CB_AudioFile.html#.FAILED"><code>CB_AudioFile.FAILED</code></a>) or aborted (<a href="CB_AudioFile.html#.ABORTED"><code>CB_AudioFile.ABORTED</code></a>).</p>
1648 </div>
1649
1650
1651
1652 <h5>Type:</h5>
1653 <ul>
1654 <li>
1655
1656<span class="param-type">integer</span>
1657
1658
1659
1660 </li>
1661 </ul>
1662
1663
1664
1665<dl class="details">
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1692 <dd class="tag-default">
1693 <ul class="dummy">
1694 <li><a href="CB_AudioFile.html#.UNLOADED"><code>CB_AudioFile.UNLOADED</code></a></li>
1695 </ul>
1696 </dd>
1697
1698
1699
1700
1701
1702 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1703 <dd class="tag-source">
1704 <ul class="dummy">
1705 <li>
1706 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1707 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-59">line 59</a>
1708 </li>
1709 </ul>
1710 </dd>
1711
1712
1713
1714
1715
1716
1717
1718</dl>
1719
1720
1721
1722</dd>
1723
1724
1725
1726<hr>
1727<dt class="name" id="stopped">
1728 <h4 id="stopped"><span class="type-signature">&lt;readonly> </span>stopped<span class="type-signature"> :boolean</span></h4>
1729
1730
1731</dt>
1732<dd>
1733
1734 <div class="description">
1735 <p>Tells whether the audio is stopped or not.</p>
1736 </div>
1737
1738
1739
1740 <h5>Type:</h5>
1741 <ul>
1742 <li>
1743
1744<span class="param-type">boolean</span>
1745
1746
1747
1748 </li>
1749 </ul>
1750
1751
1752
1753<dl class="details">
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1780 <dd class="tag-default">
1781 <ul class="dummy">
1782 <li>true</li>
1783 </ul>
1784 </dd>
1785
1786
1787
1788
1789
1790 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1791 <dd class="tag-source">
1792 <ul class="dummy">
1793 <li>
1794 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1795 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-131">line 131</a>
1796 </li>
1797 </ul>
1798 </dd>
1799
1800
1801
1802
1803
1804
1805
1806</dl>
1807
1808
1809
1810</dd>
1811
1812
1813
1814<hr>
1815<dt class="name" id="volume">
1816 <h4 id="volume"><span class="type-signature">&lt;readonly> </span>volume<span class="type-signature"> :number</span></h4>
1817
1818
1819</dt>
1820<dd>
1821
1822 <div class="description">
1823 <p>Stores the volume of this audio. Accepted values go from 0 to MAX_VOLUME, where MAX_VOLUME is 100 if the <a href="CB_Configuration.CrossBase.html#.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_MAXIMUM"><code>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_MAXIMUM</code></a> property is false or otherwise MAX_VOLUME is the returning value of the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function.</p>
1824 </div>
1825
1826
1827
1828 <h5>Type:</h5>
1829 <ul>
1830 <li>
1831
1832<span class="param-type">number</span>
1833
1834
1835
1836 </li>
1837 </ul>
1838
1839
1840
1841<dl class="details">
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1868 <dd class="tag-default">
1869 <ul class="dummy">
1870 <li><a href="CB_AudioFile_API.WAAPI.html#DEFAULT_OPTIONS"><code>CB_AudioFile_API.WAAPI.prototype.DEFAULT_OPTIONS</code></a>.volume</li>
1871 </ul>
1872 </dd>
1873
1874
1875
1876
1877
1878 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1879 <dd class="tag-source">
1880 <ul class="dummy">
1881 <li>
1882 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1883 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-77">line 77</a>
1884 </li>
1885 </ul>
1886 </dd>
1887
1888
1889
1890
1891
1892
1893
1894</dl>
1895
1896
1897
1898</dd>
1899
1900
1901
1902<hr>
1903<dt class="name" id="volumeBeforeMute">
1904 <h4 id="volumeBeforeMute"><span class="type-signature">&lt;readonly> </span>volumeBeforeMute<span class="type-signature"> :number</span></h4>
1905
1906
1907</dt>
1908<dd>
1909
1910 <div class="description">
1911 <p>Stores the volume of this audio before it was muted (to restore it later). Valid values go from 0 to MAX_VOLUME, where MAX_VOLUME is 100 if the <a href="CB_Configuration.CrossBase.html#.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_MAXIMUM"><code>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_MAXIMUM</code></a> property is false or otherwise MAX_VOLUME is the returning value of the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function.</p>
1912 </div>
1913
1914
1915
1916 <h5>Type:</h5>
1917 <ul>
1918 <li>
1919
1920<span class="param-type">number</span>
1921
1922
1923
1924 </li>
1925 </ul>
1926
1927
1928
1929<dl class="details">
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1956 <dd class="tag-default">
1957 <ul class="dummy">
1958 <li><a href="CB_AudioFile_API.WAAPI.html#volume"><code>CB_AudioFile_API.WAAPI#volume</code></a></li>
1959 </ul>
1960 </dd>
1961
1962
1963
1964
1965
1966 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1967 <dd class="tag-source">
1968 <ul class="dummy">
1969 <li>
1970 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html">CrossBase/audiovisual/audio/CB_AudioFile_API_WAAPI.js</a>,
1971 <a href="CrossBase_audiovisual_audio_CB_AudioFile_API_WAAPI.js.html#sunlight-1-line-86">line 86</a>
1972 </li>
1973 </ul>
1974 </dd>
1975
1976
1977
1978
1979
1980
1981
1982</dl>
1983
1984
1985
1986</dd>
1987
1988 </dl>
1989
1990
1991
1992 <h3 class="subsection-title">Methods</h3>
1993
1994 <dl>
1995
1996<hr>
1997<dt>
1998 <h4 class="name" id="checkPlaying"><span class="type-signature"></span>checkPlaying<span class="signature">( [callbackOk] [, callbackError] [, ignoreStatus] [, ignoreQueue] [, useCache])</span><span class="type-signature"> &rarr; {boolean}</span></h4>
1999
2000
2001</dt>
2002<dd>
2003
2004
2005 <div class="description">
2006 <p>Checks whether the audio can be played or not. Recommended to be called through a user-driven event (as onClick, onTouch, etc.), as some web clients may need this at least the first time in order to be able to play the audio. Also recommended to use before calling the <a href="CB_AudioFile_API.WAAPI.html#play"><code>CB_AudioFile_API.WAAPI#play</code></a> method the first time. The checking action will only be performed if the value of the <a href="CB_AudioFile_API.WAAPI.html#status"><code>CB_AudioFile_API.WAAPI#status</code></a> property belongs to the <a href="CB_AudioFile.html#.UNCHECKED"><code>CB_AudioFile.UNCHECKED</code></a> or to the <a href="CB_AudioFile.html#.CHECKING"><code>CB_AudioFile.CHECKING</code></a> value. After checking, if the audio can be played, the <a href="CB_AudioFile_API.WAAPI.html#status"><code>CB_AudioFile_API.WAAPI#status</code></a> of the object will get the value of <a href="CB_AudioFile.html#.LOADED"><code>CB_AudioFile.LOADED</code></a>. Otherwise, if it cannot be played, the <a href="CB_AudioFile_API.WAAPI.html#status"><code>CB_AudioFile_API.WAAPI#status</code></a> property will get the value of {CB_AudioFile.FAILED}.</p>
2007 </div>
2008
2009
2010
2011
2012
2013
2014