diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWGalleryImageNode.js b/modules/ve-mw/dm/nodes/ve.dm.MWGalleryImageNode.js index 8150cf7944..dca2bb59a8 100644 --- a/modules/ve-mw/dm/nodes/ve.dm.MWGalleryImageNode.js +++ b/modules/ve-mw/dm/nodes/ve.dm.MWGalleryImageNode.js @@ -43,7 +43,7 @@ ve.dm.MWGalleryImageNode.static.toDataElement = function ( domElements, converte // TODO: Improve handling of missing files. See 'isError' in MWBlockImageNode#toDataElement li = domElements[ 0 ]; - img = li.querySelector( 'img' ); + img = li.querySelector( 'img,audio,video' ); // Get caption (may be missing for mode="packed-hover" galleries) captionDiv = li.querySelector( '.gallerytext' );