Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2014, 07:27 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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>
Reply With Quote
  #2  
Old 07-09-2014, 07:34 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chadi View Post
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.
Reply With Quote
  #3  
Old 07-09-2014, 07:45 PM
Chadi's Avatar
Chadi Chadi is offline
 
Join Date: May 2004
Location: USA
Posts: 2,043
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tbworld View Post
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?
Reply With Quote
  #4  
Old 07-10-2014, 12:46 PM
Dave Dave is offline
 
Join Date: May 2010
Posts: 2,583
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chadi View Post
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.
Reply With Quote
  #5  
Old 07-10-2014, 02:46 PM
tbworld tbworld is offline
 
Join Date: Oct 2008
Posts: 2,126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Chadi View Post
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08541 seconds
  • Memory Usage 2,204KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete