Jump to content


Photo

play mp3 mobile application

mp3 mobile audio html5

  • Please log in to reply
6 replies to this topic

#1 Leandro Avila

Leandro Avila

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 102 posts

Posted 03 September 2015 - 08:34 PM

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

#2 Jose Abanto

Jose Abanto

    Member

  • Members
  • PipPip
  • 21 posts

Posted 16 September 2016 - 11:28 AM

Do you found solution a this problem. Thanks 


  • 0

#3 Yuriy O.

Yuriy O.

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 50 posts

Posted 22 September 2016 - 11:30 AM

In moblle version it works after user Action only - press button (for example)


  • 0

#4 Yuriy O.

Yuriy O.

    Active Member

  • uniGUI Subscriber
  • PipPipPip
  • 50 posts

Posted 18 April 2017 - 02:00 PM

Audio demo example

Attached Files


  • 1

#5 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 673 posts
  • LocationKufur Kassem, Palestine

Posted 18 April 2017 - 03:39 PM

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(); 

  • 0

#6 _Mehmet_

_Mehmet_

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 486 posts
  • LocationAntalya / Turkey

Posted 18 April 2017 - 04:28 PM

thanks


  • 0

#7 Leandro Avila

Leandro Avila

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 102 posts

Posted 19 September 2017 - 12:36 AM

 

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


  • 0





Also tagged with one or more of these keywords: mp3, mobile, audio, html5

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users