diff --git a/src/js/core.js b/src/js/core.js index 712b814c..4b1001b3 100644 --- a/src/js/core.js +++ b/src/js/core.js @@ -692,25 +692,26 @@ type = obj.type || obj.opts.type; src = obj.src || ''; - if ( !type && src ) { + if ( (type === undefined || type === "") && (src !== undefined && src.length > 0) ) { if ( src.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.(jp(e|g|eg)|gif|png|bmp|webp|svg|ico)((\?|#).*)?$)/i) ) { type = 'image'; - } else if ( src.match(/\.(pdf)((\?|#).*)?$/i) ) { type = 'pdf'; - } else if ( found = src.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i) ) { type = 'video'; - - if ( !obj.opts.videoFormat ) { - obj.opts.videoFormat = 'video/' + ( found[1] === 'ogv' ? 'ogg' : found[1] ); - } - } else if ( src.charAt(0) === '#' ) { type = 'inline'; } } + if (type === 'video') + { + found = src.match(/\.(mp4|mov|ogv)((\?|#).*)?$/i) + if ( !obj.opts.videoFormat ) { + obj.opts.videoFormat = 'video/' + ( found[1] === 'ogv' ? 'ogg' : found[1] ); + } + } + if ( type ) { obj.type = type; @@ -1655,8 +1656,16 @@ case 'video' : + var thumb = slide.opts.thumb; + var poster = ""; + + if (thumb!==undefined && thumb!=="") + { + poster = 'poster="' + slide.opts.thumb + '" preload="auto"'; + } + self.setContent( slide, - '