function makeVideo() {
  // Calculate the percentage the overlay has been offset to two decimals
  var xOffset = (userOffset / placeholderWidth).toFixed(2);

  var placeholderWidth = placeholder.offsetWidth;
  var userOffset = overlay.dataset.x;
  var data = { url: videoPlayerInstance.source() };

  // Add optional params to the object if they exist
  if (startTime > 0) data.startTime = startTime;
  if (!isNaN(xOffset)) data.xOffset = xOffset;

  socket.emit("video.make", data);
  setupAnimation();
}
/**
 * makeVideo - Sends socket with data required to render the video. This includes
 * the required YouTube url and the optional xOffset and startTime.
 */
Sends socket with data required to render the video. This includes
the required YouTube url and the optional xOffset and startTime.
Sends socket with data required to render the video . This includes the required YouTube url and the optional xOffset and startTime .
function makeVideo() {
  var xOffset = (userOffset / placeholderWidth).toFixed(2);
  var placeholderWidth = placeholder.offsetWidth;
  var userOffset = overlay.dataset.x;
  var data = { url: videoPlayerInstance.source() };
  if (startTime > 0) data.startTime = startTime;
  if (!isNaN(xOffset)) data.xOffset = xOffset;
  socket.emit("video.make", data);
  setupAnimation();
}
function makeVideo ( ) { var xOffset = ( userOffset / placeholderWidth ) . toFixed ( 2 ) ; var placeholderWidth = placeholder . offsetWidth ; var userOffset = overlay . dataset . x ; var data = { url : videoPlayerInstance . source ( ) } ; if ( startTime > 0 ) data . startTime = startTime ; if ( ! isNaN ( xOffset ) ) data . xOffset = xOffset ; socket . emit ( "video.make" , data ) ; setupAnimation ( ) ; }
makeVideo - Sends socket with data required to render the video.
makeVideo - Sends socket with data required to render the video .
// Calculate the percentage the overlay has been offset to two decimals // Add optional params to the object if they exist