Most Professors Against Guns on Campus

Cory Froomkin

//

var adPlayed = true; //Change to true to disable preroll

//Change the div id to match the name of the file without the “.flv” !!

videotoPlay(‘RPA_1_30_GunSurvey_CF_1.flv’);//Paste video filename between the quotes

function videotoPlay(file){

var ad = “TechHelpAd_11152012_600.flv”; //Paste pre-roll ad filename between the quotes

var video = file; var divId = (video.split(“.”,1))[0];

var vidPlayed = false; var playing = false;

var playlist = [{file: ‘rtmp://flashmedia.kent.edu/fms-jmc/tv2/’ + video }];

if (adPlayed == false){var path = ‘rtmp://flashmedia.kent.edu/fms-jmc/kentWired/’ + ad;}

else {var path = ‘rtmp://flashmedia.kent.edu/fms-jmc/tv2/’ + video; vidPlayed = true;}

jwplayer(divId).setup({ file: path, image: ‘http://www.staterinteractive.com/photos/spring11/0131tv2.jpg’,

width: ‘655’, height: ‘455’, events: {

onPlay: function(){playing = true; if (adPlayed == false){jwplayer(divId).setControls(false);}

else { jwplayer(divId).setup({ file: ‘rtmp://flashmedia.kent.edu/fms-jmc/tv2/’ + video , width: ‘655’, height: ‘455’, autostart: ‘true’ })}},

onComplete: function(){adPlayed = true; _gaq.push([‘_trackEvent’, ‘Pre-Roll Ad’ , ‘Video Viewership Completed’]); if (vidPlayed == false){vidPlayed = true;

jwplayer(divId).load(playlist).onPlaylist(jwplayer(divId).playlistItem(0)).setControls(true);}},

onDisplayClick: function(){if (adPlayed == false && playing == true){_gaq.push([‘_trackEvent’, ‘Pre-Roll Ad’ , ‘Video Ad Clicked’]);

window.open(“http://support.kent.edu/software”); jwplayer(divId).setControls(true); playing = false;}},}});}

Watch TV2 live

Contact Cory Froomkin at [email protected].