UNPKG

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