facebook

Play audio when screen is locked

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #346218 Reply

    EmilioZorzi
    Participant

    I tried PhoneGap code below to continue the audio in the background, but with no results.

    anyone has ideas to make it work?

    
    var my_media = new Media('http://....mp3',
            // success callback
            function() {
                console.log("playAudio():Audio Success");
            },
            // error callback
            function(err) {
                console.log("playAudio():Audio Error: "+err);
        });
    
        // Play audio
        my_media.play({ playAudioWhenScreenIsLocked : true });
    
    #346220 Reply

    Brandon
    Member

    Mobione does not support running in the background so I don’t believe it will work.

    #346222 Reply

    EmilioZorzi
    Participant

    thanks anyway CincyPlanet

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: Play audio when screen is locked

You must be logged in to post in the forum log in