PlayerJsCommon.js 384 Bytes
(function () {
    var PlayerJsCommon = window.PlayerJsCommon = function () {};

    PlayerJsCommon.getPlayerJsMessage = function (e) {
        var message;

        try {
            message = JSON.parse(e.data);
        } catch (err) {
            return;
        }

        if (message.context !== 'player.js') {
            return;
        }

        return message;
    };
}());