mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-26 20:33:07 +08:00
CB-1206: file uri not handled correctly by Media Player
This commit is contained in:
parent
5016253922
commit
9bac59b952
@ -66,13 +66,13 @@ public class AudioHandler extends Plugin {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
if (action.equals("startRecordingAudio")) {
|
if (action.equals("startRecordingAudio")) {
|
||||||
this.startRecordingAudio(args.getString(0), args.getString(1));
|
this.startRecordingAudio(args.getString(0), FileUtils.stripFileProtocol(args.getString(1)));
|
||||||
}
|
}
|
||||||
else if (action.equals("stopRecordingAudio")) {
|
else if (action.equals("stopRecordingAudio")) {
|
||||||
this.stopRecordingAudio(args.getString(0));
|
this.stopRecordingAudio(args.getString(0));
|
||||||
}
|
}
|
||||||
else if (action.equals("startPlayingAudio")) {
|
else if (action.equals("startPlayingAudio")) {
|
||||||
this.startPlayingAudio(args.getString(0), args.getString(1));
|
this.startPlayingAudio(args.getString(0), FileUtils.stripFileProtocol(args.getString(1)));
|
||||||
}
|
}
|
||||||
else if (action.equals("seekToAudio")) {
|
else if (action.equals("seekToAudio")) {
|
||||||
this.seekToAudio(args.getString(0), args.getInt(1));
|
this.seekToAudio(args.getString(0), args.getInt(1));
|
||||||
@ -98,7 +98,7 @@ public class AudioHandler extends Plugin {
|
|||||||
}
|
}
|
||||||
else if (action.equals("create")) {
|
else if (action.equals("create")) {
|
||||||
String id = args.getString(0);
|
String id = args.getString(0);
|
||||||
String src = args.getString(1);
|
String src = FileUtils.stripFileProtocol(args.getString(1));
|
||||||
AudioPlayer audio = new AudioPlayer(this, id, src);
|
AudioPlayer audio = new AudioPlayer(this, id, src);
|
||||||
this.players.put(id, audio);
|
this.players.put(id, audio);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user