which is better to use: embed or audio tag? I'm using Adobe Dreamweaver CS5. and i don't know which is the best tag to use for my audio file... please explain the differences, pros and cons.
Certainly audio tag...
http://www.w3schools.com/html/html5_audio.asp
That's why they introduced it...
It offers
audio play/pause,
navigation controls,
Autoplay;
Looping;
the best part: NO APP/PLUGIN REQUIRED!!!
Lighter pages, as in no plugin.... :)
Only con: Limited audio format support as of now...
Difference:
embed tag is used to embed any external object requiring plugin in your page...
audio tag is a dedicated tag for audio inclusion in your page, without plugin
Both tags are kind of new, because they were introduced by HTML5 and supported by newest versions of all major browsers. This means that there are probably no compatibility differences between them and it is best to use them in accordance with their semantic meaning and what they were meant to be used for:
embed: The tag defines embedded content, such as a plug-in. http://www.w3schools.com/html5/tag_embed.asp
audio: The tag defines sound, such as music or other audio streams. http://www.w3schools.com/html5/tag_audio.asp
Related
I'm debating whether or not to store a video on my server and call it through an HTML5 tag, or upload the video onto YouTube and use an iframe to embed the YouTube link. I'm not sure which would work more efficiently, or the differences between each one. What are the differences between using a HTML5 video tag and using a YouTube link and iframe tag?
Using a self-hosted video with HTML5
Advantages:
Full Control over markup and interface
Disadvantages:
Browser support is in your hands
Video download will be slower on your server as compared to YouTube
Recommended Usage:
Use a javascript plugin like https://plyr.io/ which will help with cross-browser and responsive concerns. Serve the video from a CDN if possible
Youtube Hosted
Advantages:
Performant
Browser support is everything
Disadvantages:
YouTube branded by default
Little control over the interface
Recommended Usage:
Use iframe embed code provided by youtube. For responsive assistance, see http://embedresponsively.com/. Also plyr.io allows you to play YouTube videos.
For my experience with <iframe> and <video> tags:
I found an issue with the <iframe> tag when you want to do an autoplay for your video while using a mobile or tablet device with "Chrome" & "Apple".
In my case, I used to do a click function to play video, that's what is impossible with <iframe> tag, so I use the <video> tag to resolve the issue.
I'm just a beginner.. How to play a video or audio using the anchor tag?
I used the tag n it played normally... I used the n it played... But when I anchor it:
<html>
Click here!
</html>
It launched WMP or VLC... Is it possible to play it without launching other applications?
You can use HTML5 tags, like video or audio . It's fairly easy to customize. See this example.
Be aware that old browsers don't support HTML5 and that you need different versions of the files for a couple of browsers. It's all explained on the linked sites.
What you are doing now is using the a tag to link a file. This will not embed the content in your website, but opens a player on your computer.
I need to find good way of embedding audio files on a website.
I find out about the based tag in HTML5. But there is an issue of playing music in other format than .mp3 in Firefox and Opera.
The player should be also similar in each browser.
Can you recommend me anything?
HTML5 <audio> is the way to do what you want.
There are shims for browsers that don't already support <audio>, and you can offer fallback formats using the <source> tag, for maximum cross-browser compatibility.
More reading, if you're still unsure:
<Audio> fallback through Javascript
Native audio in the browser
Quick Guide to Implementing the HTML5 Audio Tag (with Fallback to Flash)
While searching for difference between HTML4 and HTML5 I came across the point that :
HTML5 brings a whole new dimension to web world. It can embed video on web-pages without using any special software like Flash
So if we will consider a sample code in HTML4 then for embeding video then that will be:
<embed src="MyVideo.mp4"/>
While the above code can be written in HTML5 will be:
<video src="MyVideo.mp4"></video>
So what can I see is just the syntax difference. Apart from that what else is the difference.
Does this mean if we will use HTML5 to embed a video then the browser is not going to use any third parties software to play the video?
The idea regarding the tag is that the browsers should have native support for it, without the use of any additional software. The standard is not yet ready, and one of the points not agreed upon is regarding what codecs to support. For more information you could have a look at the html5 video wiki page which includes a list of which browsers support what formats.
If you are planning on implementing the html5 video tag, you should provide backwards compatibility. One way is to use the VideoJS library, which will fall back to flash, if the browser doesn't support the video source.
The current HTML5 draft specification does not specify which video formats browsers should support in the video tag. User agents are free to support any video formats they feel are appropriate. In cases where decoders are not built into the browser, the format support will be dictated by the multimedia framework of the operating system.
Here is what you might want to see : 20 Examples of HTML5 Video Player with Source
VideoJS is an HTML5 Video Player, built with Javascript and CSS, with a fallback to a Flash video player for when the browser doesn't support HTML5 video.
The age old question. <object> vs <embed>. From what I gather, <object> is the XHTML-compliant way of doing things, while <embed> is for legacy support. I'm currently building a Flash application that will contain a pre-made embedding code for users to copy and paste, and I'm wondering if it's feasible to simply dump the <embed> tag altogether.
Which browsers would be unable to load my application if I gave my users an <object>-only embed code?
Thanks :)
HTML4/XHTML1 only knows <object> and <applet> for the embedding of multimedia content, though the <embed> tag like the <object> is supported by all common browsers AFAIK.
With HTML5 <embed> will be included in the specification (in addition to the <object> tag), whereas the <applet> is going to be removed. In addition, there will be new tags like <audio>, <canvas>, <svg> and <video>.
As far as I understand the HTML5 specs, flash contents can be included with both - <embed> and <object>.