for video gallery, i'm using ajax load videos different video hosts fb, youtube, vimeo etc. i'm embedding fb video mentioned in https://developers.facebook.com/docs/plugins/embedded-video-player using fb's js sdk.
the problem when i'm requesting fb video via ajax the video resizing smaller dimension this:
no issues when page reloaded(without ajax).
the js snippet:
$.ajax({ url: "index.php?gallery&type=fbvideocode&url=" + url, success: function(response) { response = $.trim(response); $('span.carousel').replacewith(response); fb.xfbml.parse(); // re-parse fb videos on page } });
please help.
thanks in advance.
the problem css of carousel using.
posting fb video code others :-)
php: (used ajax requests)
function getfbembedplayer($video_id, $width = 600) { return "<div class=\"fb-video\" data-href=\"https://www.facebook.com/video.php?v=$video_id\" data-width=\"$width\"> <div class = \"fb-xfbml-parse-ignore\"></div></div>"; }
js:
follow instructions in https://developers.facebook.com/docs/plugins/embedded-video-player
Comments
Post a Comment