var FlowplayerFactory = (function () {
    var flowplayerSource = "/html/flowplayer/flowplayer.unlimited-3.2.5.swf",
        licenseKey = window.flowplayerKey;
    return function (p) {
        //debug(p);
        if (!p) return;
        //id, attributes options, actions
        if (typeof licenseKey != 'undefined')
            p.options.key = licenseKey;
        if (p.attributes)
            p.attributes.src = flowplayerSource;
        else
            p.attributes = flowplayerSource;
        try {
            return flowplayer( p.id, p.attributes, p.options);
        } catch (e) {
            debug(e);
            throw e;
        }
    };
})();

FlowplayerFactory.prototype.forceVideoTag = function (player) {
    return player.ipad({simulateiDevice:!window.hasFlash, controls:false});
};
//

