Merge pull request #417 from ASponch/fix_embed_code

modified: use video key instead of video id in embed code in order to…
This commit is contained in:
Fahad Abbas 2018-05-07 18:37:27 +05:00 committed by GitHub
commit e7984081f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -1302,7 +1302,7 @@ class CBvideo extends CBCategory
if($type=='iframe')
{
$embed_code = '<iframe width="'.config('embed_player_width').'" height="'.config('embed_player_height').'" ';
$embed_code .= 'src="'.BASEURL.'/player/embed_player.php?vid='.$vdetails['videoid'].'&width='.
$embed_code .= 'src="'.BASEURL.'/player/embed_player.php?vid='.$vdetails['videokey'].'&width='.
config('embed_player_width').'&height='.config('embed_player_height').
'&autoplay='.config('autoplay_embed').'" frameborder="0" allowfullscreen></iframe>';
}

View file

@ -1058,7 +1058,7 @@
}
}
increment_views_new($vdo['videoid'],'video');
increment_views_new($vdo['videokey'],'video');
if(userid())
$userquery->increment_watched_vides(userid());

View file

@ -15,11 +15,11 @@
define("THIS_PAGE","watch_video");
include("../includes/config.inc.php");
$vid = $_GET['vid'];
//gettin video details
$vdetails = get_video_details($vid);
increment_views_new($vid, 'video');
$vkey = $_GET['vid'];
//gettin video details by key
$vdetails = $cbvid->get_video($vkey);
increment_views_new($vkey, 'video');
$width = @$_GET['width'];
$height = @$_GET['height'];
$autoplay = @$_GET['autoplay'];