Hi I am using this code for youtube video (Wordpress), how should look $ php in this function if I need send my Https:/`
$(function(){
$('.Play').click(function() {
$('.videoWrapper').show().find("iframe").attr("src","http://www.youtube.com/embed/'. $youtube_embded_code.'?modestbranding=1&rel=0&showinfo=0&color=red&wmode=opaque&autoplay=1");
});
});`
$youtube_emded_code - doesn't work inside "Http://"
Thank you so much for all questions but I still have the same problem(, problem is this is code works perfect without php `
$(function(){
$('.Play').click(function() {
$('.videoWrapper').show().find("iframe").attr("src","https://www.youtube.com/embed/zyesmPtFziw?modestbranding=1&rel=0&showinfo=0&color=white&wmode=opaque&autoplay=1");
});
});
and .attr replace all "https://" to this part of php code :$youtube_video=get_post_meta(get_the_ID(), 'dt_youtube_video_url',true);
$youtube_embded_link = str_replace('watch?v=' , 'embed/', $youtube_video);
$youtube_embded_code = str_replace('http://', '', $youtube_video);
$youtube_embded_code = str_replace('www.youtube.com/', '', $youtube_embded_code);
$youtube_embded_code = str_replace('embed/', '', $youtube_embded_code);
$youtube_embded_code = str_replace('watch?v=', '', $youtube_embded_code);
echo '';
echo '';
echo'';
?> `
No comments:
Post a Comment