src/YouTube.js
function shouldUpdateVideo(prevProps, props) {
  // A changing video should always trigger an update
  if (prevProps.videoId !== props.videoId) {
    return true;
  }

  // Otherwise, a change in the start/end time playerVars also requires a player
  // update.
  const prevVars = prevProps.opts.playerVars || {};
  const vars = props.opts.playerVars || {};

  return prevVars.start !== vars.start || prevVars.end !== vars.end;
}
function shouldUpdateVideo(prevProps, props) {
  // A changing video should always trigger an update
  if (prevProps.videoId !== props.videoId) {
    return true;
  }

  // Otherwise, a change in the start/end time playerVars also requires a player
  // update.
  const prevVars = prevProps.opts.playerVars || {};
  const vars = props.opts.playerVars || {};

  return prevVars.start !== vars.start || prevVars.end !== vars.end;
}
function shouldUpdateVideo ( prevProps , props ) { // A changing video should always trigger an update if ( prevProps . videoId !== props . videoId ) { return true ; } // Otherwise, a change in the start/end time playerVars also requires a player // update. const prevVars = prevProps . opts . playerVars || { } ; const vars = props . opts . playerVars || { } ; return prevVars . start !== vars . start || prevVars . end !== vars . end ; }
Check whether a `props` change should result in the video being updated.

@param {Object} prevProps
@param {Object} props
Check whether a props change should result in the video being updated .