CB-3496: Fixed streaming audio, this is pretty important for mobile spec

Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/1c9d76e6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/1c9d76e6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/1c9d76e6

Branch: refs/heads/2.8.x
Commit: 1c9d76e637a40ab9301ef307a410ecd33fae15e0
Parents: 01946dd
Author: Joe Bowser <[email protected]>
Authored: Fri May 24 11:29:28 2013 -0700
Committer: Joe Bowser <[email protected]>
Committed: Fri May 24 11:29:28 2013 -0700

----------------------------------------------------------------------
 framework/src/org/apache/cordova/AudioHandler.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/1c9d76e6/framework/src/org/apache/cordova/AudioHandler.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/AudioHandler.java 
b/framework/src/org/apache/cordova/AudioHandler.java
index 20c3c4e..ef20306 100644
--- a/framework/src/org/apache/cordova/AudioHandler.java
+++ b/framework/src/org/apache/cordova/AudioHandler.java
@@ -58,7 +58,10 @@ public class AudioHandler extends CordovaPlugin {
 
     public String getFilePath(String url, String source){
         DataResource dataResource = 
DataResource.initiateNewDataRequestForUri(url, this.webView.pluginManager, 
cordova, source);
-        return dataResource.getRealFile().getPath();
+        if(dataResource.getUri().getScheme().equals("http") || 
dataResource.getUri().getScheme().equals("https"))
+            return dataResource.getUri().toString();
+        else
+            return dataResource.getRealFile().getPath();
     }
 
     /**

Reply via email to