0

I am able to pause and play the video onclick of the video itself. I want to be able to add a div in the video when the video is paused. Like a Play button. How do I do that ?

Do I need to add another div as an overlay and show it when the video is paused? If yes, how do I implement with the current code?

Working code for the video:

<video height="100%" width="100%" preload="none" onclick="this.paused ? this.play() : this.pause();">
 <source type="video/mp4" src="myvideo.mp4">
</video>

Many thanks.

Somename
  • 3,376
  • 16
  • 42
  • 84
  • Duplicate of http://stackoverflow.com/questions/30309584/overlay-play-button-over-video – Sumit Gulati Apr 01 '17 at 22:38
  • have a look at https://stackoverflow.com/questions/14382551/add-a-div-to-replace-video-after-video-plays-through/14387179#14387179, replace the ended event with play/pause to show/hide the overlay – Offbeatmammal Apr 02 '17 at 05:19
  • 1
    Possible duplicate of [Overlay Play button over video](http://stackoverflow.com/questions/30309584/overlay-play-button-over-video) – Asons Apr 02 '17 at 08:22

0 Answers0