2

I was using youtube and realized that if you right-click a video twice (once to bring up youtube's right-click menu, and a second time while its menu is already up) it opens the browser's right-click menu with additional options. Specifically, on Firefox, it has the added options: Play, Mute, Speed (expands to speed options), Loop, Full Screen, and Show Controls. This also works on Edge yielding the new options: Loop and Show Controls. My question is how was this done? Also, if I wanted to add right click menu options to a div what would I have to do?

TheDude53
  • 23
  • 2
  • Does this answer your question? [Is right click a Javascript event?](https://stackoverflow.com/questions/2405771/is-right-click-a-javascript-event) – Karin C Apr 28 '21 at 01:02
  • If you want to create a custom contextmenu, check out this question: https://stackoverflow.com/questions/4909167/how-to-add-a-custom-right-click-menu-to-a-webpage – Spectric Apr 29 '21 at 22:37

1 Answers1

1

That's just the browser default contextmenu when you right click any video.

To create a custom contextmenu, check this out: How to add a custom right-click menu to a webpage?

Spectric
  • 30,714
  • 6
  • 20
  • 43