I have a product that\'s playing a video in Flash (if available), and falls back to HTML5 if Flash isn\'t available.
I\'m not able to find a way to determine if Java
A project sandblaster can help you detect if you running being sandboxed.
Sandbox check if itself is framed first and then scans through the attributes of the frame element to detect several information about itself. These includes framed, crossOrigin, sandboxed, sandboxAllowances, unsandboxable, resandboxable, sandboxable.
To detect if itself is sandboxed in our case, it checks if the frame element has an attribute sandbox.
// On below `frameEl` is the detected frame element
try {
result.sandboxed = frameEl.hasAttribute("sandbox");
}
catch (sandboxErr) {
result.sandboxed = null;
if (typeof errback === "function") {
errback(sandboxErr);
}
}
I tried to replicate your issue and to test if this solution works, I had to paste the script into the window itself due to the security issue.
Here is a demo: http://jsfiddle.net/Starx/tzmn4088/ that shows this working.