1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-19 10:54:16 +02:00

docs(react): Update docs for react tutorial (#4935) (#4952)

Using the default example, when disposing the player, a React DOMException was thrown because Video.js removed an element managed by React.
A simple solution is to wrap the player div in a separate div.

Fixes #4935.
This commit is contained in:
Zhulduz 2018-02-14 00:55:09 +06:00 committed by Gary Katsevman
parent 6a66e80c47
commit 7c30f97ef7

View File

@ -28,8 +28,10 @@ export default class VideoPlayer extends React.Component {
// see https://github.com/videojs/video.js/pull/3856
render() {
return (
<div data-vjs-player>
<video ref={ node => this.videoNode = node } className="video-js"></video>
<div>
<div data-vjs-player>
<video ref={ node => this.videoNode = node } className="video-js"></video>
</div>
</div>
)
}