You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2013/06/11 02:15:21 UTC

[06/32] android commit: CB-3496: Fixed streaming audio, this is pretty important for mobile spec

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/3.0.0
Commit: 1c9d76e637a40ab9301ef307a410ecd33fae15e0
Parents: 01946dd
Author: Joe Bowser <bo...@apache.org>
Authored: Fri May 24 11:29:28 2013 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri May 24 11:29:28 2013 -0700

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


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();
     }
 
     /**