null check to avoid occasional npe
This commit is contained in:
		| @@ -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. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user