From 5769e8c058c6e5cddacb73e0fced7bcbe7340fad Mon Sep 17 00:00:00 2001 From: Fahad Abbas Date: Mon, 17 Apr 2017 17:10:20 +0500 Subject: [PATCH] modified : video height function is set on callback --- upload/player/CB_video_js/cb_video_js.html | 8 +++----- upload/player/CB_video_js/js/cb_vjs_custom.js | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/upload/player/CB_video_js/cb_video_js.html b/upload/player/CB_video_js/cb_video_js.html index e451fd5f..fd6e8cf2 100755 --- a/upload/player/CB_video_js/cb_video_js.html +++ b/upload/player/CB_video_js/cb_video_js.html @@ -77,8 +77,7 @@ - - + @@ -244,18 +243,17 @@ cb_vjs.interactiveAds(i_instances_settings); } - - + new_player_height(vid_id); } //Initializing var cb_player = videojs('cb_video_js_'+vid_id, cb_player_setup , cb_vjs_callback); $(document).ready(function() { - new_player_height(vid_id); $(".video-js").on("contextmenu",function() { return false; }); }); + $(window).resize(function(event) { new_player_height(vid_id); }); diff --git a/upload/player/CB_video_js/js/cb_vjs_custom.js b/upload/player/CB_video_js/js/cb_vjs_custom.js index 779026bd..f5291652 100755 --- a/upload/player/CB_video_js/js/cb_vjs_custom.js +++ b/upload/player/CB_video_js/js/cb_vjs_custom.js @@ -7,6 +7,8 @@ function new_player_height (videoid) { var native_player_width = native_player.width(); var player_container_width = embed_player.width(); + + var native_player_height = native_player_width/player_ratio; var embed_player_height = player_container_width/player_ratio;