How to embed the video player in React

You use our sample react app from GitHub and edit the data-dyntube-key attribute in /src/App.j.

Here are the two steps explaining how you can do it in your app.

Step 1.

Please open /public/index.html a page and paste the following script tag in the <head> section.

<script>!function(e,t,i){if(void 0===e._dyntube_v1_init){e._dyntube_v1_init=!0;var a=t.createElement("script");a.type="text/javascript",a.async=!0,a.src="https://embed.dyntube.com/v1.0/dyntube.js",t.getElementsByTagName("head")[0].appendChild(a)}}(window,document);</script>

Step 2.

Please open /src/App.js or any other component where you want to embed it and paste the <div> part of your embed code.

<div data-dyntube-key="7FavFDdssdpztWUTwVQ"></div>

Last updated