null check to avoid occasional npe
parent
6447b59ac5
commit
ab2bb869a3
|
@ -3090,6 +3090,8 @@
|
|||
|
||||
var iframe = event.target;
|
||||
|
||||
if( iframe && iframe.contentWindow ) {
|
||||
|
||||
// YouTube postMessage API
|
||||
if( /youtube\.com\/embed\//.test( iframe.getAttribute( 'src' ) ) && iframe.hasAttribute( 'data-autoplay' ) ) {
|
||||
iframe.contentWindow.postMessage( '{"event":"command","func":"playVideo","args":""}', '*' );
|
||||
|
@ -3105,6 +3107,8 @@
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop playback of any embedded content inside of
|
||||
* the targeted slide.
|
||||
|
|
Loading…
Reference in New Issue