Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

autoplay mp3


Go to End


5 Posts   2433 Views

Avatar
Rishi

Community Member, 97 Posts

3 February 2010 at 5:38am

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

Avatar
Rishi

Community Member, 97 Posts

4 February 2010 at 6:38am

Edited: 12/02/2010 2:07am

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

Avatar
Rishi

Community Member, 97 Posts

12 February 2010 at 3:01am

UC please help me out in solving this issue

Avatar
UncleCheese

Forum Moderator, 4102 Posts

12 February 2010 at 3:30am

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.

Avatar
Rishi

Community Member, 97 Posts

6 March 2010 at 7:17am

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.