2015-07-29 14:36:00 +00:00
< link rel = "stylesheet" href = "{$cb_vjs_player_url}/css/video-js.css" / >
< link href = "{$cb_vjs_player_url}/css/cb_vjs_res.css" rel = "stylesheet" type = "text/css" / >
2015-07-30 13:45:57 +00:00
< link href = '//fonts.googleapis.com/css?family=PT+Sans:400,700,700italic,400italic' rel = 'stylesheet' type = 'text/css' >
2015-07-29 14:36:00 +00:00
< script src = "{$cb_vjs_player_url}/js/video.dev.js" > < / script >
< script src = "{$cb_vjs_player_url}/js/cb_vjs_res.js" > < / script >
2015-10-21 06:33:29 +00:00
< video id = "cb_video_js" class = "video-js vjs-default-skin" width = "{$width}" height = "{$height}" poster = "{getThumb vdetails=$vdata size=500x283}" >
2015-07-29 14:36:00 +00:00
{foreach $video_files as $file}
{$quality = explode('-', $file)}
2015-07-30 15:03:47 +00:00
{$quality = end($quality)}
{$quality = explode('.',$quality)}
2015-07-29 14:36:00 +00:00
{$quality = $quality.0}
2015-12-23 10:20:36 +00:00
{if $flv_vid == true}
< source src = '{$file}' type = "video/x-flv" / >
{else}
< source src = '{$file}' type = "video/mp4" data-res = "{$quality}" / >
{/if}
2015-07-29 14:36:00 +00:00
{/foreach}
2015-11-23 08:47:54 +00:00
{ANCHOR place="play_def_sub"}
2015-07-29 14:36:00 +00:00
< p class = "vjs-no-js" > To view this video please enable JavaScript, and consider upgrading to a web browser that < a href = "http://videojs.com/html5-video-support/" target = "_blank" > supports HTML5 video< / a > < / p >
< / video >
< script type = "text/javascript" >
2015-08-18 10:14:25 +00:00
var vid_id = "{$vdata.videoid}";
2016-03-07 23:42:37 -08:00
var videotitle = "{$vdata.title|escape_quotes}";
2015-07-29 14:36:00 +00:00
var uploader = "{$vdata.username}";
var branding_logo = "{$cb_logo}";
var product_link = "{$player_config.player_logo_url}";
var show_logo = true;
var cb_player_setup = {
plugins : { resolutionSelector : {
// Pass any options here
2016-02-02 14:01:22 +00:00
default_res : '360'
2015-07-29 14:36:00 +00:00
// Define an on.ready function
} },
"techOrder" : ['html5', 'flash'],
"controls": true,
"autoplay": false,
"preload": "auto",
2015-08-18 10:14:25 +00:00
"vid_id" : vid_id,
2015-07-29 14:36:00 +00:00
"videotitle" : videotitle,
"uploader" : uploader,
"branding_logo" : branding_logo,
"show_logo" : show_logo,
2016-03-08 06:36:57 -08:00
"product_link" : product_link,
2015-07-29 14:36:00 +00:00
};
//Initializing
var player = videojs('cb_video_js', cb_player_setup , function(){
var cb_video_js = this;
});
2016-03-08 06:36:57 -08:00
// saves audio settings
isMuted = $.cookie("isMuted");
if (isMuted != "false") {
$('video').attr('muted','muted');
$('.vjs-mute-control').trigger('click');
}
$('.vjs-mute-control').on("click",function(){
if (isMuted != "false") {
$.cookie("isMuted", "false");
} else {
$.cookie("isMuted", "muted");
}
});
2015-07-29 14:36:00 +00:00
< / script >
< script src = "{$cb_vjs_player_url}/js/cb_vjs_custom.js" > < / script >