I'm adding some Javascript to a jade template and the problem I'm having is code duplication because I can't do any jade conditionals inside the script tag. Is there anyway around this, code below.
if streamingType == 'HLS_IOS'
script
:coffee(bare=true)
window.$j = jQuery
window.player = new HtmlPlayer $j('#wrapper')
player._loadVideoAt '#{url}'
else
script
:coffee(bare=true)
window.$j = jQuery
window.player = new FlashPlayer $j('#wrapper'), '#{flashPlayerId}'
player._loadVideoAt '#{url}'`