Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 201
Anita Graham Avatar asked Jan 08 '14 04:01

Anita Graham


People also ask

How do I create a magnific popup?

Magnific requires it's own CSS code in order to display things properly. Simply add the magnific-popup. css to your page like a normal CSS document. You should include it after your reset/normalize, but before your own styles.

How do I use Magnific popup in wordpress?

All you need to do to use Magnific Popup on a link is to add specific css class to 'a' tag. CSS class names can be configured on settings page. For images you can use alt attribute to add captions. This plugin is only basic version and does not support all features of Magnific Popup yet.

What is Magnific popup CSS?

Magnific Popup is a fast, light, mobile-friendly and responsive lightbox and modal dialog jQuery plugin. It can be used to open inline HTML, ajax loaded content, image, form, iframe (YouTube video, Vimeo, Google Maps), and photo gallery. It has added animation effects using CSS3 transitions.


2 Answers

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

like image 78
Dmitry Semenov Avatar answered Sep 29 '22 05:09

Dmitry Semenov


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>
like image 32
Sky Yip Avatar answered Sep 29 '22 04:09

Sky Yip