* Check whether a `props` change should result in the player being reset. * The player is reset when the `props.opts` change, except if the only change * is in the `start` and `end` playerVars, because a video update can deal with * those.
(prevProps: YouTubeProps, props: YouTubeProps)
| 48 | * those. |
| 49 | */ |
| 50 | function shouldResetPlayer(prevProps: YouTubeProps, props: YouTubeProps) { |
| 51 | return ( |
| 52 | prevProps.videoId !== props.videoId || !isEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts)) |
| 53 | ); |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Check whether a props change should result in an update of player. |
no test coverage detected
searching dependent graphs…