{"name":"Video JS","key":"videojs","version":"1.0.5","instructions":"This is a VideoJS player template. It supports subtitles","showatto":"0","showplayers":"1","requirecss":"//vjs.zencdn.net/5.8.8/video-js.css","requirejs":"//vjs.zencdn.net/5.8.8/video.js","shim":"","defaults":"WIDTH=640,HEIGHT=480","amd":"1","body":"<div class=\"video-js-box\" id=\"@@AUTOID@@_box\"></div>\n\n<a id=\"@@AUTOID@@_download_button\" class=\"@@CANDOWNLOAD@@ nomediaplugin\"  href=\"@@VIDEOURL@@\" download>Download</a>","bodyend":"","script":"//video player html template\nvar videohtml_open = '<video id=\"' + @@AUTOID@@ + '\" class=\"video-js vjs-default-skin vjs-big-play-centered nomediaplugin\" controls preload=\"auto\" crossorigin=\"anonymous\" width=\"' + @@WIDTH@@ + '\" height=\"' + @@HEIGHT@@ + '\">';\nvar videohtml_src='<source src=\"' + @@VIDEOURL@@ + '\" type=\"' + @@AUTOMIME@@ + '\" />';\nvar videohtml_captions='<track kind=\"captions\" src=\"' + @@data-subtitles@@ + '\" srclang=\"en\" label=\"Captions\" default />';\nvar videohtml_end='</video>';\n\n//the player var\nvar theplayer = false;\n\n//insert video player html on page\nif(@@data-subtitles@@){\n   $('#' + @@AUTOID@@ + '_box').append(videohtml_open + videohtml_src + videohtml_captions + videohtml_end);\n}else{\n   $('#' + @@AUTOID@@ + '_box').append(videohtml_open + videohtml_src + videohtml_end);\n}\n\n//placeholder auto refresh\nvar refreshfunction =function(){\n  var mr = media_refresher.clone();\n   mr.init(@@FILENAME@@,\n@@VIDEOPLACEHOLDERDURATION@@,\ntheplayer.duration(),\nfunction(){\n  theplayer.src(theplayer.currentSrc() + '&reload=true');\n });\n};\n\n//kick off the videojs initialiser\ntheplayer= requiredjs_videojs(@@AUTOID@@, {}, function(){\nif(theplayer.readyState()==4){\n  refreshfunction();\n}else{\n  theplayer.ready(function(){\n     theplayer.on(\"loadedmetadata\", refreshfunction);\n    });//end of player ready\n}//end of if\n});\n\n\n","style":"","dataset":"","datasetvars":"","alternate":"","alternateend":""}