sendVideoEvent: function()

in src/apache-unomi-tracker.js [448:463]


        sendVideoEvent: function (event, successCallback = undefined, errorCallback = undefined) {
            console.info('[WEM] catching video event');
            var videoEvent = wem.buildEvent('video', wem.buildTarget(event.target.id, 'video', { action: event.type }), wem.buildSourcePage());

            wem.collectEvent(videoEvent, function (xhr) {
                console.info('[WEM] Video event successfully collected.');
                if (successCallback) {
                    successCallback(xhr);
                }
            }, function (xhr) {
                console.error('[WEM] Could not send video event.');
                if (errorCallback) {
                    errorCallback(xhr);
                }
            });
        },