leandroavila74 Posted September 3, 2015 Share Posted September 3, 2015 how do I play mp3 audio in a mobile app? I tried using html5, put in a unimHtmlFrame1 content: <audio id = "player3" src = "files / music.mp3"> </ audio> and I called to play using the code: UniSession.SendResponse ('var ael = document.getElementById ("player3"); ael.load (); ael.play ()'); It works perfectly on the desktop, but not on mobile! also I tried using: unimUrlFrame1.URL: = 'http: //192.168.25.198: 8077 / m / files / music.mp3'; again it works perfectly on the desktop but not on mobile, but if I put in the android browser manually, it works! please help me if you can Leandro Ávila 1 Link to comment Share on other sites More sharing options...
Jose Abanto Posted September 16, 2016 Share Posted September 16, 2016 Do you found solution a this problem. Thanks Link to comment Share on other sites More sharing options...
radiocab Posted September 22, 2016 Share Posted September 22, 2016 In moblle version it works after user Action only - press button (for example) Link to comment Share on other sites More sharing options...
radiocab Posted April 18, 2017 Share Posted April 18, 2017 Audio demo example AudioDemo.zip 1 Link to comment Share on other sites More sharing options...
mhmda Posted April 18, 2017 Share Posted April 18, 2017 If you want to play the sound file pragmatically then this will not help you, because browser by default block playing sound using js, the solution is to use an atomic var and associate it to the first 'click' or 'tap' when and do: myPlay.play(); myPlay.pause(); And then whenever you need to play it use just: myPlay.play(); Link to comment Share on other sites More sharing options...
mehmet07 Posted April 18, 2017 Share Posted April 18, 2017 thanks Link to comment Share on other sites More sharing options...
leandroavila74 Posted September 19, 2017 Author Share Posted September 19, 2017 If you want to play the sound file pragmatically then this will not help you, because browser by default block playing sound using js, the solution is to use an atomic var and associate it to the first 'click' or 'tap' when and do: myPlay.play(); myPlay.pause(); And then whenever you need to play it use just: myPlay.play(); Hi, could you please provide an example of how to play a sound on the mobile through this technique, using a unimtimer for example Link to comment Share on other sites More sharing options...
asapltda Posted October 3, 2021 Share Posted October 3, 2021 Author Posted September 18, 2017 On 4/18/2017 at 10:39 AM, mohammad said: If you want to play the sound file pragmatically then this will not help you, because browser by default block playing sound using js, the solution is to use an atomic var and associate it to the first 'click' or 'tap' when and do: myPlay.play(); myPlay.pause(); And then whenever you need to play it use just: myPlay.play(); Hi, could you please provide an example of how to play a sound on the mobile through this technique, using a unimtimer for example Link to comment Share on other sites More sharing options...
Recommended Posts