I have an app under <div id="app">
and a portal root element <div id="portal">
(https://reactjs.org/docs/portals.html).
ReactDOM.render(<App />, document.getElementById('app'));
I would like to toggle between inline and portal while video is playing.
I hope to avoid video from pausing, or at least user will not detect the pause.
Inline:
<body>
<div id="app">
<div>
<button>Toggle inline/portal</button>
<div class="inline">
<video></video>
</div>
</div>
</div>
<div id="portal">
</div>
</body>
Portal (css for frame full screen):
<body>
<div id="app">
<div>
<button>Toggle inline/portal</button>
<div class="inline">
</div>
</div>
</div>
<div id="portal">
<video></video>
</div>
</body>
Is this possible? How can I achieve it in React?