html4 video embed - embed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head></head>
<body>
<embed width="420" height="345" src="video.wmv" type="application/x-shockwave-flash"></embed>
</body>
</html>
I am trying to embed a video in html page, video file is in local folder and that is of wmv format. Its not working. I have used the above mentioned code.

Convert video to SWF format by using any Converter. Then give link of that video. It'll work

Related

VSCode replacing quotes with character entity in iframe

When I download my files from my website using FileZilla and put them into VSCode, VSCode changes all of my quotation marks and spaces in the iFrame srcdoc to their matching character entities.
Example:
Website Code:
<iframe scrolling="no" id="previewFrame" width="1000" frameborder="0" srcdoc="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional //EN&' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>"></iframe>
How it looks in VSCode:
<iframe scrolling="no" id="previewFrame" width="1000" frameborder="0" srcdoc="<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">"></iframe>
Please tell me how to turn this off or if there is a setting I can change.

Audio file not playing

I want to embed the audio file on the html page on the server. The audio file is in the same folder as the html file, the path in src in the tag audio is correct, why is it not playing?
html file
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<audio>
<source src="f.mp3" type="audio/mp3">
</audio>
</body>
</html>
As described in mdn (https://developer.mozilla.org/fr/docs/Web/HTML/Element/audio), the <audio> tag should be writted like
<audio src="f.mp3" type="audio/mp3"></audio>.
If you want to display your player, add controls to your tag.
If you want to play the media when the page load, you can add autoplay, but, many web browser not enable autoplay by default as you can read here https://developer.chrome.com/blog/autoplay/

Loop ogg file in html audio embed

So I need to loop an audio file on my site, However I can only get it to play once even if using loop=true
<!DOCTYPE html>
<html lang="en" >
<embed height="0px" width="0px" src="music.ogg" loop="true"/>
You're using <embed> which could end up using most any audio player registered on the system. These players don't really have standard attributes that they use.
Consider using HTML5 audio instead:
<audio src="music.ogg" loop />

Why cann't I display background music in my web page?

I want to display a background music in my web page, the html code is like this:
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>test</title>
</head>
<body>
<EMBED loop=-1 style="FILTER: blue()" width="0" height="0" src="Valder Fields.mp3" autostart="true" > </EMBED>
</body>
</html>
and I have put the music into the same folder of this html file, and I run it well when I test it without use web server,but when I put them into the web server and open this page again,the browser downloads the music and do not display the music,why? And what I should do if I want to display the background music when I use web server?(I use tomcat 8.0 as my web server,and I have tried other version of tomcat, they cannot work as I expect too).
somehow you can use this instead of Embed
Jsfiddle
<audio controls autoplay style="display:none;">
<source src="http://f9.stream.nixcdn.com/bd4ec51ddb6643f1b1a9703df2a5702f/54699824/NhacCuaTui877/TheHappiestTimeOfMyLife-MCMongHuhGak-3645129.mp3" type="audio/mpeg">
</audio>
Embed the audio with HTML5.
<audio src="Valder Fields.mp3" preload="auto" controls></audio>
There are other options which you can find here

How to use audio tag in jsp

I want to play mp3 or ogg files in a jsp page with the html5 audio tag.
When I use the audio tag in a plain html page everything works but when I try to use it in a jsp page nothing seems to work.
<%#page contentType="text/html" pageEncoding="UTF-8"%>
<%--<%#page contentType="audio/mpeg3" pageEncoding="UTF-8"%>--%>
<!DOCTYPE html>
<html>
<head>
<!-- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">-->
<title>JSP Page</title>
</head>
<body>
<h1>Hello World!</h1>
<br>
<audio controls="controls">
<source src="/home/stelios/html5/recit.mp3" type="audio/mp3" />
Your browser does not support the audio tag.
</audio>
</body>
</html>
I have also tried to set the contentType to audio/mpeg3 but nothing worked.
The URL
http://localhost:8080/home/stelios/html5/recit.mp3
probably doesn't exist (assuming your web container runs on port 8080 on your own machine).
The src attribute of the audio tag is an URL, not a file path on the client or server machine.
Specifically, the browser is designed to detect the MIME type of the embedded file.
Try to use embed tag instead of source tag.
The embed tag is used to include the audio file in jsp.
For example:
<%# taglib uri="http://java.sun.com/jstl/core" %>
<html>
<head><title>Choose Your Tunes</title></head>
<body>
<h2>Thanks for listining to the song:</h2>
<embed src="ConstantCraving.mp3" width="240" height="160">
</embed>
</body>
</html>
Its just a sample code and is not tested.
The other problem may be the unavailability of the source file.
If you could specify the error, it would be eaiser to help