Index: trunk/extensions/TimedMediaHandler/resources/mw.PopUpThumbVideo.js |
— | — | @@ -15,7 +15,10 @@ |
16 | 16 | 'content' : $video, |
17 | 17 | 'close' : function(){ |
18 | 18 | // pause the video on close ( so that playback does not continue ) |
19 | | - $(this).find('video,audio').get(0).pause(); |
| 19 | + var domEl = $(this).find('video,audio').get(0); |
| 20 | + if( domEl ) { |
| 21 | + domEl.pause(); |
| 22 | + } |
20 | 23 | } |
21 | 24 | } ) |
22 | 25 | .css('overflow', 'hidden') |
— | — | @@ -26,4 +29,4 @@ |
27 | 30 | }); |
28 | 31 | }); |
29 | 32 | |
30 | | -} )( mediaWiki, jQuery ); |
\ No newline at end of file |
| 33 | +} )( mediaWiki, jQuery ); |