+<?php // Javascript bindings when document is ready ?>
+<script type="text/javascript">
+ $(function() {
+ // TODO remove this 2 bindings
+ $('#a_ns-vlc').click(function() {
+ //retrieveNsVlcPlugin('<? //echo $video['url'][0] ?>');
+ });
+ $('#a_ns-html5').click(function() {
+ //retrieveNsHtml5Plugin('<?php //echo $video['url'][0] ?>')
+ });
+
+ // Switch video plugin facilities
+ $('#video-widget-tabs')
+ .tabs();
+ $('#switch-to-ns-html5')
+ .click(function() {
+ $('#video-widget')
+ .nsvideo('type', 'ns-html5');
+ });
+ $('#switch-to-ns-vlc')
+ .click(function() {
+ $('#video-widget')
+ .nsvideo('type', 'ns-vlc');
+ });
+
+ // Video widget
+ $('#video-widget')
+ .nsvideo({
+ type: "<?php echo $plugin_type ?>",
+ src: <?php echo json_encode($video['assets']) ?>,
+ //width: videoWidth,
+ //height: videoHeight
+ minWidth: 640,
+ maxWidth: 1024,
+ initialDuration: "<?php echo $video['duration'] ?>",
+
+ resize: function() {
+ $('#video-widget-tabs')
+ .css('width', $('#video-widget').css('width'));
+ }
+ });
+ });
+</script>
\ No newline at end of file