vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Native HTML5 Audio in Mobile? (https://vborg.vbsupport.ru/showthread.php?t=312863)

Chadi 07-09-2014 07:27 PM

Native HTML5 Audio in Mobile?
 
I'm using the HTML5 native audio code which works fine in desktop browsers, but does not in mobile browsers. It simply says "cannot play audio file" in mobile. Any workarounds for this?

Example:
http://www.talkjesus.com/sermons/492...ch-sermon.html

Code
Code:

<audio controls="">
  <source src="http://s2.cpl.delvenetworks.com/media/781563d6695d48a496254cad9c2ea179/505a0af13d85439cb2505723c62fa9d8/2635cde8fb464adbbd32f42479f1092f/itm_pgm_2014_07_07.mp3" type="audio/ogg">
</audio>


tbworld 07-09-2014 07:34 PM

Quote:

Originally Posted by Chadi (Post 2506143)
I'm using the HTML5 native audio code which works fine in desktop browsers, but does not in mobile browsers. It simply says "cannot play audio file" in mobile. Any workarounds for this?

Example:
http://www.talkjesus.com/sermons/492...ch-sermon.html

Code
Code:

<audio controls="">
  <source src="http://s2.cpl.delvenetworks.com/media/781563d6695d48a496254cad9c2ea179/505a0af13d85439cb2505723c62fa9d8/2635cde8fb464adbbd32f42479f1092f/itm_pgm_2014_07_07.mp3" type="audio/ogg">
</audio>


You need to play the audio on a user event. (Ex: click). Autoplay, in the past, does not work on IOS and Android phones.

Chadi 07-09-2014 07:45 PM

Quote:

Originally Posted by tbworld (Post 2506144)
You need to play the audio on a user event. (Ex: click). Autoplay, in the past, does not work on IOS and Android phones.

Thanks, but I'm not sure how to do that exactly. Could you elaborate?

Dave 07-10-2014 12:46 PM

Quote:

Originally Posted by Chadi (Post 2506145)
Thanks, but I'm not sure how to do that exactly. Could you elaborate?

http://stackoverflow.com/a/15317771/1961685

That should help you out. :)

tbworld 07-10-2014 02:46 PM

Quote:

Originally Posted by Chadi (Post 2506145)
Thanks, but I'm not sure how to do that exactly. Could you elaborate?

Establishing audio playback among the different phones is quirky and requires a JavaScript solution along with HTML5. I would have to understand more of what you are doing to make a suggestion. You should start by researching this out on Google, then re-ask here when you have a better understanding of the issues.

Unfortunately, it is not as easy as just posting a bit of code. There are several 'mobile media device libraries' out there, that I would review to get your bearing. At the time I was working with them they were pretty rough, but that was then, hopefully they have improved. I ended up just kludging together my own -- it was more about testing and tweaking for each device then it was difficult programming. This is something you will probably still have to do for your setup.

Anyway, when I have more time, I will see if I can find you a 'mobile media device library', I am sure others around here would be interested.

If the library does not have exceptions for IOS(3,4) (5,6) 7, 8. then I would move on as there are quirks in each version, and that is only for the IOS side.


All times are GMT. The time now is 10:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01195 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete