Skip to content

Instantly share code, notes, and snippets.

@amclean
Created October 30, 2012 03:08
Show Gist options
  • Save amclean/3978100 to your computer and use it in GitHub Desktop.
Save amclean/3978100 to your computer and use it in GitHub Desktop.
video code
nytg.gfx = function(){
return{
init: function(){
this.mmVideoPlayerOptions = {
autoPlay : false,
controlsBelow : false,
fullScreen : true,
skin : "light",
autoRewind : true
};
// instantiate video
this.bigVideoClip = new NYTMM.VideoPlayer($("g-videoPlayer"),970, 546,null,this.mmVideoPlayerOptions);
this.bigVideoClip.setSources(['http://www.nytimes.com/packages/video/newsgraphics/2012/0926-patents/patents.flv','http://graphics8.nytimes.com/packages/video/newsgraphics/2012/0926-patents/patents.mp4']);
this.bigVideoClip.setPoster(nytg.assetsPath+'/images/patents-cover.jpg');
//
// this.smallVideoClip = new NYTMM.VideoPlayer($("nytg-small-video"),970, 274,null,this.mmVideoPlayerOptions);
// this.smallVideoClip.setSources(['http://www.nytimes.com/packages/video/newsgraphics/2012/0803-match-sprint/faceoff_with_audio2.flv','http://www.nytimes.com/packages/video/newsgraphics/2012/0803-match-sprint/faceoff_with_audio2.mp4']);
// this.smallVideoClip.setPoster('/images_local/duel2.jpg');
// this.videoEvents();
}
// ,
// videoEvents:function (){
// document.observe(NYTMM.VideoPlayer.PLAY_EVENT,this.videoHeaderON);
// document.observe(NYTMM.VideoPlayer.END_EVENT,this.videoHeaderOFF)
// },
// videoHeaderON:function (e,t){
// if(e.memo.target.id === 0){
// $j('body .nytg-video-headline, body h1').css('display','none');
// $j('body .storySummary').css('display','none');
// $j('body .nytg-videoCredit').css('display','none');
// }
// },
// videoHeaderOFF: function (e){
// $j('body .nytg-video-headline, body h1').css('display','block');
// $j('body .storySummary').css('display','block');
// $j('body .nytg-videoCredit').css('display','block');
// }
}
}();
nytg.gfx.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment