apparatix
apparatix

Reputation: 1512

Adding Entries to Context Menu in JavaScript

I've seen this question before on SO (here) but I've seen it happen, right-clicking on JWPlayer displays options like "About JWPlayer", etc.

Anyone know how JWPlayer did it, even if it isn't JS?

Upvotes: 0

Views: 756

Answers (1)

apsillers
apsillers

Reputation: 115910

Plugins like Flash can create context menu items, but only when the user right-clicks within the plugin's container (so a single Flash video can't alter the menu for right-clicks that happen elsewhere on the page).

JWPlayer is essetially a Flash-based player with an HTML5 fallback. If you disable Flash in your browser and force HTML5/JavaScript, you'll see that the context menu is the default menu. JavaScript can't alter the context menu; Flash can.

Upvotes: 1

Related Questions