Skip to content

Instantly share code, notes, and snippets.

@lenage
Created October 19, 2012 03:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenage/3916145 to your computer and use it in GitHub Desktop.
Save lenage/3916145 to your computer and use it in GitHub Desktop.
madeofsport embed youtube js
asics_mos.mos.common.video.YouTubePlayer.prototype.init = function (a) {
$(".video-overlay-share-title").text(asics_mos.mos.globalData.share.shareTitle);
asics_mos.mos.common.video.YouTubePlayer.prototype.getInstance().setContainer($("#video-player"));
asics_mos.mos.common.video.YouTubePlayer.prototype.getInstance().setOverlay($("#video-overlay"));
swfobject.embedSWF("http://www.youtube.com/v/" + a + "?enablejsapi=1&playerapiid=ytplayer&version=3&autohide=1&modestbranding=1&rel=0&showinfo=0&fs=1&hd=1", "ytplayer", this.ytPlayerWidth,
this.ytPlayerHeight, "8", null, null, {
allowScriptAccess: "always",
allowFullScreen: "true"
}, {
id: "ytplayer"
});
window.onYouTubePlayerReady = function () {
if (!asics_mos.mos.common.video.YouTubePlayer.prototype.getInstance().player.loadVideoById) {
asics_mos.mos.common.video.YouTubePlayer.prototype.getInstance().setPlayer(document.getElementById("ytplayer"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment