0.2.0 • Published 4 years ago
react-yt-wrap v0.2.0
react-yt-wrap
Import the modal.
import YtWrap from 'react-yt-wrap';
Usage
<ReactYtWrap ref={child} id="GoTjn6hD_io" style={{ padding: "0 10%" }}
video={{ autoplay: false, startSeconds: start }}
onReadyState={onReady}
/>
See the example in src/index.js. To run demo npm start.
Props
id : https://www.youtube.com/watch?v=SKh1MJromYk means => SKh1MJromYk
video : JSON object which contains all the props for the iframe . See this
Only for single video
ChangeLog
- Picture in Picture mode added