Created
November 6, 2012 17:16
-
-
Save harmstyler/4026105 to your computer and use it in GitHub Desktop.
Javascript in eZ Templates with literals and variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="landing-video-surround"> | |
<div class="audio-player" id="LandingPageVideo"></div> | |
</div> | |
<script type="text/javascript"> | |
var videoURL = '{$video-url|trim}', | |
videoHeight = '{$player_height}', | |
videoWidth = '{$player_width}', | |
jwPlayer = {'javascript/player.swf'|ezdesign}, | |
titleCard = '{$title-card-url}', | |
rtmpFile = '{$rtmp-file|trim}', | |
rtmpStreamer = '{$rtmp-streamer|trim}'; | |
{literal} | |
jwplayer("LandingPageVideo").setup({ | |
logo: {hide: true}, | |
height: videoHeight, | |
width: videoWidth, | |
'skin': '/extension/jsh/design/ezflow/javascript/modieus/modieus-slim.xml', | |
image: titleCard, | |
plugins: { | |
"gapro-2": { | |
accountid:'UA-688649-2', | |
trackingobject:'_gaq', | |
trackstarts:'true', | |
trackpercentage:'true', | |
tracktime:'true', | |
idstring:'||streamer||/||file||' | |
} | |
}, | |
modes: [{ | |
type: "flash", | |
src: jwPlayer, | |
config: { | |
bufferlength: 6, | |
provider: "rtmp", | |
streamer: rtmpStreamer, | |
file: rtmpFile | |
} | |
},{ | |
type: "html5", | |
config: { | |
file: videoURL | |
} | |
}] | |
}) | |
{/literal} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment