Why does this audio file autoplay? - html

This keeps autoplaying even when I set it to false 3 times. I don't know what to do it's getting on my nerves. Any ideas?
<object>
<param name="src" value="http://linkimprov.com/buu.mp3">
<param name="autoplay" value="false">
<param name="autostart" value="false">
<param name="controller" value="true">
<embed src="http://linkimprov.com/buu.mp3" controller="true" autoplay="false" autostart="False" type="audio/mp3" />
</object>
You can see how it autostarts in jsfiddle: http://jsfiddle.net/Lisandro/wCJzm/3/
I just started web design and audio is making me want to cut my pc in pieces. Any ideas of why it autoplays??
Thanks

better to use this tag
<audio controls="controls">
<source src="http://linkimprov.com/buu.mp3" type="audio/mp3" />
</audio>
it's working for me!!

works great for IE and *mp3 files but Firefox doesn't support *.mp3 files. It supports *.ogg audio files. Having to have two versions of each of your audio files isn't really a solution. Also, try to find a simple command line utility to create your *.ogg files... good luck.

Related

How to embed WMV files in my html5 file

I am trying to embed some s3 WMV file urls in my html page, but the code below is not working.
<object classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Microsoft® Windows® Media Player components..." type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=6,4,7,1112">
<param name="fileName" value="http://www.ladieda.com/mymovie.wmv">
<param name="autoStart" value="false">
<param name="showControls" value="true">
<param name="AllowChangeDisplaySize" value="true">
<param name="ClickToPlay" value="true">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="http://www.ladieda.com/mymovie.wmv" autoStart="false" ></embed>
</object>
I think this may be because nearly every browser does not support WMV as a type of file. Aside from IE, this type of format is unlikely to be compatible with most browsers.
Find an online file converter which the file format to WMV to Mp4 or something else.
This might help:
http://video.online-convert.com/convert-to-mp4
As L.S said most web browsers do not support WMV files, however services like https://vid.me/ allow for you to upload WMV files for free and using their embed code you may be able to resolve this issue.
Hope this helps!

Mahara ePortfolio - How to embed background music using the "Some HTML" Block

I'm a student that is facing a problem while using my University's version of Mahara. I uploaded an audio file onto my ePortfolio, and tried to use it in my HTML code.
I've been trying <embed>, <audio>, and <video> tags but it seems like they are not supported. I see that Mahara uses flowplayer to display internal media, but I do not have any idea on how to use it while autoplaying and looping the audio.
So, I decided to go with the "Some HTML" block instead of the "Internal Media" block. One example I did is this:
<object data="/artefact/file/download.php?file=392549" type="audio/mpeg" width="400" height="315">
<param name="src" value="/artefact/file/download.php?file=392549">
<param name="controller" value="true">
<param name="loop" value="true">
<param name="autoplay" value="true">
<param name="autostart" value="true">
<param name="scale" value="aspect">
</object>
I wanted to autoplay and loop the audio, so Internal Media or External Media isn't an option anyway. Just how can I do it with HTML on Mahara? Does it filter these codes and blocks them? I'm new to this, and I'm really stuck.
try it , sample code
<audio controls loop>
<source src="my.mp3">
<source src="mu2.mp3>
</audio>

Why does Chrome keep attempting to mount mp4 files when it can't play them?

Why does Chrome keep attempting to mount mp4 files when it can't play them?
I am working on a PC Windows 7, IE 10, Chrome Version 25.0.1364.172.
It doesn't matter whether mp4 source line is before or after the object lines, Chrome seems to want to mount the mp4 files even if it can't play them.
I would like to play the mp4 file in IE 10 and the flash equivalent in Chrome, but I can't seem to make any combination of line ordering work.
So far, my only workaround is to use flash in both browsers. But why do I have to? I thought the html5 video tag was supported by both browsers?
Is this the correct way for a flash fallback to be coded, as it doesn't seem to be working. Is there a way to code this so I don't have to use flash in IE 10, which can play the mp4 files native?
Thanks for whatever assistance you can give me.
Here's a copy of the code generated at http://sandbox.thewikies.com/vfe-generator/
<!-- "Video For Everybody" http://camendesign.com/code/video_for_everybody -->
<video controls="controls" poster="Mark.jpg" width="640" height="480">
<source src="Mark.mp4" type="video/mp4" />
<object type="application/x-shockwave-flash" data="http://player.longtailvideo.com/player.swf" width="640" height="360">
<param name="movie" value="http://player.longtailvideo.com/player.swf" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="flashVars" value="controlbar=over&image=Mark.jpg&file=Mark.mp4" />
<img alt="Mark" src="Mark.jpg" width="640" height="480" title="No video playback capabilities, please download the video below" />
</object>
</video>

How to embed a .mov file in HTML?

What's the correct way of adding a .mov file to a webpage?
I'm just adding this functionality to an existing file so I can't convert it to HTML5. The file is on the same server about 1G in size.
The client also doesn't want to use YouTube or Vimeo as it's on the homepage.
Had issues using the code in the answer provided by #haynar above (wouldn't play on Chrome), and it seems that one of the more modern ways to ensure it plays is to use the video tag
Example:
<video controls="controls" width="800" height="600" name="Video Name">
<source src="http://www.myserver.com/myvideo.mov">
</video>
This worked like a champ for my .mov file (generated from Keynote) in both Safari and Chrome, and is listed as supported in most modern browsers (The video tag is supported in Internet Explorer 9+, Firefox, Opera, Chrome, and Safari.)
Note: Will work in IE / etc.. if you use MP4 (Mov is not officially supported by those guys)
<object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="sample.mov">
<param name="qtsrc" value="rtsp://realmedia.uic.edu/itl/ecampb5/demo_broad.mov">
<param name="autoplay" value="true">
<param name="loop" value="false">
<param name="controller" value="true">
<embed src="sample.mov" qtsrc="rtsp://realmedia.uic.edu/itl/ecampb5/demo_broad.mov" width="320" height="256" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed>
</object>
source is the first search result of the Google
Well, if you don't want to do the work yourself (object elements aren't really all that hard), you could always use Mike Alsup's Media plugin: http://jquery.malsup.com/media/

html: embed streaming video (crossbrowser)

i'm trying to embed a .wmv video into my website but doesnt work :(
i've googled and tried <embed> and <video>
the video i'm using was created by super converter and i've used WMV7 as video codec.
is there a crossbrowser solution for it - or should i better use flash video?
thx in advance
The <video> tag is specific to HTML5, and is very browser dependent. If you care about everyone seeing the video you should not be using this tag yet--wait a few years.
As for why the embed is not working, you'll have to show us code to see what is wrong. Here is an example snippet that should work.
<OBJECT ID="MediaPlayer" WIDTH="192" HEIGHT="190" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="videofilename.wmv">
<PARAM name="autostart" VALUE="false">
<PARAM name="ShowControls" VALUE="true">
<param name="ShowStatusBar" value="false">
<PARAM name="ShowDisplay" VALUE="false">
<EMBED TYPE="application/x-mplayer2" SRC="videofilename.wmv" NAME="MediaPlayer"
WIDTH="192" HEIGHT="190" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED>
</OBJECT>
With any HTML questions, you should tell us what browser and OS you are using. Again, source code is very important to diagnosing problems.