/*
 * Customize Embed JS from within the player
 */
function updateCustomEmbed() {
    updateCustomEmbedSize();
    var width = parseInt($F('customwidth'));
    width = constrainedEmbedWidth(width);
    var height = parseInt($F('customheight'));
    var url = $F('embedvideoonly') ? $('embedvideourl').value : $('embedchannelurl').value;
    var code = $('embedcodestub').value;
    url += (url.include('?') ? '&' : '?') + 'width=' + width.toString();
    url = customizeEmbedURL(url);
    
    updateEmbedCode(code, width, height, url);
}

function customizeEmbedURL(url) {
  return url;
}
