Embed JW Player into Facebook wall with plugins (OVA), flexible way

I needed to embed videos on users’ Facebook walls and used JW Player for this because it has many ways of embedding.

I’ll show you how to embed videos using external config file because this way is very flexible. If you use embedding jw player with adding player settings as parameters to URL this is not so good because you cannot change it in future when you need for example remove some settings or add some plugin.
Using approach of external configuration file you can manage all embedded videos when needed.

Continue reading “Embed JW Player into Facebook wall with plugins (OVA), flexible way”

Flex application security error on Fullscreen mode

Have spot this error when I tried to implement fullscreen mode on my Flex app.

Here is my fullscreen toggler:



        private function toggleFullscreen():void {
            try {
                switch (stage.displayState) {
                    case StageDisplayState.FULL_SCREEN:
                        /* If already in full screen mode, switch to normal mode. */
                        stage.displayState = StageDisplayState.NORMAL;
                        stage.fullScreenSourceRect = appRectangle;
                        break;
                    default:
                        /* If not in full screen mode, switch to full screen mode. */
                        stage.displayState = StageDisplayState.FULL_SCREEN;
                        appRectangle = stage.fullScreenSourceRect;
                        stage.fullScreenSourceRect = new Rectangle(0, 0, 1000, 750);
                        break;
                }
            } catch (err:SecurityError) {
                // ignore
                Alert.show('Cannot go full screen');
            }
        }

When I press fullscreen icon I’ve got this exception.
The problem was simple – you need to allow your app go to fullscreen mode like this:

        <param name="allowFullScreen" value="true" /> - in the <object>
        allowFullScreen="true" - in the <embed>