How to use the es.upv.paella.videoDataPlugin function in es

To help you get started, we’ve selected a few es examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github polimediaupv / paella / plugins / es.upv.paella.videoData / index.js View on Github external
checkEnabled(onSuccess) {
            // Check if enabled
            let plugin = paella.player.config.plugins.list["es.upv.paella.videoDataPlugin"];
            let exclude = (plugin && plugin.excludeLocations) || [];
            let excludeParent = (plugin && plugin.excludeParentLocations) || [];
            let excluded = exclude.some((url) => {
                let re = RegExp(url,"i");
                return re.test(location.href);
            });

            if (window!=window.parent) {
                excluded = excluded || excludeParent.some((url) => {
                    let re = RegExp(url,"i");
                    try {
                        return re.test(parent.location.href);
                    }
                    catch(e) {
                        // Cross domain error
                        return false;