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