2

I am trying to embed Youtube videos on my website with a customized control option like in Edx. Screenshot of embedded YouTube videos on Edx However, I didn't find any proper documentation to achieve this. I tried to look at the YouTube Player API Reference. Can you please advise me how to achieve this or any tutorial/documentation link?

2

In the documentation you linked, there is a "Getting started" section with some sample code. Using this sample code, as well as a quick look at the documentation, I found that a simple <button onClick"=player.playVideo()">gives you a button to play the video again (as the sample code will auto-stop the video 6s in)

You can see the result here: https://jsfiddle.net/LEOXD/eLqk2sxc/

The Getting Started section also includes sample code for just loading the player

From here, you basically only need to design your own little bar underneath the player. (it doesn't have to be <button>s).

Note that YouTube doesn't count views coming from custom players.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.