Jump to:

7938 Posts in 1540 Topics by 945 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » autoplay mp3

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1823 Views
  • Rishi
    Avatar
    Community Member
    97 Posts

    autoplay mp3 Link to this post

    hello
    i have used the resource page example to add a mp3 in my homepage its running fine ,can i auto play the mp3 so that when every my homepage is opened it will automatically play the mp3,i have only a single mp3 in my homepage so there is no problem in auto playing the mp3 i suppose.
    i have tried inserting the autoplay code in mp3.ss file under dataobject_manager/code/mp3/
    ORIGINAL CODE
    <% require javascript(dataobject_manager/code/mp3/audio-player.js) %>

    <object type="application/x-shockwave-flash" data="$SWFLink" id="audioplayer1" height="24" width="290">
       <param name="movie" value="$SWFLink">
       <param name="FlashVars" value="playerID={$Count}&amp;soundFile={$MP3Link}">
       <param name="quality" value="high">
       <param name="menu" value="false">
       <param name="wmode" value="transparent">
    </object>

    CHANGED CODE
    <% require javascript(dataobject_manager/code/mp3/audio-player.js) %>

    <object type="application/x-shockwave-flash" data="$SWFLink" id="audioplayer1" height="24" width="290">
       <param name="movie" value="$SWFLink">
       <param name="FlashVars" value="playerID={$Count}&amp;soundFile={$MP3Link}" &amp;autostart="true">
       <param name="quality" value="high">
       <param name="menu" value="false">
       <param name="wmode" value="transparent">
    </object>

    changed in the last part of 4th line(added)
    &amp;autostart="true"
    Please help me in autoplaying the mp3 file
    thank you in advance

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: autoplay mp3 Link to this post

    Any help plz...
    i am using uncle C media example to upload mp3 and i hav eonly one mp3 in my page which i want to autoplay .means it should start playing the moment page is open,at the moment player is showing on the page and its playing when i am clicking on play button..
    Special request to uncle C

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: autoplay mp3 Link to this post

    UC please help me out in solving this issue

  • UncleCheese
    Avatar
    4085 Posts

    Re: autoplay mp3 Link to this post

    It appears to me that the plugin doesn't support autoplay, and with good reason. Forcing someone to listen to music on a webpage is one of the most obnoxious choices a developer can make. It's right up there with animated background images.

    I don't know the specifics of your project, but if I were visiting your site and all of a sudden an MP3 started playing that I didn't ask for, I'd not only leave the site, I'd be pretty angry, too.

    If it's a must-have, then I think you need to look into a different flash audio player. But please, for the love of all that is sane on the Internet, avoid this at all costs.

  • Rishi
    Avatar
    Community Member
    97 Posts

    Re: autoplay mp3 Link to this post

    thanks for your reply UC,even i dont wants to have a autoplay in the page but my project demands a autoplay fora specific page.

    1823 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.