Skip to Content

onYouTubeIframeAPIReady()

Add applicable Youtube videos to the Nebula players object.

JavaScript February 7, 2021

Usage

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

Examples

Automatically play a video when a Bootstrap modal opens.

JavaScript
jQuery(document).on('show.bs.modal', function(e){
    vidID = jQuery(e.target).find('iframe').attr('id');
    players.youtube[vidID].playVideo();
});

Additional Notes

This function is called via the Google Youtube Iframe API when it is ready.

Source File

This function was not found in /assets/js/modules/video.js. Please report this error.

No Hooks

This function does not have any filters or actions available. Request one?

Override

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

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