leandroavila74 Posted September 3, 2015 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
Jose Abanto Posted September 16, 2016 Posted September 16, 2016 Do you found solution a this problem. Thanks
radiocab Posted September 22, 2016 Posted September 22, 2016 In moblle version it works after user Action only - press button (for example)
mhmda Posted April 18, 2017 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();
leandroavila74 Posted September 19, 2017 Author 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
asapltda Posted October 3, 2021 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
Recommended Posts