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?
Advertisement
Answer
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?