Results 1 to 3 of 3

Thread: HTML5 background audio player

  1. #1
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default HTML5 background audio player

    1) Script Title:
    HTML5 background audio player

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...udioplayer.htm

    3) Describe problem:
    i just need it to play the sound file once without having to manually turn it off. no looping. how do i do that?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    First thing I would try is, using a text only editor like NotePad, setting loop false in the bgaudioplayer.js file:

    Code:
    /* HTML5 background audio player 
    * Created: Jan 31st, 2012 by DynamicDrive.com. This notice must stay intact for usage 
    * Author: Dynamic Drive at http://www.dynamicdrive.com/
    * Visit http://www.dynamicdrive.com/ for full source code
    */
    
    jQuery.noConflict()
    
    var bgaudioplayer = (function($){
    
    	var audio5support = !!document.createElement('audio').canPlayType
    	var d_setting = {autoplay:true, loop:false, persistTimeLine:false, volume:0.5, volumelevels:10}
    
    	function bgaudioplayer(setting){
    		var s = $.extend({}, d_setting, setting)
    		var persistTimeLine = s.persist . . .
    The browser cache may need to be cleared and/or the page refreshed to see changes.

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.



    Just as a side note, several devices - like most if not all handhelds, will not allow auto play, I'm not sure how this script will act in those.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    jundo12 (05-09-2014)

  4. #3
    Join Date
    May 2014
    Posts
    203
    Thanks
    28
    Thanked 5 Times in 5 Posts

    Default

    thanks! yep that does the trick. i completely forgot about the .js file. doh. i keep checking the main script on the html page.

Similar Threads

  1. Replies: 1
    Last Post: 03-03-2013, 08:59 AM
  2. HTML5 background audio player
    By oldmanInAz in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 06-07-2012, 08:28 PM
  3. HTML5 background audio player not working in Firefox
    By xotj123 in forum Dynamic Drive scripts help
    Replies: 9
    Last Post: 06-07-2012, 06:32 AM
  4. Creating multiple instances of the HTML5 background audio player
    By solaningo in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 04-17-2012, 12:15 AM
  5. HTML5/JS plays only audio...
    By purmar in forum JavaScript
    Replies: 2
    Last Post: 11-24-2011, 04:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •