Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.0
-
None
-
iOS 9.3.1
Description
The line:
var myMedia = new Media("documents://hello.wav", function() { console.log("success"); }, function(er) { console.log(er); } );
results in the error "Cannot use audio file from resource 'documents:hello.wav'", when "hello.wav" does not exist. The created Media object is usable (I can record and play back), but the error means the constructor's success callback never gets called. Also happens with variations of the src URI using "file" and "cdvfile".
This is caused by a change to the validation parameter from NO to YES in commit e5b663ac951b2d8cb2e5e470d2c7072aa56cf779 on March 2nd.
Attachments
Issue Links
Activity
GitHub user alsorokin opened a pull request:
https://github.com/apache/cordova-plugin-media/pull/112
CB-11380 (ios) Fixed an unexpected error callback when initializing M…
-
-
- Platforms affected
iOS
- Platforms affected
-
-
-
- What does this PR do?
Eliminates an unexpected error callback when initializing Media with the file that doesn't exist:
https://issues.apache.org/jira/browse/CB-11380
- What does this PR do?
-
-
-
- What testing has been done on this change?
Tested manually on iOS 8.1
- What testing has been done on this change?
-
-
-
- Checklist
-
- [x] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secretary@apache.org.
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] 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.
- [ ] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/alsorokin/cordova-plugin-media CB-11380
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-media/pull/112.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #112
commit 0b4c67e524ee7d4b411d4527bb9347442cd8ea16
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Date: 2016-08-25T11:21:41Z
CB-11380 (ios) Fixed an unexpected error callback when initializing Media with file that doesn't exist
Github user alsorokin commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/112
@shazron could you please help review this?
This fixes a regression caused by https://github.com/apache/cordova-plugin-media/pull/85
Github user cordova-qa commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/112
Cordova CI Build has completed successfully.
*Commit* - [Link](https://github.com/apache/cordova-plugin-media/pull/112/commits/0b4c67e524ee7d4b411d4527bb9347442cd8ea16)
*Dashboard* - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/68/)
Github user shazron commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/112
LGTM đź‘Ť
Github user cordova-qa commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/112
Cordova CI Build has completed successfully.
*Commit* - [Link](https://github.com/apache/cordova-plugin-media/pull/112/commits/910d3c798f77c63165be508125ec313e4104b541)
*Dashboard* - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/71/)
Commit 910d3c798f77c63165be508125ec313e4104b541 in cordova-plugin-media's branch refs/heads/master from alsorokin
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-media.git;h=910d3c7 ]
CB-11380 (ios) Fixed an unexpected error callback when initializing Media with file that doesn't exist
Commit 42b279b911c4b20689290f55ecb849905d3f1673 in cordova-plugin-media's branch refs/heads/master from alsorokin
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-media.git;h=42b279b ]
CB-11380 (ios) Updated modified method signature in the .h file
GitHub user alsorokin opened a pull request:
https://github.com/apache/cordova-plugin-media/pull/114
CB-11380 (ios) Overloaded audioFileForResource method instead of modi…
-
-
- Platforms affected
ios
- Platforms affected
-
-
-
- What does this PR do?
https://issues.apache.org/jira/browse/CB-11380
Overloads the audioFileForResource method instead of modifying its signature because otherwise it would be an API breakage.
- What does this PR do?
-
-
-
- What testing has been done on this change?
No testing whatsoever: I don't have an access to any iOS device till tomorrow. Creating this PR to let CI test the changes.
- What testing has been done on this change?
-
-
-
- Checklist
-
- [x] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and submitted to secretary@apache.org.
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] 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.
- [x] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/alsorokin/cordova-plugin-media CB-11380
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-media/pull/114.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #114
commit 9f0c2e3e6bc1d76dcb0759f2aaf9e4137e391b09
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Date: 2016-08-26T18:41:51Z
CB-11380 (ios) Overloaded audioFileForResource method instead of modifying its signature
Github user cordova-qa commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/114
Cordova CI Build has completed successfully.
*Commit* - [Link](https://github.com/apache/cordova-plugin-media/pull/114/commits/9f0c2e3e6bc1d76dcb0759f2aaf9e4137e391b09)
*Dashboard* - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/75/)
Github user shazron commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/114
LGTM đź‘Ť
Tested locally.
Github user alsorokin commented on the issue:
https://github.com/apache/cordova-plugin-media/pull/114
Thanks Shazron!
Commit 0405a2ee2bfc7520e121e50483b2b5310e5e66bd in cordova-plugin-media's branch refs/heads/master from alsorokin
[ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-media.git;h=0405a2e ]
CB-11380 (ios) Overloaded audioFileForResource method instead of modifying its signature
Unfortunately I haven't been able to reproduce this issue neither on iPhone 6 Plus with iOS 9.3.1 nor on iPad 2 with iOS 8.1
jkeating can you please use the plugin from master branch here: https://github.com/apache/cordova-plugin-media/ and tell us if the issue persists?