@capgo/native-audio 6.3.3 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/docs.json CHANGED
@@ -16,8 +16,24 @@
16
16
  }
17
17
  ],
18
18
  "returns": "Promise<void>",
19
- "tags": [],
20
- "docs": "",
19
+ "tags": [
20
+ {
21
+ "name": "since",
22
+ "text": "5.0.0"
23
+ },
24
+ {
25
+ "name": "param",
26
+ "text": "option"
27
+ },
28
+ {
29
+ "name": "link",
30
+ "text": "ConfigureOptions}"
31
+ },
32
+ {
33
+ "name": "returns"
34
+ }
35
+ ],
36
+ "docs": "Configure the audio player",
21
37
  "complexTypes": [
22
38
  "ConfigureOptions"
23
39
  ],
@@ -34,13 +50,63 @@
34
50
  }
35
51
  ],
36
52
  "returns": "Promise<void>",
37
- "tags": [],
38
- "docs": "",
53
+ "tags": [
54
+ {
55
+ "name": "since",
56
+ "text": "5.0.0"
57
+ },
58
+ {
59
+ "name": "param",
60
+ "text": "option"
61
+ },
62
+ {
63
+ "name": "link",
64
+ "text": "PreloadOptions}"
65
+ },
66
+ {
67
+ "name": "returns"
68
+ }
69
+ ],
70
+ "docs": "Load an audio file",
39
71
  "complexTypes": [
40
72
  "PreloadOptions"
41
73
  ],
42
74
  "slug": "preload"
43
75
  },
76
+ {
77
+ "name": "isPreloaded",
78
+ "signature": "(options: PreloadOptions) => Promise<boolean>",
79
+ "parameters": [
80
+ {
81
+ "name": "options",
82
+ "docs": "",
83
+ "type": "PreloadOptions"
84
+ }
85
+ ],
86
+ "returns": "Promise<boolean>",
87
+ "tags": [
88
+ {
89
+ "name": "since",
90
+ "text": "6.1.0"
91
+ },
92
+ {
93
+ "name": "param",
94
+ "text": "option"
95
+ },
96
+ {
97
+ "name": "link",
98
+ "text": "Assets}"
99
+ },
100
+ {
101
+ "name": "returns"
102
+ }
103
+ ],
104
+ "docs": "Check if an audio file is preloaded",
105
+ "complexTypes": [
106
+ "PreloadOptions"
107
+ ],
108
+ "slug": "ispreloaded"
109
+ },
44
110
  {
45
111
  "name": "play",
46
112
  "signature": "(options: { assetId: string; time?: number; delay?: number; }) => Promise<void>",
@@ -52,89 +118,195 @@
52
118
  }
53
119
  ],
54
120
  "returns": "Promise<void>",
55
- "tags": [],
56
- "docs": "",
121
+ "tags": [
122
+ {
123
+ "name": "since",
124
+ "text": "5.0.0"
125
+ },
126
+ {
127
+ "name": "param",
128
+ "text": "option"
129
+ },
130
+ {
131
+ "name": "link",
132
+ "text": "PlayOptions}"
133
+ },
134
+ {
135
+ "name": "returns"
136
+ }
137
+ ],
138
+ "docs": "Play an audio file",
57
139
  "complexTypes": [],
58
140
  "slug": "play"
59
141
  },
60
142
  {
61
143
  "name": "pause",
62
- "signature": "(options: { assetId: string; }) => Promise<void>",
144
+ "signature": "(options: Assets) => Promise<void>",
63
145
  "parameters": [
64
146
  {
65
147
  "name": "options",
66
148
  "docs": "",
67
- "type": "{ assetId: string; }"
149
+ "type": "Assets"
68
150
  }
69
151
  ],
70
152
  "returns": "Promise<void>",
71
- "tags": [],
72
- "docs": "",
73
- "complexTypes": [],
153
+ "tags": [
154
+ {
155
+ "name": "since",
156
+ "text": "5.0.0"
157
+ },
158
+ {
159
+ "name": "param",
160
+ "text": "option"
161
+ },
162
+ {
163
+ "name": "link",
164
+ "text": "Assets}"
165
+ },
166
+ {
167
+ "name": "returns"
168
+ }
169
+ ],
170
+ "docs": "Pause an audio file",
171
+ "complexTypes": [
172
+ "Assets"
173
+ ],
74
174
  "slug": "pause"
75
175
  },
76
176
  {
77
177
  "name": "resume",
78
- "signature": "(options: { assetId: string; }) => Promise<void>",
178
+ "signature": "(options: Assets) => Promise<void>",
79
179
  "parameters": [
80
180
  {
81
181
  "name": "options",
82
182
  "docs": "",
83
- "type": "{ assetId: string; }"
183
+ "type": "Assets"
84
184
  }
85
185
  ],
86
186
  "returns": "Promise<void>",
87
- "tags": [],
88
- "docs": "",
89
- "complexTypes": [],
187
+ "tags": [
188
+ {
189
+ "name": "since",
190
+ "text": "5.0.0"
191
+ },
192
+ {
193
+ "name": "param",
194
+ "text": "option"
195
+ },
196
+ {
197
+ "name": "link",
198
+ "text": "Assets}"
199
+ },
200
+ {
201
+ "name": "returns"
202
+ }
203
+ ],
204
+ "docs": "Resume an audio file",
205
+ "complexTypes": [
206
+ "Assets"
207
+ ],
90
208
  "slug": "resume"
91
209
  },
92
210
  {
93
211
  "name": "loop",
94
- "signature": "(options: { assetId: string; }) => Promise<void>",
212
+ "signature": "(options: Assets) => Promise<void>",
95
213
  "parameters": [
96
214
  {
97
215
  "name": "options",
98
216
  "docs": "",
99
- "type": "{ assetId: string; }"
217
+ "type": "Assets"
100
218
  }
101
219
  ],
102
220
  "returns": "Promise<void>",
103
- "tags": [],
104
- "docs": "",
105
- "complexTypes": [],
221
+ "tags": [
222
+ {
223
+ "name": "since",
224
+ "text": "5.0.0"
225
+ },
226
+ {
227
+ "name": "param",
228
+ "text": "option"
229
+ },
230
+ {
231
+ "name": "link",
232
+ "text": "Assets}"
233
+ },
234
+ {
235
+ "name": "returns"
236
+ }
237
+ ],
238
+ "docs": "Stop an audio file",
239
+ "complexTypes": [
240
+ "Assets"
241
+ ],
106
242
  "slug": "loop"
107
243
  },
108
244
  {
109
245
  "name": "stop",
110
- "signature": "(options: { assetId: string; }) => Promise<void>",
246
+ "signature": "(options: Assets) => Promise<void>",
111
247
  "parameters": [
112
248
  {
113
249
  "name": "options",
114
250
  "docs": "",
115
- "type": "{ assetId: string; }"
251
+ "type": "Assets"
116
252
  }
117
253
  ],
118
254
  "returns": "Promise<void>",
119
- "tags": [],
120
- "docs": "",
121
- "complexTypes": [],
255
+ "tags": [
256
+ {
257
+ "name": "since",
258
+ "text": "5.0.0"
259
+ },
260
+ {
261
+ "name": "param",
262
+ "text": "option"
263
+ },
264
+ {
265
+ "name": "link",
266
+ "text": "Assets}"
267
+ },
268
+ {
269
+ "name": "returns"
270
+ }
271
+ ],
272
+ "docs": "Stop an audio file",
273
+ "complexTypes": [
274
+ "Assets"
275
+ ],
122
276
  "slug": "stop"
123
277
  },
124
278
  {
125
279
  "name": "unload",
126
- "signature": "(options: { assetId: string; }) => Promise<void>",
280
+ "signature": "(options: Assets) => Promise<void>",
127
281
  "parameters": [
128
282
  {
129
283
  "name": "options",
130
284
  "docs": "",
131
- "type": "{ assetId: string; }"
285
+ "type": "Assets"
132
286
  }
133
287
  ],
134
288
  "returns": "Promise<void>",
135
- "tags": [],
136
- "docs": "",
137
- "complexTypes": [],
289
+ "tags": [
290
+ {
291
+ "name": "since",
292
+ "text": "5.0.0"
293
+ },
294
+ {
295
+ "name": "param",
296
+ "text": "option"
297
+ },
298
+ {
299
+ "name": "link",
300
+ "text": "Assets}"
301
+ },
302
+ {
303
+ "name": "returns"
304
+ }
305
+ ],
306
+ "docs": "Unload an audio file",
307
+ "complexTypes": [
308
+ "Assets"
309
+ ],
138
310
  "slug": "unload"
139
311
  },
140
312
  {
@@ -148,8 +320,24 @@
148
320
  }
149
321
  ],
150
322
  "returns": "Promise<void>",
151
- "tags": [],
152
- "docs": "",
323
+ "tags": [
324
+ {
325
+ "name": "since",
326
+ "text": "5.0.0"
327
+ },
328
+ {
329
+ "name": "param",
330
+ "text": "option"
331
+ },
332
+ {
333
+ "name": "link",
334
+ "text": "AssetVolume}"
335
+ },
336
+ {
337
+ "name": "returns"
338
+ }
339
+ ],
340
+ "docs": "Set the volume of an audio file",
153
341
  "complexTypes": [],
154
342
  "slug": "setvolume"
155
343
  },
@@ -164,8 +352,24 @@
164
352
  }
165
353
  ],
166
354
  "returns": "Promise<void>",
167
- "tags": [],
168
- "docs": "",
355
+ "tags": [
356
+ {
357
+ "name": "since",
358
+ "text": "5.0.0"
359
+ },
360
+ {
361
+ "name": "param",
362
+ "text": "option"
363
+ },
364
+ {
365
+ "name": "link",
366
+ "text": "AssetPlayOptions}"
367
+ },
368
+ {
369
+ "name": "returns"
370
+ }
371
+ ],
372
+ "docs": "Set the rate of an audio file",
169
373
  "complexTypes": [],
170
374
  "slug": "setrate"
171
375
  },
@@ -180,41 +384,93 @@
180
384
  }
181
385
  ],
182
386
  "returns": "Promise<{ currentTime: number; }>",
183
- "tags": [],
184
- "docs": "",
387
+ "tags": [
388
+ {
389
+ "name": "since",
390
+ "text": "5.0.0"
391
+ },
392
+ {
393
+ "name": "param",
394
+ "text": "option"
395
+ },
396
+ {
397
+ "name": "link",
398
+ "text": "AssetPlayOptions}"
399
+ },
400
+ {
401
+ "name": "returns"
402
+ }
403
+ ],
404
+ "docs": "Set the current time of an audio file",
185
405
  "complexTypes": [],
186
406
  "slug": "getcurrenttime"
187
407
  },
188
408
  {
189
409
  "name": "getDuration",
190
- "signature": "(options: { assetId: string; }) => Promise<{ duration: number; }>",
410
+ "signature": "(options: Assets) => Promise<{ duration: number; }>",
191
411
  "parameters": [
192
412
  {
193
413
  "name": "options",
194
414
  "docs": "",
195
- "type": "{ assetId: string; }"
415
+ "type": "Assets"
196
416
  }
197
417
  ],
198
418
  "returns": "Promise<{ duration: number; }>",
199
- "tags": [],
200
- "docs": "",
201
- "complexTypes": [],
419
+ "tags": [
420
+ {
421
+ "name": "since",
422
+ "text": "5.0.0"
423
+ },
424
+ {
425
+ "name": "param",
426
+ "text": "option"
427
+ },
428
+ {
429
+ "name": "link",
430
+ "text": "AssetPlayOptions}"
431
+ },
432
+ {
433
+ "name": "returns"
434
+ }
435
+ ],
436
+ "docs": "Get the duration of an audio file",
437
+ "complexTypes": [
438
+ "Assets"
439
+ ],
202
440
  "slug": "getduration"
203
441
  },
204
442
  {
205
443
  "name": "isPlaying",
206
- "signature": "(options: { assetId: string; }) => Promise<{ isPlaying: boolean; }>",
444
+ "signature": "(options: Assets) => Promise<{ isPlaying: boolean; }>",
207
445
  "parameters": [
208
446
  {
209
447
  "name": "options",
210
448
  "docs": "",
211
- "type": "{ assetId: string; }"
449
+ "type": "Assets"
212
450
  }
213
451
  ],
214
452
  "returns": "Promise<{ isPlaying: boolean; }>",
215
- "tags": [],
216
- "docs": "",
217
- "complexTypes": [],
453
+ "tags": [
454
+ {
455
+ "name": "since",
456
+ "text": "5.0.0"
457
+ },
458
+ {
459
+ "name": "param",
460
+ "text": "option"
461
+ },
462
+ {
463
+ "name": "link",
464
+ "text": "AssetPlayOptions}"
465
+ },
466
+ {
467
+ "name": "returns"
468
+ }
469
+ ],
470
+ "docs": "Check if an audio file is playing",
471
+ "complexTypes": [
472
+ "Assets"
473
+ ],
218
474
  "slug": "isplaying"
219
475
  },
220
476
  {
@@ -236,7 +492,7 @@
236
492
  "tags": [
237
493
  {
238
494
  "name": "since",
239
- "text": "5.0.0"
495
+ "text": "5.0.0\nreturn {@link CompletedEvent}"
240
496
  }
241
497
  ],
242
498
  "docs": "Listen for complete event",
@@ -260,21 +516,21 @@
260
516
  {
261
517
  "name": "fade",
262
518
  "tags": [],
263
- "docs": "",
519
+ "docs": "Play the audio with Fade effect, only available for IOS",
264
520
  "complexTypes": [],
265
521
  "type": "boolean | undefined"
266
522
  },
267
523
  {
268
524
  "name": "focus",
269
525
  "tags": [],
270
- "docs": "",
526
+ "docs": "focus the audio with Audio Focus",
271
527
  "complexTypes": [],
272
528
  "type": "boolean | undefined"
273
529
  },
274
530
  {
275
531
  "name": "background",
276
532
  "tags": [],
277
- "docs": "",
533
+ "docs": "Play the audio in the background",
278
534
  "complexTypes": [],
279
535
  "type": "boolean | undefined"
280
536
  }
@@ -290,40 +546,56 @@
290
546
  {
291
547
  "name": "assetPath",
292
548
  "tags": [],
293
- "docs": "",
549
+ "docs": "Path to the audio file, relative path of the file, absolute url (file://) or remote url (https://)",
294
550
  "complexTypes": [],
295
551
  "type": "string"
296
552
  },
297
553
  {
298
554
  "name": "assetId",
299
555
  "tags": [],
300
- "docs": "",
556
+ "docs": "Asset Id, unique identifier of the file",
301
557
  "complexTypes": [],
302
558
  "type": "string"
303
559
  },
304
560
  {
305
561
  "name": "volume",
306
562
  "tags": [],
307
- "docs": "",
563
+ "docs": "Volume of the audio, between 0.1 and 1.0",
308
564
  "complexTypes": [],
309
565
  "type": "number | undefined"
310
566
  },
311
567
  {
312
568
  "name": "audioChannelNum",
313
569
  "tags": [],
314
- "docs": "",
570
+ "docs": "Audio channel number, default is 1",
315
571
  "complexTypes": [],
316
572
  "type": "number | undefined"
317
573
  },
318
574
  {
319
575
  "name": "isUrl",
320
576
  "tags": [],
321
- "docs": "",
577
+ "docs": "Is the audio file a URL, pass true if assetPath is a `file://` url",
322
578
  "complexTypes": [],
323
579
  "type": "boolean | undefined"
324
580
  }
325
581
  ]
326
582
  },
583
+ {
584
+ "name": "Assets",
585
+ "slug": "assets",
586
+ "docs": "",
587
+ "tags": [],
588
+ "methods": [],
589
+ "properties": [
590
+ {
591
+ "name": "assetId",
592
+ "tags": [],
593
+ "docs": "Asset Id, unique identifier of the file",
594
+ "complexTypes": [],
595
+ "type": "string"
596
+ }
597
+ ]
598
+ },
327
599
  {
328
600
  "name": "PluginListenerHandle",
329
601
  "slug": "pluginlistenerhandle",