function changeYoutubeVideo() {
  var url = getVideoId(videoUrl.value);
  if (url) {
    debug("Setting youtube vid");
    changeSourceVid(url.id, "youtube");
  } else {
    debug("Invalid Input");
  }
}
/**
 * changeYoutubeVideo - when a user types in the YouTube form this function checks whether
 * it's a valid YouTube id. If it is then the plyr is changed to the new video.
 *
 * @see changeSourceVid helper
 */
when a user types in the YouTube form this function checks whether
it's a valid YouTube id. If it is then the plyr is changed to the new video.


when a user types in the YouTube form this function checks whether it ' s a valid YouTube id . If it is then the plyr is changed to the new video .
function changeYoutubeVideo() {
  var url = getVideoId(videoUrl.value);
  if (url) {
    debug("Setting youtube vid");
    changeSourceVid(url.id, "youtube");
  } else {
    debug("Invalid Input");
  }
}
function changeYoutubeVideo ( ) { var url = getVideoId ( videoUrl . value ) ; if ( url ) { debug ( "Setting youtube vid" ) ; changeSourceVid ( url . id , "youtube" ) ; } else { debug ( "Invalid Input" ) ; } }
changeYoutubeVideo - when a user types in the YouTube form this function checks whether
 it's a valid YouTube id.
changeYoutubeVideo - when a user types in the YouTube form this function checks whether it ' s a valid YouTube id .