I am using the following function to handle the click event of a button that will toggle a DOM element to fullscreen mode.
var elem = document.getElementById("swfContainer");
if (elem.requestFullscreen) {
elem.requestFullscreen();
} else if (elem.msRequestFullscreen) {
elem.msRequestFullscreen();
} else if (elem.mozRequestFullScreen) {
elem.mozRequestFullScreen();
} else if (elem.webkitRequestFullscreen) {
elem.webkitRequestFullscreen();
}
On its own this function works fine. The issue is that inside the dom element is another div containing a swf. The inner div has height and width properties set to 100%. The SWF is setup so that it will automatically resize itself to fir the stage.
Now the issue and question...
When i run the function to make the DOM fullscreen it of course goes to fullscreen and the SWF seems to recognize that it has gone to fullscreen because it prompts to allow for keyboard input. But the SWF itself doesn't resize to fill the fullscreen DOM element even though the container it is in does.
If there a way to accomplish this?