NPAPI support for <video> tag - npapi

I know that I can use a NPAPI plugin with <embed> tag, but I was wondering is it possible to implement NPAPI plugin that will be called for <video> tag?

No, there's no automatic fallback from <video> to NPAPI plugins. If you wanted to use an NPAPI plugin to handle <video> you'd need to make an extension for each browser that would rewrite <video> tags on pages to be <embed>/<object> instead.

Related

How to disable support for html5 audio tag in FireFox for testing purposes?

The html5 audio tags I included in my Web page work fine for me. I want to see what happens when someone uses a browser that doesn't support the html5 audio tag.
How can I temporarely disable html5 audio tag support in my browser?
I have disabled all plugins in FF, but the audio tag was still working properly.
Thanks.
Update 2014-11-03:
It occured to me that I could test what happens when the tag is not supported by replacing the "audio" tag by an "audios" tag. Tag "audios" is not supported (it's not even an html tag), so the browser didn't know what to do with it. It's not pretty, but it was good enough for my testing requirements.

Audio files and WWW

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)

youtube.com and html5 video tag

I have a question. I know youtube has supported html5 for some time, so I just tried disabling the adobe flash plugin and took a look at the page source. I found no video tag. Could anybody explain that?
Using chrome, after disabling Flash, I do get a warning when trying to watch videos ("You need Flash!"), but it detects that I don't have flash, and uses the HTML5 version instead. If you use Chrome, you can look at the DOM with the developer tools (F12), and you'll indeed find a video tag in the video-container div, e.g.
<video class="video-stream" x-webkit-airplay="allow" src="http://o-o.preferred.twtelecom-dfw1.v15.lscache5.c.youtube.com/videoplayback?sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cexpire&fexp=900161&itag=43&ip=207.0.0.0&signature=55FCBF36A597656FECBEC8E78051B3BD30EE8D97.8F8D573710D767EAF4429FBC54C940DF7611A1BE&sver=3&ratebypass=yes&source=youtube&expire=1330650696&key=yt1&ipbits=8&cp=U0hSRVZQTl9OUENOMl9OSlJHOlBlcHJOMW9PSHhH&id=381980b5e867a1c5" data-youtube-id="OBmAtehnocU"></video>
For almost everything Google does on the web they use javascript. Most likely what is happening is that they test the browser to make sure it supports HTML5 video, they then load the the video dynamically using javascript.
To verify, use a web browser tool to inspect the current html as it's shown, not as it's sent to the browser.
And as Marius noted, be sure to have HTML5 enabled

HTML audio and embed Tag

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

What's the current (as of April 2010) state of affairs regarding <object> vs <embed> in HTML?

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>.