Skip to Content

nebulaYoutubeError()

If the Youtube Iframe API encounters an error before it is ready.

JavaScript January 10, 2018

Usage

This function runs automatically, so it is not called manually. Is this incorrect?

Additional Notes

This function logs Youtube Iframe API errors in Google Analytics.

Source File

Located in /assets/js/nebula.js on line 4789.

JavaScript
function nebulaYoutubeError(e){
    var thisVideo = nebula.videos[nebula.getYoutubeID(e.target)];
    thisVideo.title = nebula.getYoutubeTitle(e.target);

    ga('send', 'exception', {'exDescription': '(JS) Youtube API error for ' + thisVideo.title + ': ' + e.data, 'exFatal': false});
    nebula.nv('event', 'Youtube API Error');
}

Override

To override or disable this JavaScript function, simply redeclare it with the exact same function name.

JavaScript
function nebulaYoutubeError(){
    //Write your own code here, leave it blank, or return false.
}