UNPKG

240 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 [printable] Class: CB_AudioFile</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.yeti.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 [printable]</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_baseSymbols.html">CB_baseSymbols</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>
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_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_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_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_addCredits">CB_addCredits</a></li><li><a href="global.html#CB_BASE_NAME">CB_BASE_NAME</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_CREDITS_DEFAULT">CB_CREDITS_DEFAULT</a></li><li><a href="global.html#CB_forceString">CB_forceString</a></li><li><a href="global.html#CB_forEach">CB_forEach</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_NAME">CB_NAME</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_OPTIONS">CB_OPTIONS</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><li><a href="global.html#CB_VERSION">CB_VERSION</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</h1>
84
85<section>
86
87<header>
88
89 <h2>
90 CB_AudioFile
91 </h2>
92
93 <div class="class-description"><p>Class to manage an audio file. Internally, it uses one audio API object which belongs to the audio API being used (when the audio API is changed, it keeps the old audio API objects just in case they are needed in the future when the audio API is changed again). Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</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"><span class="type-signature"></span>new CB_AudioFile<span class="signature">(filePath [, audioId] [, options] [, audioAPI] [, callbackOk] [, callbackError])</span><span class="type-signature"> &rarr; {<a href="CB_AudioFile.html">CB_AudioFile</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 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_' + CB_AudioFile._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 (can be a different element depending on the audio API used). 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.html#.OPTIONS">CB_AudioFile.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 <a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile#DEFAULT_OPTIONS</code></a>
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>audioAPI</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">string</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 CB_AudioDetector.getPreferredAPI(undefined, false, null) || CB_AudioDetector.getPreferredAPI(undefined, true, null)
297
298 </td>
299
300
301 <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 desired audio API to be used. If not provided, it will try to calculate the best one for the current client by calling the <a href="CB_AudioDetector.html#.getPreferredAPI"><code>CB_AudioDetector.getPreferredAPI</code></a> function internally. Audio API support will depend on the current client being used. All possible ones are defined in <a href="CB_Configuration.CrossBase.html#.CB_AudioFileCache_PREFERRED_AUDIO_APIS"><code>CB_Configuration.CrossBase.CB_AudioFileCache_PREFERRED_AUDIO_APIS</code></a>. For example: &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
302 </tr>
303
304
305
306 <tr>
307
308 <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>
309
310
311 <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;">
312
313
314<span class="param-type">function</span>
315
316
317
318
319 </td>
320
321
322 <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;">
323
324 &lt;optional><br>
325
326
327
328
329
330 </td>
331
332
333
334 <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;">
335
336 </td>
337
338
339 <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.html"><code>CB_AudioFile</code></a> object itself.</p></td>
340 </tr>
341
342
343
344 <tr>
345
346 <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>
347
348
349 <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;">
350
351
352<span class="param-type">function</span>
353
354
355
356
357 </td>
358
359
360 <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;">
361
362 &lt;optional><br>
363
364
365
366
367
368 </td>
369
370
371
372 <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;">
373
374 </td>
375
376
377 <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 it could be determined), being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object itself.</p></td>
378 </tr>
379
380
381 </tbody>
382</table>
383
384
385
386
387<dl class="details">
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
418 <dd class="tag-source">
419 <ul class="dummy">
420 <li>
421 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
422 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-24">line 24</a>
423 </li>
424 </ul>
425 </dd>
426
427
428
429
430
431
432
433 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
434 <dd class="tag-todo">
435 <ul>
436 <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>
437
438 <li>Send the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object itself as a parameter when calling both "callbackOk" and "callbackError".</li>
439
440 <li>Think about allowing to define 'useXHR' and 'useCache' options (used by <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> objects).</li>
441
442 <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>
443 </ul>
444 </dd>
445
446</dl>
447
448
449
450
451
452
453
454
455
456
457
458
459
460 <h5>Returns:</h5>
461
462
463<div class="param-desc">
464 <p>Returns a new <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object.</p>
465</div>
466
467
468
469<dl>
470 <dt>
471 Type
472 </dt>
473 <dd>
474
475<span class="param-type"><a href="CB_AudioFile.html">CB_AudioFile</a></span>
476
477
478
479 </dd>
480</dl>
481
482
483
484
485
486</dd>
487
488
489 </div>
490
491
492
493
494
495
496
497
498
499
500
501
502 <h3 class="subsection-title">Members</h3>
503
504 <dl>
505
506<hr>
507<dt class="name" id=".ABORTED">
508 <h4 id=".ABORTED"><span class="type-signature">&lt;static, constant> </span>ABORTED<span class="type-signature"> :integer</span></h4>
509
510
511</dt>
512<dd>
513
514 <div class="description">
515 <p>Status value for an audio file which has been aborted. This will happen when the audio file has been destroyed with the <a href="CB_AudioFile.html#destructor"><code>CB_AudioFile#destructor</code></a> method. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
516 </div>
517
518
519
520 <h5>Type:</h5>
521 <ul>
522 <li>
523
524<span class="param-type">integer</span>
525
526
527
528 </li>
529 </ul>
530
531
532
533<dl class="details">
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
560 <dd class="tag-default">
561 <ul class="dummy">
562 <li>6</li>
563 </ul>
564 </dd>
565
566
567
568
569
570 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
571 <dd class="tag-source">
572 <ul class="dummy">
573 <li>
574 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
575 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-254">line 254</a>
576 </li>
577 </ul>
578 </dd>
579
580
581
582
583
584
585
586</dl>
587
588
589
590</dd>
591
592
593
594<hr>
595<dt class="name" id=".CHECKING">
596 <h4 id=".CHECKING"><span class="type-signature">&lt;static, constant> </span>CHECKING<span class="type-signature"> :integer</span></h4>
597
598
599</dt>
600<dd>
601
602 <div class="description">
603 <p>Status value for an audio file which is being checked currently. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
604 </div>
605
606
607
608 <h5>Type:</h5>
609 <ul>
610 <li>
611
612<span class="param-type">integer</span>
613
614
615
616 </li>
617 </ul>
618
619
620
621<dl class="details">
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
648 <dd class="tag-default">
649 <ul class="dummy">
650 <li>3</li>
651 </ul>
652 </dd>
653
654
655
656
657
658 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
659 <dd class="tag-source">
660 <ul class="dummy">
661 <li>
662 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
663 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-230">line 230</a>
664 </li>
665 </ul>
666 </dd>
667
668
669
670
671
672
673
674</dl>
675
676
677
678</dd>
679
680
681
682<hr>
683<dt class="name" id=".FAILED">
684 <h4 id=".FAILED"><span class="type-signature">&lt;static, constant> </span>FAILED<span class="type-signature"> :integer</span></h4>
685
686
687</dt>
688<dd>
689
690 <div class="description">
691 <p>Status value for an audio file which failed to be loaded or failed for any other reason. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
692 </div>
693
694
695
696 <h5>Type:</h5>
697 <ul>
698 <li>
699
700<span class="param-type">integer</span>
701
702
703
704 </li>
705 </ul>
706
707
708
709<dl class="details">
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
736 <dd class="tag-default">
737 <ul class="dummy">
738 <li>5</li>
739 </ul>
740 </dd>
741
742
743
744
745
746 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
747 <dd class="tag-source">
748 <ul class="dummy">
749 <li>
750 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
751 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-246">line 246</a>
752 </li>
753 </ul>
754 </dd>
755
756
757
758
759
760
761
762</dl>
763
764
765
766</dd>
767
768
769
770<hr>
771<dt class="name" id=".LOADED">
772 <h4 id=".LOADED"><span class="type-signature">&lt;static, constant> </span>LOADED<span class="type-signature"> :integer</span></h4>
773
774
775</dt>
776<dd>
777
778 <div class="description">
779 <p>Status value for an audio file which has been loaded. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
780 </div>
781
782
783
784 <h5>Type:</h5>
785 <ul>
786 <li>
787
788<span class="param-type">integer</span>
789
790
791
792 </li>
793 </ul>
794
795
796
797<dl class="details">
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
824 <dd class="tag-default">
825 <ul class="dummy">
826 <li>4</li>
827 </ul>
828 </dd>
829
830
831
832
833
834 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
835 <dd class="tag-source">
836 <ul class="dummy">
837 <li>
838 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
839 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-238">line 238</a>
840 </li>
841 </ul>
842 </dd>
843
844
845
846
847
848
849
850</dl>
851
852
853
854</dd>
855
856
857
858<hr>
859<dt class="name" id=".LOADING">
860 <h4 id=".LOADING"><span class="type-signature">&lt;static, constant> </span>LOADING<span class="type-signature"> :integer</span></h4>
861
862
863</dt>
864<dd>
865
866 <div class="description">
867 <p>Status value for an audio file which is loading. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
868 </div>
869
870
871
872 <h5>Type:</h5>
873 <ul>
874 <li>
875
876<span class="param-type">integer</span>
877
878
879
880 </li>
881 </ul>
882
883
884
885<dl class="details">
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
912 <dd class="tag-default">
913 <ul class="dummy">
914 <li>1</li>
915 </ul>
916 </dd>
917
918
919
920
921
922 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
923 <dd class="tag-source">
924 <ul class="dummy">
925 <li>
926 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
927 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-214">line 214</a>
928 </li>
929 </ul>
930 </dd>
931
932
933
934
935
936
937
938</dl>
939
940
941
942</dd>
943
944
945
946<hr>
947<dt class="name" id=".UNCHECKED">
948 <h4 id=".UNCHECKED"><span class="type-signature">&lt;static, constant> </span>UNCHECKED<span class="type-signature"> :integer</span></h4>
949
950
951</dt>
952<dd>
953
954 <div class="description">
955 <p>Status value for an audio file which has been not checked yet. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
956 </div>
957
958
959
960 <h5>Type:</h5>
961 <ul>
962 <li>
963
964<span class="param-type">integer</span>
965
966
967
968 </li>
969 </ul>
970
971
972
973<dl class="details">
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1000 <dd class="tag-default">
1001 <ul class="dummy">
1002 <li>2</li>
1003 </ul>
1004 </dd>
1005
1006
1007
1008
1009
1010 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1011 <dd class="tag-source">
1012 <ul class="dummy">
1013 <li>
1014 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1015 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-222">line 222</a>
1016 </li>
1017 </ul>
1018 </dd>
1019
1020
1021
1022
1023
1024
1025
1026</dl>
1027
1028
1029
1030</dd>
1031
1032
1033
1034<hr>
1035<dt class="name" id=".UNLOADED">
1036 <h4 id=".UNLOADED"><span class="type-signature">&lt;static, constant> </span>UNLOADED<span class="type-signature"> :integer</span></h4>
1037
1038
1039</dt>
1040<dd>
1041
1042 <div class="description">
1043 <p>Status value for an audio file which is unloaded. Can be used to compare the value returned by the <a href="CB_AudioFile.html#getStatus"><code>CB_AudioFile#getStatus</code></a> method. Recommended for internal usage only.</p>
1044 </div>
1045
1046
1047
1048 <h5>Type:</h5>
1049 <ul>
1050 <li>
1051
1052<span class="param-type">integer</span>
1053
1054
1055
1056 </li>
1057 </ul>
1058
1059
1060
1061<dl class="details">
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1088 <dd class="tag-default">
1089 <ul class="dummy">
1090 <li>0</li>
1091 </ul>
1092 </dd>
1093
1094
1095
1096
1097
1098 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1099 <dd class="tag-source">
1100 <ul class="dummy">
1101 <li>
1102 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1103 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-206">line 206</a>
1104 </li>
1105 </ul>
1106 </dd>
1107
1108
1109
1110
1111
1112
1113
1114</dl>
1115
1116
1117
1118</dd>
1119
1120
1121
1122<hr>
1123<dt class="name" id="audioAPI">
1124 <h4 id="audioAPI"><span class="type-signature">&lt;readonly> </span>audioAPI<span class="type-signature"> :string</span></h4>
1125
1126
1127</dt>
1128<dd>
1129
1130 <div class="description">
1131 <p>Defines the Audio API used for this audio file. Audio API support will depend on the current client being used. All possible ones are defined in <a href="CB_Configuration.CrossBase.html#.CB_AudioFileCache_PREFERRED_AUDIO_APIS"><code>CB_Configuration.CrossBase.CB_AudioFileCache_PREFERRED_AUDIO_APIS</code></a>. For example: &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
1132 </div>
1133
1134
1135
1136 <h5>Type:</h5>
1137 <ul>
1138 <li>
1139
1140<span class="param-type">string</span>
1141
1142
1143
1144 </li>
1145 </ul>
1146
1147
1148
1149<dl class="details">
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1180 <dd class="tag-source">
1181 <ul class="dummy">
1182 <li>
1183 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1184 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-91">line 91</a>
1185 </li>
1186 </ul>
1187 </dd>
1188
1189
1190
1191
1192
1193
1194
1195</dl>
1196
1197
1198
1199</dd>
1200
1201
1202
1203<hr>
1204<dt class="name" id="audioFileObject">
1205 <h4 id="audioFileObject"><span class="type-signature"></span>audioFileObject<span class="type-signature"> :<a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a>|<a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a>|<a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a>|<a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a>|Object</span></h4>
1206
1207
1208</dt>
1209<dd>
1210
1211 <div class="description">
1212 <p>It will store the current audio file object for the current audio API. The <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method will set the value of this property only after the audio file object (stored in its value) is loaded properly. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>). When no audio API object is being set, it will contain a fake object with same methods and properties (defined in <code>CB_AudioFile._audioFileObject_prototype</code>). Recommended for internal usage only.</p>
1213 </div>
1214
1215
1216
1217 <h5>Type:</h5>
1218 <ul>
1219 <li>
1220
1221<span class="param-type"><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></span>
1222|
1223
1224<span class="param-type"><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></span>
1225|
1226
1227<span class="param-type"><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></span>
1228|
1229
1230<span class="param-type"><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></span>
1231|
1232
1233<span class="param-type">Object</span>
1234
1235
1236
1237 </li>
1238 </ul>
1239
1240
1241
1242<dl class="details">
1243
1244
1245
1246
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 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1273 <dd class="tag-source">
1274 <ul class="dummy">
1275 <li>
1276 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1277 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-162">line 162</a>
1278 </li>
1279 </ul>
1280 </dd>
1281
1282
1283
1284
1285
1286
1287
1288</dl>
1289
1290
1291
1292</dd>
1293
1294
1295
1296<hr>
1297<dt class="name" id="audioFileObjectLast">
1298 <h4 id="audioFileObjectLast"><span class="type-signature"></span>audioFileObjectLast<span class="type-signature"> :<a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a>|<a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a>|<a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a>|<a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a>|Object</span></h4>
1299
1300
1301</dt>
1302<dd>
1303
1304 <div class="description">
1305 <p>Stores the last audio file object created or reused, for the current API being used. The <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method will set the value of this property before knowing whether the audio file object (stored in its value) will be loaded properly or not. Used by the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> and <a href="CB_AudioFile.html#getProgress"><code>CB_AudioFile#getProgress</code></a> methods. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>). When no audio API object is being set, it will contain a fake object with same methods and properties (defined in <code>CB_AudioFile._audioFileObject_prototype</code>). Recommended for internal usage only.</p>
1306 </div>
1307
1308
1309
1310 <h5>Type:</h5>
1311 <ul>
1312 <li>
1313
1314<span class="param-type"><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></span>
1315|
1316
1317<span class="param-type"><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></span>
1318|
1319
1320<span class="param-type"><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></span>
1321|
1322
1323<span class="param-type"><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></span>
1324|
1325
1326<span class="param-type">Object</span>
1327
1328
1329
1330 </li>
1331 </ul>
1332
1333
1334
1335<dl class="details">
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1366 <dd class="tag-source">
1367 <ul class="dummy">
1368 <li>
1369 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1370 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-170">line 170</a>
1371 </li>
1372 </ul>
1373 </dd>
1374
1375
1376
1377
1378
1379
1380
1381</dl>
1382
1383
1384
1385</dd>
1386
1387
1388
1389<hr>
1390<dt class="name" id="audioFileObjects">
1391 <h4 id="audioFileObjects"><span class="type-signature"></span>audioFileObjects<span class="type-signature"> :Object</span></h4>
1392
1393
1394</dt>
1395<dd>
1396
1397 <div class="description">
1398 <p>It will store the created audio file objects for the different audio APIs (for optimization purposes, to avoid creating more than one per API). Being each index the name of the audio API (&quot;WAAPI&quot;, &quot;AAPI&quot;, &quot;SM2&quot; or &quot;ACMP&quot;), their value will be an object which can be <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>). Recommended for internal usage only.</p>
1399 </div>
1400
1401
1402
1403 <h5>Type:</h5>
1404 <ul>
1405 <li>
1406
1407<span class="param-type">Object</span>
1408
1409
1410
1411 </li>
1412 </ul>
1413
1414
1415
1416<dl class="details">
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1443 <dd class="tag-default">
1444 <ul class="dummy">
1445 <li>{}</li>
1446 </ul>
1447 </dd>
1448
1449
1450
1451
1452
1453 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1454 <dd class="tag-source">
1455 <ul class="dummy">
1456 <li>
1457 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1458 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-153">line 153</a>
1459 </li>
1460 </ul>
1461 </dd>
1462
1463
1464
1465
1466
1467
1468
1469</dl>
1470
1471
1472
1473</dd>
1474
1475
1476
1477<hr>
1478<dt class="name" id="DEFAULT_OPTIONS">
1479 <h4 id="DEFAULT_OPTIONS"><span class="type-signature">&lt;constant> </span>DEFAULT_OPTIONS<span class="type-signature"> :<a href="CB_AudioFile.html#.OPTIONS">CB_AudioFile.OPTIONS</a></span></h4>
1480
1481
1482</dt>
1483<dd>
1484
1485 <div class="description">
1486 <p>Keeps the default options when an object is created. Format: { autoLoad: boolean, autoPlay: boolean, loop: boolean, volume: number }.</p>
1487 </div>
1488
1489
1490
1491 <h5>Type:</h5>
1492 <ul>
1493 <li>
1494
1495<span class="param-type"><a href="CB_AudioFile.html#.OPTIONS">CB_AudioFile.OPTIONS</a></span>
1496
1497
1498
1499 </li>
1500 </ul>
1501
1502
1503
1504<dl class="details">
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1531 <dd class="tag-default">
1532 <ul class="dummy">
1533 <li>{ autoLoad: true, autoPlay: false, loop: false, volume: <a href="CB_AudioFile.html#DEFAULT_VOLUME"><code>CB_AudioFile.prototype.DEFAULT_VOLUME</code></a> }</li>
1534 </ul>
1535 </dd>
1536
1537
1538
1539
1540
1541 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1542 <dd class="tag-source">
1543 <ul class="dummy">
1544 <li>
1545 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1546 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-44">line 44</a>
1547 </li>
1548 </ul>
1549 </dd>
1550
1551
1552
1553
1554
1555
1556
1557</dl>
1558
1559
1560
1561</dd>
1562
1563
1564
1565<hr>
1566<dt class="name" id="DEFAULT_VOLUME">
1567 <h4 id="DEFAULT_VOLUME"><span class="type-signature">&lt;constant> </span>DEFAULT_VOLUME<span class="type-signature"> :number</span></h4>
1568
1569
1570</dt>
1571<dd>
1572
1573 <div class="description">
1574 <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>
1575 </div>
1576
1577
1578
1579 <h5>Type:</h5>
1580 <ul>
1581 <li>
1582
1583<span class="param-type">number</span>
1584
1585
1586
1587 </li>
1588 </ul>
1589
1590
1591
1592<dl class="details">
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1619 <dd class="tag-default">
1620 <ul class="dummy">
1621 <li>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_USE_SPEAKER_VOLUME_AS_DEFAULT ? CB_Speaker.getVolume() : CB_Configuration.CrossBase.CB_Speaker_DEFAULT_VOLUME</li>
1622 </ul>
1623 </dd>
1624
1625
1626
1627
1628
1629 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1630 <dd class="tag-source">
1631 <ul class="dummy">
1632 <li>
1633 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1634 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-36">line 36</a>
1635 </li>
1636 </ul>
1637 </dd>
1638
1639
1640
1641
1642
1643
1644
1645</dl>
1646
1647
1648
1649</dd>
1650
1651
1652
1653<hr>
1654<dt class="name" id="filePath">
1655 <h4 id="filePath"><span class="type-signature">&lt;readonly> </span>filePath<span class="type-signature"> :string</span></h4>
1656
1657
1658</dt>
1659<dd>
1660
1661 <div class="description">
1662 <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>
1663 </div>
1664
1665
1666
1667 <h5>Type:</h5>
1668 <ul>
1669 <li>
1670
1671<span class="param-type">string</span>
1672
1673
1674
1675 </li>
1676 </ul>
1677
1678
1679
1680<dl class="details">
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1711 <dd class="tag-source">
1712 <ul class="dummy">
1713 <li>
1714 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1715 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-82">line 82</a>
1716 </li>
1717 </ul>
1718 </dd>
1719
1720
1721
1722
1723
1724
1725
1726</dl>
1727
1728
1729
1730</dd>
1731
1732
1733
1734<hr>
1735<dt class="name" id="id">
1736 <h4 id="id"><span class="type-signature">&lt;readonly> </span>id<span class="type-signature"> :string</span></h4>
1737
1738
1739</dt>
1740<dd>
1741
1742 <div class="description">
1743 <p>Stores the identifier for the audio file.</p>
1744 </div>
1745
1746
1747
1748 <h5>Type:</h5>
1749 <ul>
1750 <li>
1751
1752<span class="param-type">string</span>
1753
1754
1755
1756 </li>
1757 </ul>
1758
1759
1760
1761<dl class="details">
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1788 <dd class="tag-default">
1789 <ul class="dummy">
1790 <li>'CB_AudioFile_' + CB_AudioFile._idUnique++</li>
1791 </ul>
1792 </dd>
1793
1794
1795
1796
1797
1798 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1799 <dd class="tag-source">
1800 <ul class="dummy">
1801 <li>
1802 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1803 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-73">line 73</a>
1804 </li>
1805 </ul>
1806 </dd>
1807
1808
1809
1810
1811
1812
1813
1814</dl>
1815
1816
1817
1818</dd>
1819
1820
1821
1822<hr>
1823<dt class="name" id="loop">
1824 <h4 id="loop"><span class="type-signature">&lt;readonly> </span>loop<span class="type-signature"> :boolean</span></h4>
1825
1826
1827</dt>
1828<dd>
1829
1830 <div class="description">
1831 <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.html#play"><code>CB_AudioFile#play</code></a> method is called, getting the value from the &quot;loop&quot; parameter (but only if contains a boolean).</p>
1832 </div>
1833
1834
1835
1836 <h5>Type:</h5>
1837 <ul>
1838 <li>
1839
1840<span class="param-type">boolean</span>
1841
1842
1843
1844 </li>
1845 </ul>
1846
1847
1848
1849<dl class="details">
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1876 <dd class="tag-default">
1877 <ul class="dummy">
1878 <li><a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile.prototype.DEFAULT_OPTIONS</code></a>.loop</li>
1879 </ul>
1880 </dd>
1881
1882
1883
1884
1885
1886 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1887 <dd class="tag-source">
1888 <ul class="dummy">
1889 <li>
1890 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1891 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-55">line 55</a>
1892 </li>
1893 </ul>
1894 </dd>
1895
1896
1897
1898
1899
1900
1901
1902</dl>
1903
1904
1905
1906</dd>
1907
1908
1909
1910<hr>
1911<dt class="name" id="volume">
1912 <h4 id="volume"><span class="type-signature">&lt;readonly> </span>volume<span class="type-signature"> :number</span></h4>
1913
1914
1915</dt>
1916<dd>
1917
1918 <div class="description">
1919 <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>
1920 </div>
1921
1922
1923
1924 <h5>Type:</h5>
1925 <ul>
1926 <li>
1927
1928<span class="param-type">number</span>
1929
1930
1931
1932 </li>
1933 </ul>
1934
1935
1936
1937<dl class="details">
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963 <dt class="tag-default method-doc-label method-doc-details-label">Default Value:</dt>
1964 <dd class="tag-default">
1965 <ul class="dummy">
1966 <li><a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile.prototype.DEFAULT_OPTIONS</code></a>.volume</li>
1967 </ul>
1968 </dd>
1969
1970
1971
1972
1973
1974 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
1975 <dd class="tag-source">
1976 <ul class="dummy">
1977 <li>
1978 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
1979 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-64">line 64</a>
1980 </li>
1981 </ul>
1982 </dd>
1983
1984
1985
1986
1987
1988
1989
1990</dl>
1991
1992
1993
1994</dd>
1995
1996 </dl>
1997
1998
1999
2000 <h3 class="subsection-title">Methods</h3>
2001
2002 <dl>
2003
2004<hr>
2005<dt>
2006 <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>
2007
2008
2009</dt>
2010<dd>
2011
2012
2013 <div class="description">
2014 <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 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.html#play"><code>CB_AudioFile#play</code></a> method the first time. Internally, uses the &quot;checkPlaying&quot; method of the used audio API object. The checking action will only be performed if the value of the &quot;status&quot; property of the used audio API object 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 &quot;status&quot; property of the used audio API 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 &quot;status&quot; property of the used audio API object will get the value of {CB_AudioFile.FAILED}. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
2015 </div>
2016
2017
2018
2019
2020
2021
2022
2023
2024 <h5>Parameters:</h5>
2025
2026
2027<table class="params table table-striped">
2028 <thead>
2029 <tr>
2030
2031 <th style="width:12%; min-width:110px;">Name</th>
2032
2033
2034 <th style="width:12%; min-width:110px;">Type</th>
2035
2036
2037 <th style="width:12%; min-width:110px;">Argument</th>
2038
2039
2040
2041 <th style="width:12%; min-width:110px;">Default</th>
2042
2043
2044 <th class="last" style="min-width:310px;">Description</th>
2045 </tr>
2046 </thead>
2047
2048 <tbody>
2049
2050
2051 <tr>
2052
2053 <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>
2054
2055
2056 <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;">
2057
2058
2059<span class="param-type">function</span>
2060
2061
2062
2063
2064 </td>
2065
2066
2067 <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;">
2068
2069 &lt;optional><br>
2070
2071
2072
2073
2074
2075 </td>
2076
2077
2078
2079 <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;">
2080
2081 </td>
2082
2083
2084 <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 checked successfully, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object itself.</p></td>
2085 </tr>
2086
2087
2088
2089 <tr>
2090
2091 <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>
2092
2093
2094 <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;">
2095
2096
2097<span class="param-type">function</span>
2098
2099
2100
2101
2102 </td>
2103
2104
2105 <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;">
2106
2107 &lt;optional><br>
2108
2109
2110
2111
2112
2113 </td>
2114
2115
2116
2117 <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;">
2118
2119 </td>
2120
2121
2122 <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 checked successfully. The first and unique parameter will be a string describing the error found (if it could be determined), being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object itself.</p></td>
2123 </tr>
2124
2125
2126
2127 <tr>
2128
2129 <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>ignoreStatus</code></td>
2130
2131
2132 <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;">
2133
2134
2135<span class="param-type">boolean</span>
2136
2137
2138
2139
2140 </td>
2141
2142
2143 <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;">
2144
2145 &lt;optional><br>
2146
2147
2148
2149
2150
2151 </td>
2152
2153
2154
2155 <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;">
2156
2157 false
2158
2159 </td>
2160
2161
2162 <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>If set to false and the audio status is neither &quot;UNCHECKED&quot; nor &quot;CHECKING&quot;, it will fail calling the &quot;callbackError&quot; function (if any). If set to true, it will try to perform the checking action regardless the status of the audio.</p></td>
2163 </tr>
2164
2165
2166
2167 <tr>
2168
2169 <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>ignoreQueue</code></td>
2170
2171
2172 <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;">
2173
2174
2175<span class="param-type">boolean</span>
2176
2177
2178
2179
2180 </td>
2181
2182
2183 <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;">
2184
2185 &lt;optional><br>
2186
2187
2188
2189
2190
2191 </td>
2192
2193
2194
2195 <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;">
2196
2197 false
2198
2199 </td>
2200
2201
2202 <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>If set to false and there is already the maximum number of audio files being checked (defined internally, depending on the audio API), the function will exit and it will call itself automatically again and again until the checking process can be performed (when its queue turn has been reached). This is done for performance purposes. Some audio APIs will ignore this parameter as they do not use checking queues.</p></td>
2203 </tr>
2204
2205
2206
2207 <tr>
2208
2209 <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>useCache</code></td>
2210
2211
2212 <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;">
2213
2214
2215<span class="param-type">boolean</span>
2216
2217
2218
2219
2220 </td>
2221
2222
2223 <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;">
2224
2225 &lt;optional><br>
2226
2227
2228
2229
2230
2231 </td>
2232
2233
2234
2235 <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;">
2236
2237 false
2238
2239 </td>
2240
2241
2242 <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>If set to true (not recommended) and the same audio file was checked previously, it will not perform the checking process again and it will do the same as the previous call. Some audio APIs will ignore this parameter as they do not use cache.</p></td>
2243 </tr>
2244
2245
2246 </tbody>
2247</table>
2248
2249
2250
2251
2252<dl class="details">
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2283 <dd class="tag-source">
2284 <ul class="dummy">
2285 <li>
2286 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
2287 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-576">line 576</a>
2288 </li>
2289 </ul>
2290 </dd>
2291
2292
2293
2294
2295
2296
2297
2298</dl>
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312 <h5>Returns:</h5>
2313
2314
2315<div class="param-desc">
2316 <p>Returns false if the checking could not be performed and failed. If it returns true, it can mean either the checking has been processed successfully or it will fail in the future, so it is recommended to ignore the returning value and use the callback functions instead.</p>
2317</div>
2318
2319
2320
2321<dl>
2322 <dt>
2323 Type
2324 </dt>
2325 <dd>
2326
2327<span class="param-type">boolean</span>
2328
2329
2330
2331 </dd>
2332</dl>
2333
2334
2335
2336
2337
2338</dd>
2339
2340
2341
2342<hr>
2343<dt>
2344 <h4 class="name" id="destructor"><span class="type-signature"></span>destructor<span class="signature">( [stopSound] [, keepStoppedUnaltered] [, avoidOnStop] [, forceOnStop])</span><span class="type-signature"></span></h4>
2345
2346
2347</dt>
2348<dd>
2349
2350
2351 <div class="description">
2352 <p>Destroys the audio file object and frees memory. Sets its current status to ABORTED (<a href="CB_AudioFile.html#.ABORTED"><code>CB_AudioFile.ABORTED</code></a> value).</p>
2353 </div>
2354
2355
2356
2357
2358
2359
2360
2361
2362 <h5>Parameters:</h5>
2363
2364
2365<table class="params table table-striped">
2366 <thead>
2367 <tr>
2368
2369 <th style="width:12%; min-width:110px;">Name</th>
2370
2371
2372 <th style="width:12%; min-width:110px;">Type</th>
2373
2374
2375 <th style="width:12%; min-width:110px;">Argument</th>
2376
2377
2378
2379 <th style="width:12%; min-width:110px;">Default</th>
2380
2381
2382 <th class="last" style="min-width:310px;">Description</th>
2383 </tr>
2384 </thead>
2385
2386 <tbody>
2387
2388
2389 <tr>
2390
2391 <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>stopSound</code></td>
2392
2393
2394 <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;">
2395
2396
2397<span class="param-type">boolean</span>
2398
2399
2400
2401
2402 </td>
2403
2404
2405 <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;">
2406
2407 &lt;optional><br>
2408
2409
2410
2411
2412
2413 </td>
2414
2415
2416
2417 <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;">
2418
2419 false
2420
2421 </td>
2422
2423
2424 <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>If set to true, it will also call the &quot;stop&quot; method of the internal audio file object for the current API (stored in the <a href="CB_AudioFile.html#audioFileObject"><code>CB_AudioFile#audioFileObject</code></a> property). This method has the same parameters as the <a href="CB_AudioFile.html#stop"><code>CB_AudioFile#stop</code></a> method.</p></td>
2425 </tr>
2426
2427
2428
2429 <tr>
2430
2431 <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>keepStoppedUnaltered</code></td>
2432
2433
2434 <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;">
2435
2436
2437<span class="param-type">boolean</span>
2438
2439
2440
2441
2442 </td>
2443
2444
2445 <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;">
2446
2447 &lt;optional><br>
2448
2449
2450
2451
2452
2453 </td>
2454
2455
2456
2457 <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;">
2458
2459 false
2460
2461 </td>
2462
2463
2464 <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>Used internally as the &quot;keepStoppedUnaltered&quot; parameter to call the &quot;stop&quot; method of the internal audio file object for the current API (stored in the <a href="CB_AudioFile.html#audioFileObject"><code>CB_AudioFile#audioFileObject</code></a> property). This method has the same parameters as the <a href="CB_AudioFile.html#stop"><code>CB_AudioFile#stop</code></a> method. If the &quot;stopSound&quot; parameter is not set to true, this parameter will be ignored as the &quot;stop&quot; method will not be called.</p></td>
2465 </tr>
2466
2467
2468
2469 <tr>
2470
2471 <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>avoidOnStop</code></td>
2472
2473
2474 <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;">
2475
2476
2477<span class="param-type">boolean</span>
2478
2479
2480
2481
2482 </td>
2483
2484
2485 <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;">
2486
2487 &lt;optional><br>
2488
2489
2490
2491
2492
2493 </td>
2494
2495
2496
2497 <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;">
2498
2499 false
2500
2501 </td>
2502
2503
2504 <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>Used internally as the &quot;avoidOnStop&quot; parameter to call the &quot;stop&quot; method of the internal audio file object for the current API (stored in the <a href="CB_AudioFile.html#audioFileObject"><code>CB_AudioFile#audioFileObject</code></a> property). This method has the same parameters as the <a href="CB_AudioFile.html#stop"><code>CB_AudioFile#stop</code></a> method. If the &quot;stopSound&quot; parameter is not set to true, this parameter will be ignored as the &quot;stop&quot; method will not be called.</p></td>
2505 </tr>
2506
2507
2508
2509 <tr>
2510
2511 <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>forceOnStop</code></td>
2512
2513
2514 <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;">
2515
2516
2517<span class="param-type">boolean</span>
2518
2519
2520
2521
2522 </td>
2523
2524
2525 <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;">
2526
2527 &lt;optional><br>
2528
2529
2530
2531
2532
2533 </td>
2534
2535
2536
2537 <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;">
2538
2539 false
2540
2541 </td>
2542
2543
2544 <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>Used internally as the &quot;forceOnStop&quot; parameter to call the &quot;stop&quot; method of the internal audio file object for the current API (stored in the <a href="CB_AudioFile.html#audioFileObject"><code>CB_AudioFile#audioFileObject</code></a> property). This method has the same parameters as the <a href="CB_AudioFile.html#stop"><code>CB_AudioFile#stop</code></a> method. If the &quot;stopSound&quot; parameter is not set to true, this parameter will be ignored as the &quot;stop&quot; method will not be called.</p></td>
2545 </tr>
2546
2547
2548 </tbody>
2549</table>
2550
2551
2552
2553
2554<dl class="details">
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2585 <dd class="tag-source">
2586 <ul class="dummy">
2587 <li>
2588 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
2589 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-300">line 300</a>
2590 </li>
2591 </ul>
2592 </dd>
2593
2594
2595
2596
2597
2598
2599
2600</dl>
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616</dd>
2617
2618
2619
2620<hr>
2621<dt>
2622 <h4 class="name" id="getCurrentTime"><span class="type-signature"></span>getCurrentTime<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2623
2624
2625</dt>
2626<dd>
2627
2628
2629 <div class="description">
2630 <p>Gets the current time (in milliseconds) which belongs to the position where the audio is currently playing or where it has been paused. Note that some audio APIs and clients could give wrong values. Internally, uses the &quot;getCurrentTime&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
2631 </div>
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642<dl class="details">
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2673 <dd class="tag-source">
2674 <ul class="dummy">
2675 <li>
2676 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
2677 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-789">line 789</a>
2678 </li>
2679 </ul>
2680 </dd>
2681
2682
2683
2684
2685
2686
2687
2688</dl>
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702 <h5>Returns:</h5>
2703
2704
2705<div class="param-desc">
2706 <p>Returns the current time (in milliseconds). Note that some audio APIs and clients could give wrong values.</p>
2707</div>
2708
2709
2710
2711<dl>
2712 <dt>
2713 Type
2714 </dt>
2715 <dd>
2716
2717<span class="param-type">number</span>
2718
2719
2720
2721 </dd>
2722</dl>
2723
2724
2725
2726
2727
2728</dd>
2729
2730
2731
2732<hr>
2733<dt>
2734 <h4 class="name" id="getDuration"><span class="type-signature"></span>getDuration<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2735
2736
2737</dt>
2738<dd>
2739
2740
2741 <div class="description">
2742 <p>Tells the duration of the audio (in milliseconds). Note that some clients might not calculate the duration correctly and, in this case, a zero (0) value would be returned. Internally, uses the &quot;getDuration&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
2743 </div>
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754<dl class="details">
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2785 <dd class="tag-source">
2786 <ul class="dummy">
2787 <li>
2788 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
2789 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-595">line 595</a>
2790 </li>
2791 </ul>
2792 </dd>
2793
2794
2795
2796
2797
2798
2799
2800</dl>
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814 <h5>Returns:</h5>
2815
2816
2817<div class="param-desc">
2818 <p>Returns the duration of the audio (in milliseconds). Note that some clients might not calculate the duration correctly and, in this case, a zero (0) value would be returned.</p>
2819</div>
2820
2821
2822
2823<dl>
2824 <dt>
2825 Type
2826 </dt>
2827 <dd>
2828
2829<span class="param-type">number</span>
2830
2831
2832
2833 </dd>
2834</dl>
2835
2836
2837
2838
2839
2840</dd>
2841
2842
2843
2844<hr>
2845<dt>
2846 <h4 class="name" id="getProgress"><span class="type-signature"></span>getProgress<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
2847
2848
2849</dt>
2850<dd>
2851
2852
2853 <div class="description">
2854 <p>Returns a number representing the percentage of the loading progress for the audio file (from 0 to 100, being 100 a complete loading progress). The way to calculate it internally may differ from one audio API to another and it is not totally reliable. Internally, uses the &quot;getProgress&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
2855 </div>
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866<dl class="details">
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
2897 <dd class="tag-source">
2898 <ul class="dummy">
2899 <li>
2900 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
2901 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-945">line 945</a>
2902 </li>
2903 </ul>
2904 </dd>
2905
2906
2907
2908
2909
2910
2911
2912</dl>
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926 <h5>Returns:</h5>
2927
2928
2929<div class="param-desc">
2930 <p>Returns a number representing the percentage of the loading progress for the audio file (from 0 to 100, being 100 a complete loading progress). The way to calculate it internally may differ from one audio API to another and it is not totally reliable.</p>
2931</div>
2932
2933
2934
2935<dl>
2936 <dt>
2937 Type
2938 </dt>
2939 <dd>
2940
2941<span class="param-type">number</span>
2942
2943
2944
2945 </dd>
2946</dl>
2947
2948
2949
2950
2951
2952</dd>
2953
2954
2955
2956<hr>
2957<dt>
2958 <h4 class="name" id="getStartAt"><span class="type-signature"></span>getStartAt<span class="signature">( [numeric])</span><span class="type-signature"> &rarr; {number|*}</span></h4>
2959
2960
2961</dt>
2962<dd>
2963
2964
2965 <div class="description">
2966 <p>Tells the last &quot;startAt&quot; parameter value used by the <a href="CB_AudioFile.html#play"><code>CB_AudioFile#play</code></a> or the <a href="CB_AudioFile.html#resume"><code>CB_AudioFile#resume</code></a> method (or used by the equivalents methods of the same name from the used audio API object). Internally, uses the &quot;lastStartAt&quot; property of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
2967 </div>
2968
2969
2970
2971
2972
2973
2974
2975
2976 <h5>Parameters:</h5>
2977
2978
2979<table class="params table table-striped">
2980 <thead>
2981 <tr>
2982
2983 <th style="width:12%; min-width:110px;">Name</th>
2984
2985
2986 <th style="width:12%; min-width:110px;">Type</th>
2987
2988
2989 <th style="width:12%; min-width:110px;">Argument</th>
2990
2991
2992
2993 <th style="width:12%; min-width:110px;">Default</th>
2994
2995
2996 <th class="last" style="min-width:310px;">Description</th>
2997 </tr>
2998 </thead>
2999
3000 <tbody>
3001
3002
3003 <tr>
3004
3005 <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>numeric</code></td>
3006
3007
3008 <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;">
3009
3010
3011<span class="param-type">boolean</span>
3012
3013
3014
3015
3016 </td>
3017
3018
3019 <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;">
3020
3021 &lt;optional><br>
3022
3023
3024
3025
3026
3027 </td>
3028
3029
3030
3031 <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;">
3032
3033 false
3034
3035 </td>
3036
3037
3038 <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>If set to true, it will sanitize the returning value by returning zero instead of undefined, null or any other non-numeric value.</p></td>
3039 </tr>
3040
3041
3042 </tbody>
3043</table>
3044
3045
3046
3047
3048<dl class="details">
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3079 <dd class="tag-source">
3080 <ul class="dummy">
3081 <li>
3082 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3083 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-916">line 916</a>
3084 </li>
3085 </ul>
3086 </dd>
3087
3088
3089
3090
3091
3092
3093
3094</dl>
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108 <h5>Returns:</h5>
3109
3110
3111<div class="param-desc">
3112 <p>Returns the last &quot;startAt&quot; value used by the <a href="CB_AudioFile.html#play"><code>CB_AudioFile#play</code></a> or the <a href="CB_AudioFile.html#resume"><code>CB_AudioFile#resume</code></a> method (or used by the equivalents methods of the same name from the used audio API object). If we want it to be numeric always, the &quot;numeric&quot; parameter should be set to true.</p>
3113</div>
3114
3115
3116
3117<dl>
3118 <dt>
3119 Type
3120 </dt>
3121 <dd>
3122
3123<span class="param-type">number</span>
3124|
3125
3126<span class="param-type">*</span>
3127
3128
3129
3130 </dd>
3131</dl>
3132
3133
3134
3135
3136
3137</dd>
3138
3139
3140
3141<hr>
3142<dt>
3143 <h4 class="name" id="getStatus"><span class="type-signature"></span>getStatus<span class="signature">( [realStatus])</span><span class="type-signature"> &rarr; {number}</span></h4>
3144
3145
3146</dt>
3147<dd>
3148
3149
3150 <div class="description">
3151 <p>Gets the current status of the audio file.</p>
3152 </div>
3153
3154
3155
3156
3157
3158
3159
3160
3161 <h5>Parameters:</h5>
3162
3163
3164<table class="params table table-striped">
3165 <thead>
3166 <tr>
3167
3168 <th style="width:12%; min-width:110px;">Name</th>
3169
3170
3171 <th style="width:12%; min-width:110px;">Type</th>
3172
3173
3174 <th style="width:12%; min-width:110px;">Argument</th>
3175
3176
3177
3178 <th style="width:12%; min-width:110px;">Default</th>
3179
3180
3181 <th class="last" style="min-width:310px;">Description</th>
3182 </tr>
3183 </thead>
3184
3185 <tbody>
3186
3187
3188 <tr>
3189
3190 <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>realStatus</code></td>
3191
3192
3193 <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;">
3194
3195
3196<span class="param-type">boolean</span>
3197
3198
3199
3200
3201 </td>
3202
3203
3204 <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;">
3205
3206 &lt;optional><br>
3207
3208
3209
3210
3211
3212 </td>
3213
3214
3215
3216 <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;">
3217
3218 false
3219
3220 </td>
3221
3222
3223 <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>If set to true, it will return the &quot;status&quot; property of the used audio API object instead of the &quot;status&quot; property of the current CB_AudioFile object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
3224 </tr>
3225
3226
3227 </tbody>
3228</table>
3229
3230
3231
3232
3233<dl class="details">
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3264 <dd class="tag-source">
3265 <ul class="dummy">
3266 <li>
3267 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3268 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-801">line 801</a>
3269 </li>
3270 </ul>
3271 </dd>
3272
3273
3274
3275
3276
3277
3278
3279</dl>
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293 <h5>Returns:</h5>
3294
3295
3296<div class="param-desc">
3297 <p>Returns the current status of the audio file. It is a number, which should match the value of the CB_AudioFile.UNLOADED (still unloaded), CB_AudioFile.LOADING (loading), CB_AudioFile.UNCHECKED (not checked by calling the &quot;checkPlaying&quot; method yet), CB_AudioFile.CHECKING (being checked by the &quot;checkPlaying&quot; method), CB_AudioFile.LOADED (loaded), CB_AudioFile.FAILED (failed loading or failed to play or by any other reason) or CB_AudioFile.ABORTED (aborted because it was destroyed with the &quot;destructor&quot; method) property.</p>
3298</div>
3299
3300
3301
3302<dl>
3303 <dt>
3304 Type
3305 </dt>
3306 <dd>
3307
3308<span class="param-type">number</span>
3309
3310
3311
3312 </dd>
3313</dl>
3314
3315
3316
3317
3318
3319</dd>
3320
3321
3322
3323<hr>
3324<dt>
3325 <h4 class="name" id="getStatusString"><span class="type-signature"></span>getStatusString<span class="signature">( [realStatus])</span><span class="type-signature"> &rarr; {string}</span></h4>
3326
3327
3328</dt>
3329<dd>
3330
3331
3332 <div class="description">
3333 <p>Gets the current status of the audio file, as a string.</p>
3334 </div>
3335
3336
3337
3338
3339
3340
3341
3342
3343 <h5>Parameters:</h5>
3344
3345
3346<table class="params table table-striped">
3347 <thead>
3348 <tr>
3349
3350 <th style="width:12%; min-width:110px;">Name</th>
3351
3352
3353 <th style="width:12%; min-width:110px;">Type</th>
3354
3355
3356 <th style="width:12%; min-width:110px;">Argument</th>
3357
3358
3359
3360 <th style="width:12%; min-width:110px;">Default</th>
3361
3362
3363 <th class="last" style="min-width:310px;">Description</th>
3364 </tr>
3365 </thead>
3366
3367 <tbody>
3368
3369
3370 <tr>
3371
3372 <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>realStatus</code></td>
3373
3374
3375 <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;">
3376
3377
3378<span class="param-type">boolean</span>
3379
3380
3381
3382
3383 </td>
3384
3385
3386 <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;">
3387
3388 &lt;optional><br>
3389
3390
3391
3392
3393
3394 </td>
3395
3396
3397
3398 <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;">
3399
3400 false
3401
3402 </td>
3403
3404
3405 <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>If set to true, it will have in mind the &quot;status&quot; property of the used audio API object instead of the &quot;status&quot; property of the current CB_AudioFile object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
3406 </tr>
3407
3408
3409 </tbody>
3410</table>
3411
3412
3413
3414
3415<dl class="details">
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3446 <dd class="tag-source">
3447 <ul class="dummy">
3448 <li>
3449 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3450 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-814">line 814</a>
3451 </li>
3452 </ul>
3453 </dd>
3454
3455
3456
3457
3458
3459
3460
3461</dl>
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475 <h5>Returns:</h5>
3476
3477
3478<div class="param-desc">
3479 <p>Returns the current status of the audio file, as a string. Possible return values are &quot;UNLOADED&quot;, &quot;LOADING&quot;, &quot;UNCHECKED&quot;, &quot;CHECKING&quot;, &quot;LOADED&quot;, &quot;FAILED&quot;, &quot;ABORTED&quot; or &quot;UNKNOWN (UNKNOWN_STATUS)&quot; (where &quot;UNKNOWN_STATUS&quot; will be a value from the &quot;status&quot; property not recognized as any possible status).</p>
3480</div>
3481
3482
3483
3484<dl>
3485 <dt>
3486 Type
3487 </dt>
3488 <dd>
3489
3490<span class="param-type">string</span>
3491
3492
3493
3494 </dd>
3495</dl>
3496
3497
3498
3499
3500
3501</dd>
3502
3503
3504
3505<hr>
3506<dt>
3507 <h4 class="name" id="getStopAt"><span class="type-signature"></span>getStopAt<span class="signature">( [numeric])</span><span class="type-signature"> &rarr; {number|*}</span></h4>
3508
3509
3510</dt>
3511<dd>
3512
3513
3514 <div class="description">
3515 <p>Tells the last &quot;stopAt&quot; parameter value used by the <a href="CB_AudioFile.html#play"><code>CB_AudioFile#play</code></a> or the <a href="CB_AudioFile.html#resume"><code>CB_AudioFile#resume</code></a> method (or used by the equivalents methods of the same name from the used audio API object). Internally, uses the &quot;lastStopAt&quot; property of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
3516 </div>
3517
3518
3519
3520
3521
3522
3523
3524
3525 <h5>Parameters:</h5>
3526
3527
3528<table class="params table table-striped">
3529 <thead>
3530 <tr>
3531
3532 <th style="width:12%; min-width:110px;">Name</th>
3533
3534
3535 <th style="width:12%; min-width:110px;">Type</th>
3536
3537
3538 <th style="width:12%; min-width:110px;">Argument</th>
3539
3540
3541
3542 <th style="width:12%; min-width:110px;">Default</th>
3543
3544
3545 <th class="last" style="min-width:310px;">Description</th>
3546 </tr>
3547 </thead>
3548
3549 <tbody>
3550
3551
3552 <tr>
3553
3554 <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>numeric</code></td>
3555
3556
3557 <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;">
3558
3559
3560<span class="param-type">boolean</span>
3561
3562
3563
3564
3565 </td>
3566
3567
3568 <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;">
3569
3570 &lt;optional><br>
3571
3572
3573
3574
3575
3576 </td>
3577
3578
3579
3580 <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;">
3581
3582 false
3583
3584 </td>
3585
3586
3587 <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>If set to true, it will sanitize the returning value by returning zero instead of undefined, null or any other non-numeric value.</p></td>
3588 </tr>
3589
3590
3591 </tbody>
3592</table>
3593
3594
3595
3596
3597<dl class="details">
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3628 <dd class="tag-source">
3629 <ul class="dummy">
3630 <li>
3631 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3632 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-931">line 931</a>
3633 </li>
3634 </ul>
3635 </dd>
3636
3637
3638
3639
3640
3641
3642
3643</dl>
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657 <h5>Returns:</h5>
3658
3659
3660<div class="param-desc">
3661 <p>Returns the last &quot;stopAt&quot; value used by the <a href="CB_AudioFile.html#play"><code>CB_AudioFile#play</code></a> or the <a href="CB_AudioFile.html#resume"><code>CB_AudioFile#resume</code></a> method (or used by the equivalents methods of the same name from the used audio API object). If we want it to be numeric always, the &quot;numeric&quot; parameter should be set to true.</p>
3662</div>
3663
3664
3665
3666<dl>
3667 <dt>
3668 Type
3669 </dt>
3670 <dd>
3671
3672<span class="param-type">number</span>
3673|
3674
3675<span class="param-type">*</span>
3676
3677
3678
3679 </dd>
3680</dl>
3681
3682
3683
3684
3685
3686</dd>
3687
3688
3689
3690<hr>
3691<dt>
3692 <h4 class="name" id="getVolume"><span class="type-signature"></span>getVolume<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
3693
3694
3695</dt>
3696<dd>
3697
3698
3699 <div class="description">
3700 <p>Returns the current volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise). Internally, uses the &quot;volume&quot; property of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
3701 </div>
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712<dl class="details">
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3743 <dd class="tag-source">
3744 <ul class="dummy">
3745 <li>
3746 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3747 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-733">line 733</a>
3748 </li>
3749 </ul>
3750 </dd>
3751
3752
3753
3754
3755
3756
3757
3758</dl>
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772 <h5>Returns:</h5>
3773
3774
3775<div class="param-desc">
3776 <p>Returns the current volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise).</p>
3777</div>
3778
3779
3780
3781<dl>
3782 <dt>
3783 Type
3784 </dt>
3785 <dd>
3786
3787<span class="param-type">number</span>
3788
3789
3790
3791 </dd>
3792</dl>
3793
3794
3795
3796
3797
3798</dd>
3799
3800
3801
3802<hr>
3803<dt>
3804 <h4 class="name" id="getVolumeBeforeMute"><span class="type-signature"></span>getVolumeBeforeMute<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
3805
3806
3807</dt>
3808<dd>
3809
3810
3811 <div class="description">
3812 <p>Returns the volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise) that was set before the audio was muted. Internally, uses the &quot;volumeBeforeMute&quot; property of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
3813 </div>
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824<dl class="details">
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3855 <dd class="tag-source">
3856 <ul class="dummy">
3857 <li>
3858 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3859 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-722">line 722</a>
3860 </li>
3861 </ul>
3862 </dd>
3863
3864
3865
3866
3867
3868
3869
3870</dl>
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884 <h5>Returns:</h5>
3885
3886
3887<div class="param-desc">
3888 <p>Returns the volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise) that was set before the audio was muted. If the audio was not muted before, it will contain the default volume used in the &quot;volume&quot; property of the used audio API object.</p>
3889</div>
3890
3891
3892
3893<dl>
3894 <dt>
3895 Type
3896 </dt>
3897 <dd>
3898
3899<span class="param-type">number</span>
3900
3901
3902
3903 </dd>
3904</dl>
3905
3906
3907
3908
3909
3910</dd>
3911
3912
3913
3914<hr>
3915<dt>
3916 <h4 class="name" id="isPaused"><span class="type-signature"></span>isPaused<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
3917
3918
3919</dt>
3920<dd>
3921
3922
3923 <div class="description">
3924 <p>Tells whether the audio is paused or not. Internally, uses the &quot;paused&quot; property of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
3925 </div>
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936<dl class="details">
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
3967 <dd class="tag-source">
3968 <ul class="dummy">
3969 <li>
3970 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
3971 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-839">line 839</a>
3972 </li>
3973 </ul>
3974 </dd>
3975
3976
3977
3978
3979
3980
3981
3982</dl>
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996 <h5>Returns:</h5>
3997
3998
3999<div class="param-desc">
4000 <p>Returns whether the audio is paused or not.</p>
4001</div>
4002
4003
4004
4005<dl>
4006 <dt>
4007 Type
4008 </dt>
4009 <dd>
4010
4011<span class="param-type">boolean</span>
4012
4013
4014
4015 </dd>
4016</dl>
4017
4018
4019
4020
4021
4022</dd>
4023
4024
4025
4026<hr>
4027<dt>
4028 <h4 class="name" id="isPlaying"><span class="type-signature"></span>isPlaying<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
4029
4030
4031</dt>
4032<dd>
4033
4034
4035 <div class="description">
4036 <p>Tells whether the audio file is playing or not. Internally, uses the <a href="CB_AudioFile.html#isStopped"><code>CB_AudioFile#isStopped</code></a> and <a href="CB_AudioFile.html#isPaused"><code>CB_AudioFile#isPaused</code></a> methods.</p>
4037 </div>
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048<dl class="details">
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
4079 <dd class="tag-source">
4080 <ul class="dummy">
4081 <li>
4082 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
4083 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-828">line 828</a>
4084 </li>
4085 </ul>
4086 </dd>
4087
4088
4089
4090
4091
4092
4093
4094</dl>
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108 <h5>Returns:</h5>
4109
4110
4111<div class="param-desc">
4112 <p>Returns whether the audio file is playing or not.</p>
4113</div>
4114
4115
4116
4117<dl>
4118 <dt>
4119 Type
4120 </dt>
4121 <dd>
4122
4123<span class="param-type">boolean</span>
4124
4125
4126
4127 </dd>
4128</dl>
4129
4130
4131
4132
4133
4134</dd>
4135
4136
4137
4138<hr>
4139<dt>
4140 <h4 class="name" id="isStopped"><span class="type-signature"></span>isStopped<span class="signature">()</span><span class="type-signature"> &rarr; {boolean}</span></h4>
4141
4142
4143</dt>
4144<dd>
4145
4146
4147 <div class="description">
4148 <p>Tells whether the audio file is stopped or not. Internally, uses the &quot;stopped&quot; property of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
4149 </div>
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160<dl class="details">
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
4191 <dd class="tag-source">
4192 <ul class="dummy">
4193 <li>
4194 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
4195 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-850">line 850</a>
4196 </li>
4197 </ul>
4198 </dd>
4199
4200
4201
4202
4203
4204
4205
4206</dl>
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220 <h5>Returns:</h5>
4221
4222
4223<div class="param-desc">
4224 <p>Returns whether the audio file is stopped or not.</p>
4225</div>
4226
4227
4228
4229<dl>
4230 <dt>
4231 Type
4232 </dt>
4233 <dd>
4234
4235<span class="param-type">boolean</span>
4236
4237
4238
4239 </dd>
4240</dl>
4241
4242
4243
4244
4245
4246</dd>
4247
4248
4249
4250<hr>
4251<dt>
4252 <h4 class="name" id="load"><span class="type-signature"></span>load<span class="signature">( [filePath] [, audioAPI] [, autoPlay] [, callbackOk] [, callbackError] [, ignoreOldValues] [, forceReload])</span><span class="type-signature"> &rarr; {<a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a>|<a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a>|<a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a>|<a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a>|null}</span></h4>
4253
4254
4255</dt>
4256<dd>
4257
4258
4259 <div class="description">
4260 <p>Loads the desired audio file with the desired options. Recommended to be called through a user-driven event (as onClick, onTouch, etc.), as some clients may need this at least the first time in order to be able to play the audio. This method will be called automatically if the &quot;autoLoad&quot; option was set to true when calling the <a href="CB_AudioFile.html#setAudioAPI"><code>CB_AudioFile#setAudioAPI</code></a> method. The audio API used will be stored in the <a href="CB_AudioFile.html#audioAPI"><code>CB_AudioFile#audioAPI</code></a> property.<br>When this method is called, if the &quot;status&quot; property of the audio API object already has the &quot;LOADED&quot; status (defined in the <a href="CB_AudioFile.html#.LOADED"><code>CB_AudioFile.LOADED</code></a> constant) and the &quot;forceReload&quot; parameter is not set to true, it will exit calling the given &quot;callbackOk&quot; function (if any) immediately. Otherwise, regardless the status, the status will be set to &quot;LOADING&quot; (defined in the <a href="CB_AudioFile.html#.LOADING"><code>CB_AudioFile.LOADING</code></a> constant). After it, it will reach the &quot;UNCHECKED&quot; (defined in the <a href="CB_AudioFile.html#.UNCHECKED"><code>CB_AudioFile.UNCHECKED</code></a> constant). If the &quot;autoPlay&quot; parameter is not set to true, this will be the final status (and it will be necessary to call the &quot;checkPlaying&quot; method of the audio API object after it). After it and only if the &quot;autoPlay&quot; is set to true, as the &quot;checkPlaying&quot; method of the audio API object will be called internally, it will have the &quot;CHECKING&quot; status (defined in the <a href="CB_AudioFile.html#.CHECKING"><code>CB_AudioFile.CHECKING</code></a> constant) and finally the &quot;LOADED&quot; status (defined in the <a href="CB_AudioFile.html#.LOADED"><code>CB_AudioFile.LOADED</code></a> constant) if all goes well.<br>Although it is not recommended to do so, if this method is called when the audio API object has the &quot;UNCHECKED&quot; status (defined in the <a href="CB_AudioFile.html#.UNCHECKED"><code>CB_AudioFile.UNCHECKED</code></a> constant), it will call the &quot;checkPlaying&quot; method of the audio API object internally.<br>Internally, it can use the <a href="CB_AudioFile.html#audioFileObjects"><code>CB_AudioFile#audioFileObjects</code></a> property as a cache.</p>
4261 </div>
4262
4263
4264
4265
4266
4267
4268
4269
4270 <h5>Parameters:</h5>
4271
4272
4273<table class="params table table-striped">
4274 <thead>
4275 <tr>
4276
4277 <th style="width:12%; min-width:110px;">Name</th>
4278
4279
4280 <th style="width:12%; min-width:110px;">Type</th>
4281
4282
4283 <th style="width:12%; min-width:110px;">Argument</th>
4284
4285
4286
4287 <th style="width:12%; min-width:110px;">Default</th>
4288
4289
4290 <th class="last" style="min-width:310px;">Description</th>
4291 </tr>
4292 </thead>
4293
4294 <tbody>
4295
4296
4297 <tr>
4298
4299 <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>
4300
4301
4302 <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;">
4303
4304
4305<span class="param-type">string</span>
4306
4307
4308
4309
4310 </td>
4311
4312
4313 <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;">
4314
4315 &lt;optional><br>
4316
4317
4318
4319
4320
4321 </td>
4322
4323
4324
4325 <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;">
4326
4327 <a href="CB_AudioFile.html#filePath"><code>CB_AudioFile#filePath</code></a>
4328
4329 </td>
4330
4331
4332 <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>
4333 </tr>
4334
4335
4336
4337 <tr>
4338
4339 <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>audioAPI</code></td>
4340
4341
4342 <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;">
4343
4344
4345<span class="param-type">string</span>
4346
4347
4348
4349
4350 </td>
4351
4352
4353 <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;">
4354
4355 &lt;optional><br>
4356
4357
4358
4359
4360
4361 </td>
4362
4363
4364
4365 <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;">
4366
4367 <a href="CB_AudioFile.html#audioAPI"><code>CB_AudioFile#audioAPI</code></a>
4368
4369 </td>
4370
4371
4372 <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 desired audio API to be used. If not provided, it will try to use the previously-set one (in the <a href="CB_AudioFile.html#audioAPI"><code>CB_AudioFile#audioAPI</code></a> property). All possible ones are defined in <a href="CB_Configuration.CrossBase.html#.CB_AudioFileCache_PREFERRED_AUDIO_APIS"><code>CB_Configuration.CrossBase.CB_AudioFileCache_PREFERRED_AUDIO_APIS</code></a>. For example: &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
4373 </tr>
4374
4375
4376
4377 <tr>
4378
4379 <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>autoPlay</code></td>
4380
4381
4382 <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;">
4383
4384
4385<span class="param-type">string</span>
4386
4387
4388
4389
4390 </td>
4391
4392
4393 <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;">
4394
4395 &lt;optional><br>
4396
4397
4398
4399
4400
4401 </td>
4402
4403
4404
4405 <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;">
4406
4407 false
4408
4409 </td>
4410
4411
4412 <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>If set to true, it will start playing the audio automatically (by calling the <a href="CB_AudioFile.html#play"><code>CB_AudioFile#play</code></a> method internally) unless the &quot;ignoreOldValues&quot; parameter is set to false and the previous audio was playing or paused. If set to true and the &quot;status&quot; property of the audio API object reaches to the &quot;UNCHECKED&quot; status (defined in the <a href="CB_AudioFile.html#.UNCHECKED"><code>CB_AudioFile.UNCHECKED</code></a> constant), it will also call internally the &quot;checkPlaying&quot; method of the audio API object before anything. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
4413 </tr>
4414
4415
4416
4417 <tr>
4418
4419 <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>
4420
4421
4422 <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;">
4423
4424
4425<span class="param-type">function</span>
4426
4427
4428
4429
4430 </td>
4431
4432
4433 <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;">
4434
4435 &lt;optional><br>
4436
4437
4438
4439
4440
4441 </td>
4442
4443
4444
4445 <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;">
4446
4447 </td>
4448
4449
4450 <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.html"><code>CB_AudioFile</code></a> object itself.</p></td>
4451 </tr>
4452
4453
4454
4455 <tr>
4456
4457 <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>
4458
4459
4460 <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;">
4461
4462
4463<span class="param-type">function</span>
4464
4465
4466
4467
4468 </td>
4469
4470
4471 <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;">
4472
4473 &lt;optional><br>
4474
4475
4476
4477
4478
4479 </td>
4480
4481
4482
4483 <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;">
4484
4485 </td>
4486
4487
4488 <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 it could be determined), being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object itself.</p></td>
4489 </tr>
4490
4491
4492
4493 <tr>
4494
4495 <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>ignoreOldValues</code></td>
4496
4497
4498 <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;">
4499
4500
4501<span class="param-type">string</span>
4502
4503
4504
4505
4506 </td>
4507
4508
4509 <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;">
4510
4511 &lt;optional><br>
4512
4513
4514
4515
4516
4517 </td>
4518
4519
4520
4521 <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;">
4522
4523 false
4524
4525 </td>
4526
4527
4528 <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>If set to true, it will ignore the old values of the previous used audio API object. This means that it will neither continue playing if it was playing (changing the audio API on-the-fly) nor keep the paused status if it was paused nor copy its &quot;loop&quot; property to the new audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
4529 </tr>
4530
4531
4532
4533 <tr>
4534
4535 <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>forceReload</code></td>
4536
4537
4538 <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;">
4539
4540
4541<span class="param-type">string</span>
4542
4543
4544
4545
4546 </td>
4547
4548
4549 <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;">
4550
4551 &lt;optional><br>
4552
4553
4554
4555
4556
4557 </td>
4558
4559
4560
4561 <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;">
4562
4563 false
4564
4565 </td>
4566
4567
4568 <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>Used internally as the &quot;forceReload&quot; parameter when calling the &quot;load&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p></td>
4569 </tr>
4570
4571
4572 </tbody>
4573</table>
4574
4575
4576
4577
4578<dl class="details">
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
4609 <dd class="tag-source">
4610 <ul class="dummy">
4611 <li>
4612 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
4613 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-376">line 376</a>
4614 </li>
4615 </ul>
4616 </dd>
4617
4618
4619
4620
4621
4622
4623
4624 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
4625 <dd class="tag-todo">
4626 <ul>
4627 <li>Think about using the "forceReload" just after the "callbackError" to match the parameter order of the "load" method of all the audio API objects.</li>
4628 </ul>
4629 </dd>
4630
4631</dl>
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645 <h5>Returns:</h5>
4646
4647
4648<div class="param-desc">
4649 <p>Returns the used audio API object or null otherwise. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
4650</div>
4651
4652
4653
4654<dl>
4655 <dt>
4656 Type
4657 </dt>
4658 <dd>
4659
4660<span class="param-type"><a href="CB_AudioFile_API.WAAPI.html">CB_AudioFile_API.WAAPI</a></span>
4661|
4662
4663<span class="param-type"><a href="CB_AudioFile_API.SM2.html">CB_AudioFile_API.SM2</a></span>
4664|
4665
4666<span class="param-type"><a href="CB_AudioFile_API.ACMP.html">CB_AudioFile_API.ACMP</a></span>
4667|
4668
4669<span class="param-type"><a href="CB_AudioFile_API.AAPI.html">CB_AudioFile_API.AAPI</a></span>
4670|
4671
4672<span class="param-type">null</span>
4673
4674
4675
4676 </dd>
4677</dl>
4678
4679
4680
4681
4682
4683</dd>
4684
4685
4686
4687<hr>
4688<dt>
4689 <h4 class="name" id="mute"><span class="type-signature"></span>mute<span class="signature">( [onMute])</span><span class="type-signature"> &rarr; {number}</span></h4>
4690
4691
4692</dt>
4693<dd>
4694
4695
4696 <div class="description">
4697 <p>Mutes the audio file. Internally, uses the &quot;mute&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
4698 </div>
4699
4700
4701
4702
4703
4704
4705
4706
4707 <h5>Parameters:</h5>
4708
4709
4710<table class="params table table-striped">
4711 <thead>
4712 <tr>
4713
4714 <th style="width:12%; min-width:110px;">Name</th>
4715
4716
4717 <th style="width:12%; min-width:110px;">Type</th>
4718
4719
4720 <th style="width:12%; min-width:110px;">Argument</th>
4721
4722
4723
4724
4725 <th class="last" style="min-width:310px;">Description</th>
4726 </tr>
4727 </thead>
4728
4729 <tbody>
4730
4731
4732 <tr>
4733
4734 <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>onMute</code></td>
4735
4736
4737 <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;">
4738
4739
4740<span class="param-type">function</span>
4741
4742
4743
4744
4745 </td>
4746
4747
4748 <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;">
4749
4750 &lt;optional><br>
4751
4752
4753
4754
4755
4756 </td>
4757
4758
4759
4760
4761 <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>Callback function which will be called if it has been possible to mute the audio file (or at least it was possible to try it). It will not receive any parameters, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. Used internally as the &quot;onMute&quot; parameter (with a wrapper function) to call the &quot;mute&quot; method of the audio API object.</p></td>
4762 </tr>
4763
4764
4765 </tbody>
4766</table>
4767
4768
4769
4770
4771<dl class="details">
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
4802 <dd class="tag-source">
4803 <ul class="dummy">
4804 <li>
4805 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
4806 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-762">line 762</a>
4807 </li>
4808 </ul>
4809 </dd>
4810
4811
4812
4813
4814
4815
4816
4817</dl>
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831 <h5>Returns:</h5>
4832
4833
4834<div class="param-desc">
4835 <p>Returns the current volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise). If all goes well, the returning value should be zero (0). Note that, even when it returns a zero (0) value, this does not always mean that the mute has been applied successfully.</p>
4836</div>
4837
4838
4839
4840<dl>
4841 <dt>
4842 Type
4843 </dt>
4844 <dd>
4845
4846<span class="param-type">number</span>
4847
4848
4849
4850 </dd>
4851</dl>
4852
4853
4854
4855
4856
4857</dd>
4858
4859
4860
4861<hr>
4862<dt>
4863 <h4 class="name" id="onStop"><span class="type-signature"></span>onStop<span class="signature">(callbackFunction [, keepOldFunction])</span><span class="type-signature"> &rarr; {boolean}</span></h4>
4864
4865
4866</dt>
4867<dd>
4868
4869
4870 <div class="description">
4871 <p>Sets a function to execute when the audio file stops playing or removes it. Internally, uses the &quot;onStop&quot; method of the used audio API object (wrapping the given function).</p>
4872 </div>
4873
4874
4875
4876
4877
4878
4879
4880
4881 <h5>Parameters:</h5>
4882
4883
4884<table class="params table table-striped">
4885 <thead>
4886 <tr>
4887
4888 <th style="width:12%; min-width:110px;">Name</th>
4889
4890
4891 <th style="width:12%; min-width:110px;">Type</th>
4892
4893
4894 <th style="width:12%; min-width:110px;">Argument</th>
4895
4896
4897
4898 <th style="width:12%; min-width:110px;">Default</th>
4899
4900
4901 <th class="last" style="min-width:310px;">Description</th>
4902 </tr>
4903 </thead>
4904
4905 <tbody>
4906
4907
4908 <tr>
4909
4910 <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>callbackFunction</code></td>
4911
4912
4913 <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;">
4914
4915
4916<span class="param-type">function</span>
4917|
4918
4919<span class="param-type">null</span>
4920
4921
4922
4923
4924 </td>
4925
4926
4927 <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;">
4928
4929
4930
4931
4932
4933 </td>
4934
4935
4936
4937 <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;">
4938
4939 </td>
4940
4941
4942 <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 function (event listener) that we want to execute when the event is fired. No parameters will be received, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. If a null value is used, the event will be removed.</p></td>
4943 </tr>
4944
4945
4946
4947 <tr>
4948
4949 <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>keepOldFunction</code></td>
4950
4951
4952 <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;">
4953
4954
4955<span class="param-type">boolean</span>
4956
4957
4958
4959
4960 </td>
4961
4962
4963 <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;">
4964
4965 &lt;optional><br>
4966
4967
4968
4969
4970
4971 </td>
4972
4973
4974
4975 <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;">
4976
4977 true
4978
4979 </td>
4980
4981
4982 <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>Defines whether we want to keep any possible previous event listener or not.</p></td>
4983 </tr>
4984
4985
4986 </tbody>
4987</table>
4988
4989
4990
4991
4992<dl class="details">
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
5023 <dd class="tag-source">
5024 <ul class="dummy">
5025 <li>
5026 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
5027 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-878">line 878</a>
5028 </li>
5029 </ul>
5030 </dd>
5031
5032
5033
5034
5035
5036
5037
5038</dl>
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052 <h5>Returns:</h5>
5053
5054
5055<div class="param-desc">
5056 <p>Returns whether the event has been set or not (removed).</p>
5057</div>
5058
5059
5060
5061<dl>
5062 <dt>
5063 Type
5064 </dt>
5065 <dd>
5066
5067<span class="param-type">boolean</span>
5068
5069
5070
5071 </dd>
5072</dl>
5073
5074
5075
5076
5077
5078</dd>
5079
5080
5081
5082<hr>
5083<dt>
5084 <h4 class="name" id="pause"><span class="type-signature"></span>pause<span class="signature">( [onPause] [, keepPausedUnaltered])</span><span class="type-signature"> &rarr; {boolean}</span></h4>
5085
5086
5087</dt>
5088<dd>
5089
5090
5091 <div class="description">
5092 <p>Pauses the audio when it is being played. Internally, uses the &quot;pause&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
5093 </div>
5094
5095
5096
5097
5098
5099
5100
5101
5102 <h5>Parameters:</h5>
5103
5104
5105<table class="params table table-striped">
5106 <thead>
5107 <tr>
5108
5109 <th style="width:12%; min-width:110px;">Name</th>
5110
5111
5112 <th style="width:12%; min-width:110px;">Type</th>
5113
5114
5115 <th style="width:12%; min-width:110px;">Argument</th>
5116
5117
5118
5119 <th style="width:12%; min-width:110px;">Default</th>
5120
5121
5122 <th class="last" style="min-width:310px;">Description</th>
5123 </tr>
5124 </thead>
5125
5126 <tbody>
5127
5128
5129 <tr>
5130
5131 <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>onPause</code></td>
5132
5133
5134 <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;">
5135
5136
5137<span class="param-type">function</span>
5138
5139
5140
5141
5142 </td>
5143
5144
5145 <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;">
5146
5147 &lt;optional><br>
5148
5149
5150
5151
5152
5153 </td>
5154
5155
5156
5157 <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;">
5158
5159 </td>
5160
5161
5162 <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 without parameters to be called when the audio is paused successfully, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. Used internally as the &quot;onPause&quot; parameter (with a wrapper function) to call the &quot;pause&quot; method of the audio API object.</p></td>
5163 </tr>
5164
5165
5166
5167 <tr>
5168
5169 <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>keepPausedUnaltered</code></td>
5170
5171
5172 <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;">
5173
5174
5175<span class="param-type">boolean</span>
5176
5177
5178
5179
5180 </td>
5181
5182
5183 <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;">
5184
5185 &lt;optional><br>
5186
5187
5188
5189
5190
5191 </td>
5192
5193
5194
5195 <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;">
5196
5197 false
5198
5199 </td>
5200
5201
5202 <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>If set to true (not recommended), the &quot;paused&quot; property of the audio API object will not be set to true and it will remain with its current value. Used internally as the &quot;keepPausedUnaltered&quot; parameter to call the &quot;pause&quot; method of the audio API object.</p></td>
5203 </tr>
5204
5205
5206 </tbody>
5207</table>
5208
5209
5210
5211
5212<dl class="details">
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
5243 <dd class="tag-source">
5244 <ul class="dummy">
5245 <li>
5246 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
5247 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-696">line 696</a>
5248 </li>
5249 </ul>
5250 </dd>
5251
5252
5253
5254
5255
5256
5257
5258</dl>
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272 <h5>Returns:</h5>
5273
5274
5275<div class="param-desc">
5276 <p>Returns the returning value of the &quot;pause&quot; method of the audio API object. It returns false if the audio is already paused or it is stopped or if it cannot be paused. Returns true otherwise. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
5277</div>
5278
5279
5280
5281<dl>
5282 <dt>
5283 Type
5284 </dt>
5285 <dd>
5286
5287<span class="param-type">boolean</span>
5288
5289
5290
5291 </dd>
5292</dl>
5293
5294
5295
5296
5297
5298</dd>
5299
5300
5301
5302<hr>
5303<dt>
5304 <h4 class="name" id="play"><span class="type-signature"></span>play<span class="signature">( [startAt] [, stopAt] [, loop] [, avoidDelayedPlay] [, allowedRecursiveDelay] [, onPlayStart] [, onLoadError] [, isResume])</span><span class="type-signature"> &rarr; {boolean|integer}</span></h4>
5305
5306
5307</dt>
5308<dd>
5309
5310
5311 <div class="description">
5312 <p>Plays the audio. Internally, uses the &quot;play&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
5313 </div>
5314
5315
5316
5317
5318
5319
5320
5321
5322 <h5>Parameters:</h5>
5323
5324
5325<table class="params table table-striped">
5326 <thead>
5327 <tr>
5328
5329 <th style="width:12%; min-width:110px;">Name</th>
5330
5331
5332 <th style="width:12%; min-width:110px;">Type</th>
5333
5334
5335 <th style="width:12%; min-width:110px;">Argument</th>
5336
5337
5338
5339 <th style="width:12%; min-width:110px;">Default</th>
5340
5341
5342 <th class="last" style="min-width:310px;">Description</th>
5343 </tr>
5344 </thead>
5345
5346 <tbody>
5347
5348
5349 <tr>
5350
5351 <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>startAt</code></td>
5352
5353
5354 <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;">
5355
5356
5357<span class="param-type">number</span>
5358
5359
5360
5361
5362 </td>
5363
5364
5365 <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;">
5366
5367 &lt;optional><br>
5368
5369
5370
5371
5372
5373 </td>
5374
5375
5376
5377 <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;">
5378
5379 0 | <a href="CB_AudioFile_API.WAAPI.html#lastStartAt"><code>CB_AudioFile_API.WAAPI#lastStartAt</code></a> | <a href="CB_AudioFile_API.SM2.html#lastStartAt"><code>CB_AudioFile_API.SM2#lastStartAt</code></a> | <a href="CB_AudioFile_API.ACMP.html#lastStartAt"><code>CB_AudioFile_API.ACMP#lastStartAt</code></a> | <a href="CB_AudioFile_API.AAPI.html#lastStartAt"><code>CB_AudioFile_API.AAPI#lastStartAt</code></a> | stopAt
5380
5381 </td>
5382
5383
5384 <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>Time in milliseconds where we want the audio to start at. If not provided or it is not a valid number, it will use zero (0) as default which belongs to the beginning of the audio. If the value provided is greater than the &quot;stopAt&quot; provided, it will use the value set in the &quot;lastStartAt&quot; property of the used audio API object (which belongs to the &quot;startAt&quot; value the last time that the &quot;play&quot; method was called). If, even using the &quot;lastStartAt&quot; value is still greather than the &quot;stopAt&quot; provided, it will use the same value as the &quot;stopAt&quot; which means it will not play and will stop immediately. Used internally as the &quot;startAt&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5385 </tr>
5386
5387
5388
5389 <tr>
5390
5391 <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>stopAt</code></td>
5392
5393
5394 <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;">
5395
5396
5397<span class="param-type">number</span>
5398
5399
5400
5401
5402 </td>
5403
5404
5405 <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;">
5406
5407 &lt;optional><br>
5408
5409
5410
5411
5412
5413 </td>
5414
5415
5416
5417 <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;">
5418
5419 <a href="CB_AudioFile_API.WAAPI.html#getDuration"><code>CB_AudioFile_API.WAAPI#getDuration</code></a>() | <a href="CB_AudioFile_API.SM2.html#getDuration"><code>CB_AudioFile_API.SM2#getDuration</code></a>() | <a href="CB_AudioFile_API.ACMP.html#getDuration"><code>CB_AudioFile_API.ACMP#getDuration</code></a>() | <a href="CB_AudioFile_API.AAPI.html#getDuration"><code>CB_AudioFile_API.AAPI#getDuration</code></a>()
5420
5421 </td>
5422
5423
5424 <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>Time in milliseconds where we want the audio to stop at. If not provided or it is not a valid number, it will use the returning value of the &quot;getDuration&quot; method of the used audio API object (which should belong to the total duration of the audio, if it was calculated correctly). Used internally as the &quot;stopAt&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5425 </tr>
5426
5427
5428
5429 <tr>
5430
5431 <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>loop</code></td>
5432
5433
5434 <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;">
5435
5436
5437<span class="param-type">boolean</span>
5438
5439
5440
5441
5442 </td>
5443
5444
5445 <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;">
5446
5447 &lt;optional><br>
5448
5449
5450
5451
5452
5453 </td>
5454
5455
5456
5457 <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;">
5458
5459 <a href="CB_AudioFile.html#loop"><code>CB_AudioFile#loop</code></a>
5460
5461 </td>
5462
5463
5464 <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>Sets whether we want to play the audio looping (starting again and again) or just play it once. Note that at the end of each loop the &quot;onStop&quot; function defined (through the <a href="CB_AudioFile.html#onStop"><code>CB_AudioFile#onStop</code></a> method) will not be called. Used internally as the &quot;loop&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5465 </tr>
5466
5467
5468
5469 <tr>
5470
5471 <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>avoidDelayedPlay</code></td>
5472
5473
5474 <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;">
5475
5476
5477<span class="param-type">boolean</span>
5478
5479
5480
5481
5482 </td>
5483
5484
5485 <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;">
5486
5487 &lt;optional><br>
5488
5489
5490
5491
5492
5493 </td>
5494
5495
5496
5497 <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;">
5498
5499 false
5500
5501 </td>
5502
5503
5504 <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>If set to false (recommended) and the audio failed previously or was aborted (destroyed), it will try to load it correctly again automatically and play it after that if possible (this can take some time so the audio could start playing after a delay). Otherwise, if set to true and the audio failed or was aborted (destroyed), the audio will not play at all and the &quot;stop&quot; method of the used audio API object will be called immediately. Used internally as the &quot;avoidDelayedPlay&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5505 </tr>
5506
5507
5508
5509 <tr>
5510
5511 <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>allowedRecursiveDelay</code></td>
5512
5513
5514 <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;">
5515
5516
5517<span class="param-type">boolean</span>
5518
5519
5520
5521
5522 </td>
5523
5524
5525 <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;">
5526
5527 &lt;optional><br>
5528
5529
5530
5531
5532
5533 </td>
5534
5535
5536
5537 <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;">
5538
5539 <a href="CB_Configuration.CrossBase.html#.CB_AudioFile_AudioFileCache_ALLOWED_RECURSIVE_DELAY_DEFAULT"><code>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_ALLOWED_RECURSIVE_DELAY_DEFAULT</code></a>
5540
5541 </td>
5542
5543
5544 <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 maximum amount of time (in milliseconds) of delay that we accept before start playing the audio. If the amount of time is overcome, the audio will not play at all and the &quot;stop&quot; method of the used audio API object will be called immediately. Used only when the &quot;avoidDelayedPlay&quot; parameter is set to false and the audio needs to be loaded because it failed previously or was aborted (destroyed). Used internally as the &quot;allowedRecursiveDelay&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5545 </tr>
5546
5547
5548
5549 <tr>
5550
5551 <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>onPlayStart</code></td>
5552
5553
5554 <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;">
5555
5556
5557<span class="param-type">function</span>
5558
5559
5560
5561
5562 </td>
5563
5564
5565 <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;">
5566
5567 &lt;optional><br>
5568
5569
5570
5571
5572
5573 </td>
5574
5575
5576
5577 <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;">
5578
5579 </td>
5580
5581
5582 <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 when the audio starts playing successfully. The function will be called with the following parameters (in order): &quot;startAt&quot;, &quot;stopAt&quot;, &quot;startAtNextLoop&quot;, &quot;loop&quot;, &quot;avoidDelayedPlay&quot;, &quot;allowedRecursiveDelay&quot; and &quot;startPlayingTime&quot;, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. If the audio is looping, this will be called only once when the audio starts playing the first time and it will not be called next loops. Used internally as the &quot;onPlayStart&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5583 </tr>
5584
5585
5586
5587 <tr>
5588
5589 <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>onLoadError</code></td>
5590
5591
5592 <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;">
5593
5594
5595<span class="param-type">function</span>
5596
5597
5598
5599
5600 </td>
5601
5602
5603 <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;">
5604
5605 &lt;optional><br>
5606
5607
5608
5609
5610
5611 </td>
5612
5613
5614
5615 <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;">
5616
5617 </td>
5618
5619
5620 <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 cannot be played successfully. The first and unique parameter will be a string describing the error found (if it could be determined), being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. Used internally as the &quot;onLoadError&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5621 </tr>
5622
5623
5624
5625 <tr>
5626
5627 <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>isResume</code></td>
5628
5629
5630 <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;">
5631
5632
5633<span class="param-type">boolean</span>
5634
5635
5636
5637
5638 </td>
5639
5640
5641 <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;">
5642
5643 &lt;optional><br>
5644
5645
5646
5647
5648
5649 </td>
5650
5651
5652
5653 <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;">
5654
5655 false
5656
5657 </td>
5658
5659
5660 <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>If set to true (not recommended) and it is a looping audio, the next loop will use the value of the &quot;lastStartAt&quot; property of the audio API object as the &quot;startAt&quot; parameter when it calls the &quot;play&quot; method again automatically (internally). Recommended for internal usage only. Used internally as the &quot;isResume&quot; parameter to call the &quot;play&quot; method of the audio API object.</p></td>
5661 </tr>
5662
5663
5664 </tbody>
5665</table>
5666
5667
5668
5669
5670<dl class="details">
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
5701 <dd class="tag-source">
5702 <ul class="dummy">
5703 <li>
5704 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
5705 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-614">line 614</a>
5706 </li>
5707 </ul>
5708 </dd>
5709
5710
5711
5712
5713
5714
5715
5716</dl>
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730 <h5>Returns:</h5>
5731
5732
5733<div class="param-desc">
5734 <p>Returns the returning value of the &quot;play&quot; method of the audio API object. It returns false if the duration is 0 (&quot;startAt&quot; and &quot;stopAt&quot; are the same number), returns &quot;-1&quot; if the audio cannot be played and an error is detected or returns true otherwise. Note that even when it returns true there can be a non-detectable error and maybe the audio is not played. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
5735</div>
5736
5737
5738
5739<dl>
5740 <dt>
5741 Type
5742 </dt>
5743 <dd>
5744
5745<span class="param-type">boolean</span>
5746|
5747
5748<span class="param-type">integer</span>
5749
5750
5751
5752 </dd>
5753</dl>
5754
5755
5756
5757
5758
5759</dd>
5760
5761
5762
5763<hr>
5764<dt>
5765 <h4 class="name" id="resume"><span class="type-signature"></span>resume<span class="signature">( [loop] [, avoidDelayedPlay] [, allowedRecursiveDelay] [, onPlayStart] [, onLoadError])</span><span class="type-signature"> &rarr; {boolean|integer}</span></h4>
5766
5767
5768</dt>
5769<dd>
5770
5771
5772 <div class="description">
5773 <p>Resumes the audio (after being paused), starting from the same point it was paused previously. Internally, uses the &quot;resume&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
5774 </div>
5775
5776
5777
5778
5779
5780
5781
5782
5783 <h5>Parameters:</h5>
5784
5785
5786<table class="params table table-striped">
5787 <thead>
5788 <tr>
5789
5790 <th style="width:12%; min-width:110px;">Name</th>
5791
5792
5793 <th style="width:12%; min-width:110px;">Type</th>
5794
5795
5796 <th style="width:12%; min-width:110px;">Argument</th>
5797
5798
5799
5800 <th style="width:12%; min-width:110px;">Default</th>
5801
5802
5803 <th class="last" style="min-width:310px;">Description</th>
5804 </tr>
5805 </thead>
5806
5807 <tbody>
5808
5809
5810 <tr>
5811
5812 <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>loop</code></td>
5813
5814
5815 <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;">
5816
5817
5818<span class="param-type">boolean</span>
5819
5820
5821
5822
5823 </td>
5824
5825
5826 <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;">
5827
5828 &lt;optional><br>
5829
5830
5831
5832
5833
5834 </td>
5835
5836
5837
5838 <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;">
5839
5840 <a href="CB_AudioFile.html#loop"><code>CB_AudioFile#loop</code></a>
5841
5842 </td>
5843
5844
5845 <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>Sets whether we want to play the audio looping (starting again and again) or just play it once. Note that at the end of each loop the &quot;onStop&quot; function defined (through the <a href="CB_AudioFile.html#onStop"><code>CB_AudioFile#onStop</code></a> method) will not be called. Used internally as the &quot;loop&quot; parameter to call the &quot;resume&quot; method of the audio API object.</p></td>
5846 </tr>
5847
5848
5849
5850 <tr>
5851
5852 <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>avoidDelayedPlay</code></td>
5853
5854
5855 <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;">
5856
5857
5858<span class="param-type">boolean</span>
5859
5860
5861
5862
5863 </td>
5864
5865
5866 <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;">
5867
5868 &lt;optional><br>
5869
5870
5871
5872
5873
5874 </td>
5875
5876
5877
5878 <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;">
5879
5880 false
5881
5882 </td>
5883
5884
5885 <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>If set to false (recommended) and the audio failed previously or was aborted (destroyed), it will try to load it correctly again automatically and play it after that if possible (this can take some time so the audio could start playing after a delay). Otherwise, if set to true and the audio failed or was aborted (destroyed), the audio will not play at all and the &quot;stop&quot; method of the used audio API object will be called immediately. Used internally as the &quot;avoidDelayedPlay&quot; parameter to call the &quot;resume&quot; method of the audio API object.</p></td>
5886 </tr>
5887
5888
5889
5890 <tr>
5891
5892 <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>allowedRecursiveDelay</code></td>
5893
5894
5895 <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;">
5896
5897
5898<span class="param-type">boolean</span>
5899
5900
5901
5902
5903 </td>
5904
5905
5906 <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;">
5907
5908 &lt;optional><br>
5909
5910
5911
5912
5913
5914 </td>
5915
5916
5917
5918 <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;">
5919
5920 <a href="CB_Configuration.CrossBase.html#.CB_AudioFile_AudioFileCache_ALLOWED_RECURSIVE_DELAY_DEFAULT"><code>CB_Configuration.CrossBase.CB_AudioFile_AudioFileCache_ALLOWED_RECURSIVE_DELAY_DEFAULT</code></a>
5921
5922 </td>
5923
5924
5925 <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 maximum amount of time (in milliseconds) of delay that we accept before start playing the audio. If the amount of time is overcome, the audio will not play at all and the &quot;stop&quot; method of the used audio API object will be called immediately. Used only when the &quot;avoidDelayedPlay&quot; parameter is set to false and the audio needs to be loaded because it failed previously or was aborted (destroyed). Used internally as the &quot;allowedRecursiveDelay&quot; parameter to call the &quot;resume&quot; method of the audio API object.</p></td>
5926 </tr>
5927
5928
5929
5930 <tr>
5931
5932 <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>onPlayStart</code></td>
5933
5934
5935 <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;">
5936
5937
5938<span class="param-type">function</span>
5939
5940
5941
5942
5943 </td>
5944
5945
5946 <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;">
5947
5948 &lt;optional><br>
5949
5950
5951
5952
5953
5954 </td>
5955
5956
5957
5958 <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;">
5959
5960 </td>
5961
5962
5963 <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 when the audio starts playing successfully. The function will be called with the following parameters (in order): &quot;startAt&quot;, &quot;stopAt&quot;, &quot;startAtNextLoop&quot;, &quot;loop&quot;, &quot;avoidDelayedPlay&quot;, &quot;allowedRecursiveDelay&quot; and &quot;startPlayingTime&quot;, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. If the audio is looping, this will be called only once when the audio starts playing the first time and it will not be called next loops. Used internally as the &quot;onPlayStart&quot; parameter to call the &quot;resume&quot; method of the audio API object.</p></td>
5964 </tr>
5965
5966
5967
5968 <tr>
5969
5970 <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>onLoadError</code></td>
5971
5972
5973 <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;">
5974
5975
5976<span class="param-type">function</span>
5977
5978
5979
5980
5981 </td>
5982
5983
5984 <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;">
5985
5986 &lt;optional><br>
5987
5988
5989
5990
5991
5992 </td>
5993
5994
5995
5996 <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;">
5997
5998 </td>
5999
6000
6001 <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 cannot be played successfully. It will not be called if the audio is not paused or is stopped. The first and unique parameter will be a string describing the error found (if it could be determined), being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. Used internally as the &quot;onLoadError&quot; parameter to call the &quot;resume&quot; method of the audio API object.</p></td>
6002 </tr>
6003
6004
6005 </tbody>
6006</table>
6007
6008
6009
6010
6011<dl class="details">
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
6042 <dd class="tag-source">
6043 <ul class="dummy">
6044 <li>
6045 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
6046 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-657">line 657</a>
6047 </li>
6048 </ul>
6049 </dd>
6050
6051
6052
6053
6054
6055
6056
6057</dl>
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071 <h5>Returns:</h5>
6072
6073
6074<div class="param-desc">
6075 <p>Returns the returning value of the &quot;resume&quot; method of the audio API object. It returns false if the audio is not paused or it is stopped, returns &quot;-1&quot; if the audio cannot be played and an error is detected or returns true otherwise. Note that even when it returns true there can be a non-detectable error and maybe the audio is not played. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
6076</div>
6077
6078
6079
6080<dl>
6081 <dt>
6082 Type
6083 </dt>
6084 <dd>
6085
6086<span class="param-type">boolean</span>
6087|
6088
6089<span class="param-type">integer</span>
6090
6091
6092
6093 </dd>
6094</dl>
6095
6096
6097
6098
6099
6100</dd>
6101
6102
6103
6104<hr>
6105<dt>
6106 <h4 class="name" id="setAudioAPI"><span class="type-signature"></span>setAudioAPI<span class="signature">( [audioAPI] [, autoLoad] [, autoPlay] [, callbackOk] [, callbackError] [, ignoreOldValues] [, filePath] [, forceReload])</span><span class="type-signature"> &rarr; {string}</span></h4>
6107
6108
6109</dt>
6110<dd>
6111
6112
6113 <div class="description">
6114 <p>Sets the desired audio API. This method will also be called automatically by the constructor. If the &quot;autoLoad&quot; parameter is set to true, it will call the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally, changing the audio API on-the-fly, and the audio will try to continue playing if it was playing at the moment of calling this method. Check the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method documentation for more information. If the &quot;autoLoad&quot; parameter is set to true, it is recommended to be called through a user-driven event (as onClick, onTouch, etc.), as some clients may need this at least the first time in order to be able to play the audio. The audio API used will be stored in the <a href="CB_AudioFile.html#audioAPI"><code>CB_AudioFile#audioAPI</code></a> property.</p>
6115 </div>
6116
6117
6118
6119
6120
6121
6122
6123
6124 <h5>Parameters:</h5>
6125
6126
6127<table class="params table table-striped">
6128 <thead>
6129 <tr>
6130
6131 <th style="width:12%; min-width:110px;">Name</th>
6132
6133
6134 <th style="width:12%; min-width:110px;">Type</th>
6135
6136
6137 <th style="width:12%; min-width:110px;">Argument</th>
6138
6139
6140
6141 <th style="width:12%; min-width:110px;">Default</th>
6142
6143
6144 <th class="last" style="min-width:310px;">Description</th>
6145 </tr>
6146 </thead>
6147
6148 <tbody>
6149
6150
6151 <tr>
6152
6153 <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>audioAPI</code></td>
6154
6155
6156 <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;">
6157
6158
6159<span class="param-type">string</span>
6160
6161
6162
6163
6164 </td>
6165
6166
6167 <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;">
6168
6169 &lt;optional><br>
6170
6171
6172
6173
6174
6175 </td>
6176
6177
6178
6179 <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;">
6180
6181 CB_AudioDetector.getPreferredAPI(undefined, false, null) || CB_AudioDetector.getPreferredAPI(undefined, true, null)
6182
6183 </td>
6184
6185
6186 <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 desired audio API to be used. If not provided, it will try to calculate the best one for the current client by calling the <a href="CB_AudioDetector.html#.getPreferredAPI"><code>CB_AudioDetector.getPreferredAPI</code></a> function internally. Audio API support will depend on the current client being used. All possible ones are defined in <a href="CB_Configuration.CrossBase.html#.CB_AudioFileCache_PREFERRED_AUDIO_APIS"><code>CB_Configuration.CrossBase.CB_AudioFileCache_PREFERRED_AUDIO_APIS</code></a>. For example: &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>). Used internally as the &quot;audioAPI&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6187 </tr>
6188
6189
6190
6191 <tr>
6192
6193 <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>autoLoad</code></td>
6194
6195
6196 <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;">
6197
6198
6199<span class="param-type">string</span>
6200
6201
6202
6203
6204 </td>
6205
6206
6207 <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;">
6208
6209 &lt;optional><br>
6210
6211
6212
6213
6214
6215 </td>
6216
6217
6218
6219 <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;">
6220
6221 true
6222
6223 </td>
6224
6225
6226 <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>If set to false, it will not call the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally and will only set the <a href="CB_AudioFile.html#audioAPI"><code>CB_AudioFile#audioAPI</code></a> property (not recommended).</p></td>
6227 </tr>
6228
6229
6230
6231 <tr>
6232
6233 <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>autoPlay</code></td>
6234
6235
6236 <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;">
6237
6238
6239<span class="param-type">string</span>
6240
6241
6242
6243
6244 </td>
6245
6246
6247 <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;">
6248
6249 &lt;optional><br>
6250
6251
6252
6253
6254
6255 </td>
6256
6257
6258
6259 <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;">
6260
6261 false
6262
6263 </td>
6264
6265
6266 <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>Used internally as the &quot;autoPlay&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6267 </tr>
6268
6269
6270
6271 <tr>
6272
6273 <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>
6274
6275
6276 <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;">
6277
6278
6279<span class="param-type">function</span>
6280
6281
6282
6283
6284 </td>
6285
6286
6287 <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;">
6288
6289 &lt;optional><br>
6290
6291
6292
6293
6294
6295 </td>
6296
6297
6298
6299 <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;">
6300
6301 </td>
6302
6303
6304 <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.html"><code>CB_AudioFile</code></a> object itself. Used internally as the &quot;callbackOk&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6305 </tr>
6306
6307
6308
6309 <tr>
6310
6311 <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>
6312
6313
6314 <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;">
6315
6316
6317<span class="param-type">function</span>
6318
6319
6320
6321
6322 </td>
6323
6324
6325 <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;">
6326
6327 &lt;optional><br>
6328
6329
6330
6331
6332
6333 </td>
6334
6335
6336
6337 <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;">
6338
6339 </td>
6340
6341
6342 <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 it could be determined), being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object itself. Used internally as the &quot;callbackError&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6343 </tr>
6344
6345
6346
6347 <tr>
6348
6349 <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>ignoreOldValues</code></td>
6350
6351
6352 <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;">
6353
6354
6355<span class="param-type">string</span>
6356
6357
6358
6359
6360 </td>
6361
6362
6363 <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;">
6364
6365 &lt;optional><br>
6366
6367
6368
6369
6370
6371 </td>
6372
6373
6374
6375 <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;">
6376
6377 false
6378
6379 </td>
6380
6381
6382 <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>Used internally as the &quot;ignoreOldValues&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6383 </tr>
6384
6385
6386
6387 <tr>
6388
6389 <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>
6390
6391
6392 <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;">
6393
6394
6395<span class="param-type">string</span>
6396
6397
6398
6399
6400 </td>
6401
6402
6403 <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;">
6404
6405 &lt;optional><br>
6406
6407
6408
6409
6410
6411 </td>
6412
6413
6414
6415 <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;">
6416
6417 <a href="CB_AudioFile.html#filePath"><code>CB_AudioFile#filePath</code></a>
6418
6419 </td>
6420
6421
6422 <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>Used internally as the &quot;filePath&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6423 </tr>
6424
6425
6426
6427 <tr>
6428
6429 <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>forceReload</code></td>
6430
6431
6432 <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;">
6433
6434
6435<span class="param-type">string</span>
6436
6437
6438
6439
6440 </td>
6441
6442
6443 <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;">
6444
6445 &lt;optional><br>
6446
6447
6448
6449
6450
6451 </td>
6452
6453
6454
6455 <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;">
6456
6457 false
6458
6459 </td>
6460
6461
6462 <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>Used internally as the &quot;forceReload&quot; parameter when calling the <a href="CB_AudioFile.html#load"><code>CB_AudioFile#load</code></a> method internally (only when the &quot;autoLoad&quot; parameter is set to true).</p></td>
6463 </tr>
6464
6465
6466 </tbody>
6467</table>
6468
6469
6470
6471
6472<dl class="details">
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
6503 <dd class="tag-source">
6504 <ul class="dummy">
6505 <li>
6506 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
6507 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-322">line 322</a>
6508 </li>
6509 </ul>
6510 </dd>
6511
6512
6513
6514
6515
6516
6517
6518 <dt class="tag-todo method-doc-label method-doc-details-label">To Do:</dt>
6519 <dd class="tag-todo">
6520 <ul>
6521 <li>Think about using the "forceReload" just after the "callbackError" to match the parameter order of the "load" method of all the audio API objects.</li>
6522 </ul>
6523 </dd>
6524
6525</dl>
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539 <h5>Returns:</h5>
6540
6541
6542<div class="param-desc">
6543 <p>Returns the desired audio API that has been tried to set, in upper case (successfully or not).</p>
6544</div>
6545
6546
6547
6548<dl>
6549 <dt>
6550 Type
6551 </dt>
6552 <dd>
6553
6554<span class="param-type">string</span>
6555
6556
6557
6558 </dd>
6559</dl>
6560
6561
6562
6563
6564
6565</dd>
6566
6567
6568
6569<hr>
6570<dt>
6571 <h4 class="name" id="setVolume"><span class="type-signature"></span>setVolume<span class="signature">( [volume] [, forceSetVolumeProperty] [, onSetVolume])</span><span class="type-signature"> &rarr; {number}</span></h4>
6572
6573
6574</dt>
6575<dd>
6576
6577
6578 <div class="description">
6579 <p>Sets the desired volume for the audio file (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise). Internally, uses the &quot;setVolume&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
6580 </div>
6581
6582
6583
6584
6585
6586
6587
6588
6589 <h5>Parameters:</h5>
6590
6591
6592<table class="params table table-striped">
6593 <thead>
6594 <tr>
6595
6596 <th style="width:12%; min-width:110px;">Name</th>
6597
6598
6599 <th style="width:12%; min-width:110px;">Type</th>
6600
6601
6602 <th style="width:12%; min-width:110px;">Argument</th>
6603
6604
6605
6606 <th style="width:12%; min-width:110px;">Default</th>
6607
6608
6609 <th class="last" style="min-width:310px;">Description</th>
6610 </tr>
6611 </thead>
6612
6613 <tbody>
6614
6615
6616 <tr>
6617
6618 <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>volume</code></td>
6619
6620
6621 <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;">
6622
6623
6624<span class="param-type">number</span>
6625
6626
6627
6628
6629 </td>
6630
6631
6632 <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;">
6633
6634 &lt;optional><br>
6635
6636
6637
6638
6639
6640 </td>
6641
6642
6643
6644 <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;">
6645
6646 <code>CB_Speaker.getVolume()</code> | <a href="CB_Configuration.CrossBase.html#.CB_Speaker_DEFAULT_VOLUME"><code>CB_Configuration.CrossBase.CB_Speaker_DEFAULT_VOLUME</code></a>
6647
6648 </td>
6649
6650
6651 <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 volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise). Used internally as the &quot;volume&quot; parameter to call the &quot;setVolume&quot; method of the audio API object.</p></td>
6652 </tr>
6653
6654
6655
6656 <tr>
6657
6658 <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>forceSetVolumeProperty</code></td>
6659
6660
6661 <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;">
6662
6663
6664<span class="param-type">boolean</span>
6665
6666
6667
6668
6669 </td>
6670
6671
6672 <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;">
6673
6674 &lt;optional><br>
6675
6676
6677
6678
6679
6680 </td>
6681
6682
6683
6684 <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;">
6685
6686 false
6687
6688 </td>
6689
6690
6691 <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>If set to true (not recommended), it will change the &quot;volume&quot; property of the used audio API object even when the volume failed to be changed. Used internally as the &quot;forceSetVolumeProperty&quot; parameter to call the &quot;setVolume&quot; method of the audio API object.</p></td>
6692 </tr>
6693
6694
6695
6696 <tr>
6697
6698 <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>onSetVolume</code></td>
6699
6700
6701 <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;">
6702
6703
6704<span class="param-type">function</span>
6705
6706
6707
6708
6709 </td>
6710
6711
6712 <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;">
6713
6714 &lt;optional><br>
6715
6716
6717
6718
6719
6720 </td>
6721
6722
6723
6724 <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;">
6725
6726 </td>
6727
6728
6729 <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>Callback function which will be called if it has been possible to set the volume (or at least it was possible to try it). It will not receive any parameters, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. Used internally as the &quot;onSetVolume&quot; parameter (with a wrapper function) to call the &quot;setVolume&quot; method of the audio API object.</p></td>
6730 </tr>
6731
6732
6733 </tbody>
6734</table>
6735
6736
6737
6738
6739<dl class="details">
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
6770 <dd class="tag-source">
6771 <ul class="dummy">
6772 <li>
6773 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
6774 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-748">line 748</a>
6775 </li>
6776 </ul>
6777 </dd>
6778
6779
6780
6781
6782
6783
6784
6785</dl>
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799 <h5>Returns:</h5>
6800
6801
6802<div class="param-desc">
6803 <p>Returns the current volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise).</p>
6804</div>
6805
6806
6807
6808<dl>
6809 <dt>
6810 Type
6811 </dt>
6812 <dd>
6813
6814<span class="param-type">number</span>
6815
6816
6817
6818 </dd>
6819</dl>
6820
6821
6822
6823
6824
6825</dd>
6826
6827
6828
6829<hr>
6830<dt>
6831 <h4 class="name" id="stop"><span class="type-signature"></span>stop<span class="signature">( [keepStoppedUnaltered] [, avoidOnStop] [, forceOnStop])</span><span class="type-signature"> &rarr; {boolean}</span></h4>
6832
6833
6834</dt>
6835<dd>
6836
6837
6838 <div class="description">
6839 <p>Stops the audio. Internally, uses the &quot;stop&quot; method of the used audio API object. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
6840 </div>
6841
6842
6843
6844
6845
6846
6847
6848
6849 <h5>Parameters:</h5>
6850
6851
6852<table class="params table table-striped">
6853 <thead>
6854 <tr>
6855
6856 <th style="width:12%; min-width:110px;">Name</th>
6857
6858
6859 <th style="width:12%; min-width:110px;">Type</th>
6860
6861
6862 <th style="width:12%; min-width:110px;">Argument</th>
6863
6864
6865
6866 <th style="width:12%; min-width:110px;">Default</th>
6867
6868
6869 <th class="last" style="min-width:310px;">Description</th>
6870 </tr>
6871 </thead>
6872
6873 <tbody>
6874
6875
6876 <tr>
6877
6878 <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>keepStoppedUnaltered</code></td>
6879
6880
6881 <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;">
6882
6883
6884<span class="param-type">boolean</span>
6885
6886
6887
6888
6889 </td>
6890
6891
6892 <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;">
6893
6894 &lt;optional><br>
6895
6896
6897
6898
6899
6900 </td>
6901
6902
6903
6904 <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;">
6905
6906 false
6907
6908 </td>
6909
6910
6911 <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>If set to true (not recommended), the &quot;stopped&quot; property of the audio API object will not be set to true and it will remain with its current value. Used internally as the &quot;keepStoppedUnaltered&quot; parameter to call the &quot;stop&quot; method of the audio API object.</p></td>
6912 </tr>
6913
6914
6915
6916 <tr>
6917
6918 <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>avoidOnStop</code></td>
6919
6920
6921 <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;">
6922
6923
6924<span class="param-type">boolean</span>
6925
6926
6927
6928
6929 </td>
6930
6931
6932 <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;">
6933
6934 &lt;optional><br>
6935
6936
6937
6938
6939
6940 </td>
6941
6942
6943
6944 <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;">
6945
6946 false
6947
6948 </td>
6949
6950
6951 <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>If set to false and there is an &quot;onStop&quot; function defined (through the <a href="CB_AudioFile.html#onStop"><code>CB_AudioFile#onStop</code></a> method), it will be called after stopping the audio (or after trying to do it, at least) but only if either the &quot;forceOnStop&quot; parameter is set to true or if the &quot;keepStoppedUnaltered&quot; parameter is set to false and the audio was not already stopped before. If set to true, the &quot;onStop&quot; function (if any) will not be called at all. Used internally as the &quot;avoidOnStop&quot; parameter to call the &quot;stop&quot; method of the audio API object.</p></td>
6952 </tr>
6953
6954
6955
6956 <tr>
6957
6958 <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>forceOnStop</code></td>
6959
6960
6961 <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;">
6962
6963
6964<span class="param-type">boolean</span>
6965
6966
6967
6968
6969 </td>
6970
6971
6972 <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;">
6973
6974 &lt;optional><br>
6975
6976
6977
6978
6979
6980 </td>
6981
6982
6983
6984 <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;">
6985
6986 false
6987
6988 </td>
6989
6990
6991 <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>If it is set to true and the &quot;avoidOnStop&quot; parameter is set to false and there is an &quot;onStop&quot; function defined (through the <a href="CB_AudioFile.html#onStop"><code>CB_AudioFile#onStop</code></a> method), it will be called regardless the audio was stopped before or not. If set to false, the &quot;onStop&quot; function (if any) will only be called if the &quot;keepStoppedUnaltered&quot; parameter is set to false and the audio was not already stopped before. This parameter will be ignored if the &quot;avoidOnStop&quot; parameter is set to true. Used internally as the &quot;forceOnStop&quot; parameter to call the &quot;stop&quot; method of the audio API object.</p></td>
6992 </tr>
6993
6994
6995 </tbody>
6996</table>
6997
6998
6999
7000
7001<dl class="details">
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
7032 <dd class="tag-source">
7033 <ul class="dummy">
7034 <li>
7035 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
7036 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-711">line 711</a>
7037 </li>
7038 </ul>
7039 </dd>
7040
7041
7042
7043
7044
7045
7046
7047</dl>
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061 <h5>Returns:</h5>
7062
7063
7064<div class="param-desc">
7065 <p>Returns the returning value of the &quot;stop&quot; method of the audio API object. It returns false if the stopping action cannot be performed at all (this could happen with the internal audio API has not been loaded properly, for example). Returns true otherwise (this only means that it has been tried to be stopped but it could not be successfully). Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
7066</div>
7067
7068
7069
7070<dl>
7071 <dt>
7072 Type
7073 </dt>
7074 <dd>
7075
7076<span class="param-type">boolean</span>
7077
7078
7079
7080 </dd>
7081</dl>
7082
7083
7084
7085
7086
7087</dd>
7088
7089
7090
7091<hr>
7092<dt>
7093 <h4 class="name" id="unmute"><span class="type-signature"></span>unmute<span class="signature">( [onUnmute])</span><span class="type-signature"> &rarr; {number}</span></h4>
7094
7095
7096</dt>
7097<dd>
7098
7099
7100 <div class="description">
7101 <p>Restores audio after muting it (unmutes it). Internally, uses the &quot;unmute&quot; method of the used audio API object which uses its own &quot;volumeBeforeMute&quot; property. Possible internal audio API objects are <a href="CB_AudioFile_API.WAAPI.html"><code>CB_AudioFile_API.WAAPI</code></a> object for &quot;WAAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API">HTML5 Web Audio API</a>), <a href="CB_AudioFile_API.SM2.html"><code>CB_AudioFile_API.SM2</code></a> object for &quot;SM2&quot; (<a href="http://schillmania.com/projects/soundmanager2/">SoundManager 2</a>), <a href="CB_AudioFile_API.ACMP.html"><code>CB_AudioFile_API.ACMP</code></a> object for &quot;ACMP&quot; (<a href="https://github.com/apache/cordova-plugin-media">Apache Cordova Media Plugin</a>) or <a href="CB_AudioFile_API.AAPI.html"><code>CB_AudioFile_API.AAPI</code></a> object for &quot;AAPI&quot; (<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio">HTML5 Audio API</a>).</p>
7102 </div>
7103
7104
7105
7106
7107
7108
7109
7110
7111 <h5>Parameters:</h5>
7112
7113
7114<table class="params table table-striped">
7115 <thead>
7116 <tr>
7117
7118 <th style="width:12%; min-width:110px;">Name</th>
7119
7120
7121 <th style="width:12%; min-width:110px;">Type</th>
7122
7123
7124 <th style="width:12%; min-width:110px;">Argument</th>
7125
7126
7127
7128
7129 <th class="last" style="min-width:310px;">Description</th>
7130 </tr>
7131 </thead>
7132
7133 <tbody>
7134
7135
7136 <tr>
7137
7138 <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>onUnmute</code></td>
7139
7140
7141 <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;">
7142
7143
7144<span class="param-type">function</span>
7145
7146
7147
7148
7149 </td>
7150
7151
7152 <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;">
7153
7154 &lt;optional><br>
7155
7156
7157
7158
7159
7160 </td>
7161
7162
7163
7164
7165 <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>Callback function which will be called if it has been possible to unmute the audio file (or at least it was possible to try it). It will not receive any parameters, being &quot;this&quot; the <a href="CB_AudioFile.html"><code>CB_AudioFile</code></a> object. Used internally as the &quot;onUnmute&quot; parameter (with a wrapper function) to call the &quot;unmute&quot; method of the audio API object.</p></td>
7166 </tr>
7167
7168
7169 </tbody>
7170</table>
7171
7172
7173
7174
7175<dl class="details">
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
7206 <dd class="tag-source">
7207 <ul class="dummy">
7208 <li>
7209 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
7210 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-776">line 776</a>
7211 </li>
7212 </ul>
7213 </dd>
7214
7215
7216
7217
7218
7219
7220
7221</dl>
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235 <h5>Returns:</h5>
7236
7237
7238<div class="param-desc">
7239 <p>Returns the current volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise).</p>
7240</div>
7241
7242
7243
7244<dl>
7245 <dt>
7246 Type
7247 </dt>
7248 <dd>
7249
7250<span class="param-type">number</span>
7251
7252
7253
7254 </dd>
7255</dl>
7256
7257
7258
7259
7260
7261</dd>
7262
7263 </dl>
7264
7265
7266
7267 <h3 class="subsection-title">Type Definitions</h3>
7268
7269 <dl>
7270
7271<hr>
7272<dt class="name" id=".OPTIONS">
7273 <h4 id=".OPTIONS">OPTIONS</h4>
7274
7275
7276</dt>
7277<dd>
7278
7279 <div class="description">
7280 <p>Object with the options for an audio file. The format is the following one: { autoLoad: boolean, autoPlay: boolean, loop: boolean, volume: number }.</p>
7281 </div>
7282
7283
7284
7285 <h5>Type:</h5>
7286 <ul>
7287 <li>
7288
7289<span class="param-type">Object</span>
7290
7291
7292
7293 </li>
7294 </ul>
7295
7296
7297
7298<dl class="details">
7299
7300
7301 <h5 class="subsection-title">Properties:</h5>
7302
7303 <dl>
7304
7305<table class="props table table-striped">
7306 <thead>
7307 <tr>
7308
7309 <th>Name</th>
7310
7311
7312 <th>Type</th>
7313
7314
7315 <th>Argument</th>
7316
7317
7318
7319 <th>Default</th>
7320
7321
7322 <th class="last">Description</th>
7323 </tr>
7324 </thead>
7325
7326 <tbody>
7327
7328
7329 <tr>
7330
7331 <td class="name"><code>autoLoad</code></td>
7332
7333
7334 <td class="type">
7335
7336
7337<span class="param-type">boolean</span>
7338
7339
7340
7341
7342 </td>
7343
7344
7345 <td class="attributes">
7346
7347 &lt;optional><br>
7348
7349
7350
7351 </td>
7352
7353
7354
7355 <td class="default">
7356
7357 <a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile#DEFAULT_OPTIONS</code></a>.autoLoad
7358
7359 </td>
7360
7361
7362 <td class="description last"><p>Value which will be used as the &quot;autoLoad&quot; parameter when calling the <a href="CB_AudioFile.html#setAudioAPI"><code>CB_AudioFile#setAudioAPI</code></a> method internally (when the constructor is called).</p></td>
7363 </tr>
7364
7365
7366
7367 <tr>
7368
7369 <td class="name"><code>autoPlay</code></td>
7370
7371
7372 <td class="type">
7373
7374
7375<span class="param-type">boolean</span>
7376
7377
7378
7379
7380 </td>
7381
7382
7383 <td class="attributes">
7384
7385 &lt;optional><br>
7386
7387
7388
7389 </td>
7390
7391
7392
7393 <td class="default">
7394
7395 <a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile#DEFAULT_OPTIONS</code></a>.autoPlay
7396
7397 </td>
7398
7399
7400 <td class="description last"><p>Value which will be used as the &quot;autoPlay&quot; parameter when calling the <a href="CB_AudioFile.html#setAudioAPI"><code>CB_AudioFile#setAudioAPI</code></a> method internally (when the constructor is called).</p></td>
7401 </tr>
7402
7403
7404
7405 <tr>
7406
7407 <td class="name"><code>loop</code></td>
7408
7409
7410 <td class="type">
7411
7412
7413<span class="param-type">boolean</span>
7414
7415
7416
7417
7418 </td>
7419
7420
7421 <td class="attributes">
7422
7423 &lt;optional><br>
7424
7425
7426
7427 </td>
7428
7429
7430
7431 <td class="default">
7432
7433 <a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile#DEFAULT_OPTIONS</code></a>.loop
7434
7435 </td>
7436
7437
7438 <td class="description last"><p>Value that will be used for the <a href="CB_AudioFile.html#loop"><code>CB_AudioFile#loop</code></a> property.</p></td>
7439 </tr>
7440
7441
7442
7443 <tr>
7444
7445 <td class="name"><code>volume</code></td>
7446
7447
7448 <td class="type">
7449
7450
7451<span class="param-type">number</span>
7452
7453
7454
7455
7456 </td>
7457
7458
7459 <td class="attributes">
7460
7461 &lt;optional><br>
7462
7463
7464
7465 </td>
7466
7467
7468
7469 <td class="default">
7470
7471 <a href="CB_AudioFile.html#DEFAULT_OPTIONS"><code>CB_AudioFile#DEFAULT_OPTIONS</code></a>.volume
7472
7473 </td>
7474
7475
7476 <td class="description last"><p>The desired volume (from 0 to the maximum value, where the maximum value will be the returning value of calling the <a href="CB_Speaker.html#.getVolume"><code>CB_Speaker.getVolume</code></a> function 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 set to true or it will be 100 otherwise) that will be used for the <a href="CB_AudioFile.html#volume"><code>CB_AudioFile#volume</code></a> property.</p></td>
7477 </tr>
7478
7479
7480 </tbody>
7481</table>
7482</dl>
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513 <dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
7514 <dd class="tag-source">
7515 <ul class="dummy">
7516 <li>
7517 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html">CrossBase/audiovisual/audio/CB_AudioFile.js</a>,
7518 <a href="CrossBase_audiovisual_audio_CB_AudioFile.js.html#sunlight-1-line-186">line 186</a>
7519 </li>
7520 </ul>
7521 </dd>
7522
7523
7524
7525
7526
7527
7528
7529</dl>
7530
7531
7532
7533</dd>
7534
7535 </dl>
7536
7537
7538
7539</article>
7540
7541</section>
7542
7543
7544
7545
7546 </div>
7547 </div>
7548
7549 <div class="clearfix"></div>
7550
7551
7552 <div class="col-md-3">
7553 <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md" style="display:none; visibility:hidden;"></div>
7554 </div>
7555
7556
7557</div>
7558</div>
7559
7560
7561 <div class="modal fade" id="searchResults">
7562 <div class="modal-dialog">
7563 <div class="modal-content">
7564 <div class="modal-header">
7565 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
7566 <h4 class="modal-title">Search results</h4>
7567 </div>
7568 <div class="modal-body"></div>
7569 <div class="modal-footer">
7570 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
7571 </div>
7572 </div><!-- /.modal-content -->
7573 </div><!-- /.modal-dialog -->
7574 </div>
7575
7576
7577<footer>
7578
7579
7580 <span class="copyright">
7581 <span style="color:#000000">© <address style="display:inline; font-style:normal;"><a href="https://crossbrowdy.com/" target="_blank">CrossBrowdy</a> API documentation</address> by <a href="https://joanalbamaldonado.com/" target="_blank">Joan Alba Maldonado</a> - <a href="https://creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International</a><br />DocStrap Copyright © 2012-2015 The contributors to the JSDoc3 and DocStrap projects.</span>
7582 </span>
7583
7584<span class="jsdoc-message">
7585 Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
7586
7587 on Mon Feb 3rd 2020
7588
7589 using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
7590</span>
7591</footer>
7592
7593<script src="scripts/docstrap.lib.js"></script>
7594<script src="scripts/toc.js"></script>
7595
7596 <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script>
7597
7598
7599<script>
7600$( function () {
7601 $( "[id*='$']" ).each( function () {
7602 var $this = $( this );
7603
7604 $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) );
7605 } );
7606
7607 $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () {
7608 var $this = $( this );
7609
7610 var example = $this.find( "code" );
7611 exampleText = example.html();
7612 var lang = /{@lang (.*?)}/.exec( exampleText );
7613 if ( lang && lang[1] ) {
7614 exampleText = exampleText.replace( lang[0], "" );
7615 example.html( exampleText );
7616 lang = lang[1];
7617 } else {
7618 var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/);
7619 lang = langClassMatch ? langClassMatch[1] : "javascript";
7620 }
7621
7622 if ( lang ) {
7623
7624 $this
7625 .addClass( "sunlight-highlight-" + lang )
7626 .addClass( "linenums" )
7627 .html( example.html() );
7628
7629 }
7630 } );
7631
7632 Sunlight.highlightAll( {
7633 lineNumbers : true,
7634 showMenu : true,
7635 enableDoclinks : true
7636 } );
7637
7638 $.catchAnchorLinks( {
7639 navbarOffset: 10
7640 } );
7641 $( "#toc" ).toc( {
7642 anchorName : function ( i, heading, prefix ) {
7643 return $( heading ).attr( "id" ) || ( prefix + i );
7644 },
7645 selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4",
7646 showAndHide : false,
7647 smoothScrolling: true
7648 } );
7649
7650 $( "#main span[id^='toc']" ).addClass( "toc-shim" );
7651 $( '.dropdown-toggle' ).dropdown();
7652
7653 $( "table" ).each( function () {
7654 var $this = $( this );
7655 $this.addClass('table');
7656 } );
7657
7658} );
7659</script>
7660
7661
7662
7663<!--Navigation and Symbol Display-->
7664
7665
7666<!--Google Analytics-->
7667
7668
7669
7670 <script type="text/javascript">
7671 $(document).ready(function() {
7672 SearcherDisplay.init();
7673 });
7674 </script>
7675
7676
7677</body>
7678</html>
\No newline at end of file