site/public/semantic/javascript/semantic.js
function(source) {
            var
              api      = (settings.api)
                ? 1
                : 0,
              autoplay = (settings.autoplay)
                ? 1
                : 0,
              hd       = (settings.hd)
                ? 1
                : 0,
              showUI   = (settings.showUI)
                ? 1
                : 0,
              // opposite used for some params
              hideUI   = !(settings.showUI)
                ? 1
                : 0,
              url = ''
            ;
            if(source == 'vimeo') {
              url = ''
                +      'api='      + api
                + '&amp;title='    + showUI
                + '&amp;byline='   + showUI
                + '&amp;portrait=' + showUI
                + '&amp;autoplay=' + autoplay
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            if(source == 'ustream') {
              url = ''
                + 'autoplay=' + autoplay
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            else if(source == 'youtube') {
              url = ''
                +      'enablejsapi=' + api
                + '&amp;autoplay='    + autoplay
                + '&amp;autohide='    + hideUI
                + '&amp;hq='          + hd
                + '&amp;modestbranding=1'
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            return url;
          }
function(source) {
            var
              api      = (settings.api)
                ? 1
                : 0,
              autoplay = (settings.autoplay)
                ? 1
                : 0,
              hd       = (settings.hd)
                ? 1
                : 0,
              showUI   = (settings.showUI)
                ? 1
                : 0,
              // opposite used for some params
              hideUI   = !(settings.showUI)
                ? 1
                : 0,
              url = ''
            ;
            if(source == 'vimeo') {
              url = ''
                +      'api='      + api
                + '&amp;title='    + showUI
                + '&amp;byline='   + showUI
                + '&amp;portrait=' + showUI
                + '&amp;autoplay=' + autoplay
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            if(source == 'ustream') {
              url = ''
                + 'autoplay=' + autoplay
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            else if(source == 'youtube') {
              url = ''
                +      'enablejsapi=' + api
                + '&amp;autoplay='    + autoplay
                + '&amp;autohide='    + hideUI
                + '&amp;hq='          + hd
                + '&amp;modestbranding=1'
              ;
              if(settings.color) {
                url += '&amp;color=' + settings.color;
              }
            }
            return url;
          }
function ( source ) { var api = ( settings . api ) ? 1 : 0 , autoplay = ( settings . autoplay ) ? 1 : 0 , hd = ( settings . hd ) ? 1 : 0 , showUI = ( settings . showUI ) ? 1 : 0 , // opposite used for some params hideUI = ! ( settings . showUI ) ? 1 : 0 , url = '' ; if ( source == 'vimeo' ) { url = '' + 'api=' + api + '&amp;title=' + showUI + '&amp;byline=' + showUI + '&amp;portrait=' + showUI + '&amp;autoplay=' + autoplay ; if ( settings . color ) { url += '&amp;color=' + settings . color ; } } if ( source == 'ustream' ) { url = '' + 'autoplay=' + autoplay ; if ( settings . color ) { url += '&amp;color=' + settings . color ; } } else if ( source == 'youtube' ) { url = '' + 'enablejsapi=' + api + '&amp;autoplay=' + autoplay + '&amp;autohide=' + hideUI + '&amp;hq=' + hd + '&amp;modestbranding=1' ; if ( settings . color ) { url += '&amp;color=' + settings . color ; } } return url ; }
generate url parameters
generate url parameters