You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ Thanks!
17
17
18
18
19
19
### Checklist
20
-
-[ ][ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to [email protected].
21
20
-[ ][Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
22
21
-[ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
23
22
-[ ] Added automated test coverage as appropriate for this change.
Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20Media%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
49
+
Report issues with this plugin on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22cordova-plugin-media%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC)
> Note: To allow playback with the screen locked or background audio you have to add `audio` to `UIBackgroundModes` in the `info.plist` file. See [Apple documentation](https://developer.apple.com/library/content/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH4-SW23). Also note that the audio has to be started before going to background.
363
362
364
363
-__order of file search__: When only a file name or simple path is
365
364
provided, iOS searches in the `www` directory for the file, then in
@@ -425,12 +424,12 @@ function recordAudio() {
425
424
426
425
// Pause Recording after 5 seconds
427
426
setTimeout(function() {
428
-
my_media.pauseRecord();
427
+
mediaRec.pauseRecord();
429
428
}, 5000);
430
429
431
430
// Resume Recording after 10 seconds
432
431
setTimeout(function() {
433
-
my_media.resumeRecord();
432
+
mediaRec.resumeRecord();
434
433
}, 10000);
435
434
}
436
435
```
@@ -459,10 +458,6 @@ setTimeout(function() {
459
458
}, 5000);
460
459
```
461
460
462
-
### BlackBerry 10 Quirks
463
-
464
-
- Not supported on BlackBerry OS 5 devices.
465
-
466
461
## media.setVolume
467
462
468
463
Set the volume for an audio file.
@@ -520,7 +515,6 @@ Starts recording an audio file.
520
515
521
516
- Android
522
517
- iOS
523
-
- Windows Phone 7 and 8
524
518
- Windows
525
519
526
520
### Quick Example
@@ -548,19 +542,33 @@ function recordAudio() {
548
542
549
543
### Android Quirks
550
544
551
-
- Android devices record audio in Adaptive Multi-Rate format. The specified file should end with a _.amr_ extension.
545
+
- Android devices record audio in AAC ADTS file format. The specified file should end with a _.aac_ extension.
552
546
- The hardware volume controls are wired up to the media volume while any Media objects are alive. Once the last created Media object has `release()` called on it, the volume controls revert to their default behaviour. The controls are also reset on page navigation, as this releases all Media objects.
553
547
554
548
### iOS Quirks
555
549
556
-
- iOS only records to files of type _.wav_ and returns an error if the file name extension is not correct.
550
+
- iOS only records to files of type _.wav_ and _.m4a_ and returns an error if the file name extension is not correct.
557
551
558
552
- If a full path is not provided, the recording is placed in the application's `documents/tmp` directory. This can be accessed via the `File` API using `LocalFileSystem.TEMPORARY`. Any subdirectory specified at record time must already exist.
559
553
560
554
- Files can be recorded and played back using the documents URI:
561
555
562
556
var myMedia = new Media("documents://beer.mp3")
563
557
558
+
- Since iOS 10 it's mandatory to provide an usage description in the `info.plist` if trying to access privacy-sensitive data. When the system prompts the user to allow access, this usage description string will displayed as part of the permission dialog box, but if you didn't provide the usage description, the app will crash before showing the dialog. Also, Apple will reject apps that access private data but don't provide an usage description.
559
+
560
+
This plugins requires the following usage description:
561
+
562
+
*`NSMicrophoneUsageDescription` describes the reason that the app accesses the user's microphone.
563
+
564
+
To add this entry into the `info.plist`, you can use the `edit-config` tag in the `config.xml` like this:
<string>need microphone access to record sounds</string>
569
+
</edit-config>
570
+
```
571
+
564
572
### Windows Quirks
565
573
566
574
- Windows devices can use MP3, M4A and WMA formats for recorded audio. However in most cases it is not possible to use MP3 for audio recording on _Windows Phone 8.1_ devices, because an MP3 encoder is [not shipped with Windows Phone](https://msdn.microsoft.com/en-us/library/windows/apps/windows.media.mediaproperties.mediaencodingprofile.createmp3.aspx).
@@ -569,10 +577,6 @@ function recordAudio() {
569
577
570
578
- Any subdirectory specified at record time must already exist.
571
579
572
-
### Tizen Quirks
573
-
574
-
- Not supported on Tizen devices.
575
-
576
580
## media.stop
577
581
578
582
Stops playing an audio file.
@@ -617,7 +621,6 @@ Stops recording an audio file.
0 commit comments