You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergio Talente (JIRA)" <ji...@apache.org> on 2017/04/27 16:58:04 UTC
[jira] [Comment Edited] (CB-3835) AudioPlayer - Playing audio -
Renaming error
[ https://issues.apache.org/jira/browse/CB-3835?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987020#comment-15987020 ]
Sergio Talente edited comment on CB-3835 at 4/27/17 4:57 PM:
-------------------------------------------------------------
The only way to get it working is to comment out the code in "generateTempFile()" as follows:
{code:title=AudioPlayer.java - generateTempFile()|borderStyle=solid}
private String generateTempFile() {
String tempFileName = null;
/*
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
tempFileName = Environment.getExternalStorageDirectory().getAbsolutePath() + "/tmprecording-" + System.currentTimeMillis() + ".3gp";
} else {
*/ tempFileName = "/data/data/" + handler.cordova.getActivity().getPackageName() + "/cache/tmprecording-" + System.currentTimeMillis() + ".3gp";
// }
return tempFileName;
}
{code}
but obviously an official fix would be really welcome, I got mad figuring out why my Ionic project wasn't working...
was (Author: sertal70):
The only way to get it working is to comment out the code in "generateTempFile()" as follows:
{code:title=generateTempFile()|borderStyle=solid}
private String generateTempFile() {
String tempFileName = null;
/*
if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
tempFileName = Environment.getExternalStorageDirectory().getAbsolutePath() + "/tmprecording-" + System.currentTimeMillis() + ".3gp";
} else {
*/ tempFileName = "/data/data/" + handler.cordova.getActivity().getPackageName() + "/cache/tmprecording-" + System.currentTimeMillis() + ".3gp";
// }
return tempFileName;
}
{code}
but obviously an official fix would be really welcome, I got mad figuring out why my Ionic project wasn't working...
> AudioPlayer - Playing audio - Renaming error
> --------------------------------------------
>
> Key: CB-3835
> URL: https://issues.apache.org/jira/browse/CB-3835
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Media
> Affects Versions: 2.7.0, 2.8.0, 2.9.0
> Environment: PhoneGap + jQuery Mobile 1.3.x + Android 2.3.x and higher
> Reporter: Joram Teusink
> Priority: Minor
> Labels: audioplayer, media, tmprecording.3gp
>
> When playing a media file (audio) from a url with AudioPlayer I get the following error in the console (logcat):
> - AudioPlayer : Send a onStatus update for the new seek
> - AudioPlayer : renaming /storage/emulated/0/tmprecording.3gp to /storage/emulated/0/http://...<rest of url>
> - AudioPlayer : FAILED renaming /storage/emulated/0/tmprecording.3gp to /storage/emulated/0/http://...<rest of url>
> The code is the same as in de demos in the PhoneGap docs.
> No errors in the app and playback works fine. And I noticed that in the root of the sdcard a tmprecording.3gp file was created. But did not see that one coming back after deletion.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org