This article mainly introduces the use of JS to detect whether the browser support HTML5 in the video label method, the need for friends can refer to the following
The code is as follows://Detect support for HTML5 function CheckVideo () { if (!! Document.createelement (' video '). Canplaytype} { var vidtest = document.createelement ("video" ); oggtest = Vidtest.canplaytype (' Video/ogg; codecs= "Theora, Vorbis"); if (!oggtest) { h264test = Vidtest.canplaytype (' vide O/mp4; Codecs= "avc1.42e01e, mp4a.40.2"); if (!h264test) { return False else { & nbsp if (h264test = "probably") { R Eturn true; else {& nbsp   return false; } else { if (oggtest = "probably") { return true; else { & nbsp return false; { } else { &nbs P return false; } Use the above method to determine whether the current browser supports the video label in HTML5 and can support playback using the MP4 format (because Firefox appears to be due to copyright Playback in the H.264 encoded MP4 format is not supported, if true, the video in HTML5 can be played and returned false, and the Flash plugin will be used to play it. This method is commonly used for video sites, compatible with mobile phones, tablets and other devices to play the video screen, mainly for the compatibility of iOS;