当播放器全屏时,我们可以禁用 MediaElements.js 中的右键单击控件,例如“将视频另存为”等吗?如果是,那怎么办?
问问题
697 次
1 回答
3
i have written the following java script code
var BM = 2; // button middle
var BR = 3; // button right
var msg ="MOUSE RIGHT CLICK IS NOT SUPPORTED ON THIS PAGE";
function mouseDown(e)
{
try { if (event.button==BM||event.button==BR) {return false;} }
catch (e) { if (e.which == BR) {return false;} }
}
document.oncontextmenu = function() { alert(msg); return false; }
document.onmousedown = mouseDown;
this code works in normal size.... but not working in full screen mode.... i need to disable context menu while mediaelement.js player is in full screen mode......
于 2012-12-05T09:51:25.740 回答