Anita Graham
Anita Graham

Reputation: 441

Can I use magnific-popup to display an MP4 video?

I would like to use magnifico-popup to display a locally hosted mp4 file.

Do I need to define an iframe pattern for this or is there a simpler option.

Many thanks for your thoughts

Anita

Upvotes: 6

Views: 21899

Answers (3)

Joel Newcomer
Joel Newcomer

Reputation: 71

I'm going to add a comment here in response to Sky Yip because that solutions works beautifully EXCEPT that it doesn't work in Safari which is obviously a problem. More details here: https://github.com/dimsemenov/Magnific-Popup/issues/1149

Upvotes: 0

Sky Yip
Sky Yip

Reputation: 1089

You can use the type of content - iframe to open MP4 video:

<a class="mfp-iframe" href="MP4_VIDEO_PATH">Open MP4 video in iframe</a>

Upvotes: 5

Dmytro Semenov
Dmytro Semenov

Reputation: 4616

You'll need to integrate some third-party video player, for example http://mediaelementjs.com/

I'd recommend to use inline type of popup, as it allows you to open in popup any HTML code. http://dimsemenov.com/plugins/magnific-popup/documentation.html#inline-type

Related example: http://codepen.io/dimsemenov/pen/GtjBb

Upvotes: 10

Related Questions