cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nagaraj007 <...@git.apache.org>
Subject [GitHub] cordova-plugin-media pull request #136: mediaFile.play(); its not working
Date Mon, 13 Mar 2017 18:48:40 GMT
GitHub user Nagaraj007 opened a pull request:

    https://github.com/apache/cordova-plugin-media/pull/136

     mediaFile.play(); its not working 

    
    Below is my code which i implemented  but its not _working,I am getting the local url
of my recorded file and passing it to playRecord function,But when i call on playRecord its
not working,need help
    
    var url
     function OnFileEntry(file) {
                url = file.localURL
                alert(cdvfile://localhost/persistent/myrecording/file_name.m4a);
                voicefileName = file.name;
                alert(voicefileName);
                var reader = new FileReader();
                reader.onloadend = function (evt) {
                                };
                reader.readAsDataURL(file);
            }
    
         
    function playRecord() {
                alert(cdvfile://localhost/persistent/myrecording/file_name.m4a);
                var mediaFile = new Media(url,
                    function () {
                        alert("playAudio():Audio Success");
    
                    },
                    function (err) {console.log("playAudio():Audio Error: " + err);
                    });
                // Play audio
                mediaFile.play();
            }


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/cordova-plugin-media master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-media/pull/136.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 #136
    
----
commit a66cf93e9d15e45207fc52b60969f9d872e106c8
Author: Steve Gill <stevengill97@gmail.com>
Date:   2017-03-01T01:41:27Z

    CB-12519 Updated version and RELEASENOTES.md for release 3.0.0

commit 8c2de08152a7a8fb896bbb0a782abec730241bcb
Author: Steve Gill <stevengill97@gmail.com>
Date:   2017-03-01T01:56:00Z

    Set VERSION to 3.0.1-dev (via coho)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message