You can use the conventions inside the script tag in the latest jade versions:
script
| window.$j = jQuery;
if streamingType == 'HLS_IOS'
| window.player = new HtmlPlayer($j('#wrapper'));
else
| window.player = new FlashPlayer($j('#wrapper'), '#{flashPlayerId}');
| player._loadVideoAt('#{url}');
Unfortunately, I did not find a way to use conventions and filters at the same time, so you may need to write simple javascript.
source
share