Search code examples
jqueryvideo.js

Find out if Video.JS is using HTML5 or the Flash Player


I am using VIDEO.JS and i need to find out which player video.js is using for a Javascript function.. Example

var myPlayer = videojs("the_player_id");
if (myPlayer.currentTechnology() == "flash") {
    console.log("its using the flash player");
}

I couldn't find anything in the API for this.


Solution

  • In the minified code the variable gets obfuscated, but in the unminified version you can use myPlayer.techName