magnific-popup


Magnific Popup with html5 video


How to use magnific-popup to retrieve and popup an html5 video from my server instead of getting the video from youtube, vimo, ...?
<video width="500" height="350" controls>
<source src="/static/video/bunny.mp4" type="video/mp4" />
Your browser does not support this video format.
</video>
Thanks.
I have got this to work using the following as a link to open the video:
<a class="popup-player" href="/static/video/bunny.mp4">
video link
</a>
and then used the Iframe type to display it:
$('.popup-player').magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false,
iframe: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" frameborder="0" allowfullscreen></iframe>'+
'</div>',
srcAction: 'iframe_src',
}
});
This is a very basic version, it opens the video in an iframe but I have yet to work out how to change the things like the height and width. I'm still learning this stuff so I dont know how it works I just know it puts a video up on the screen. If you get it working and build a more complex version please let me know so I can improve my version.
I think that you should check basics first:
-if the path to plugin is correct and included correctly
<!-- Magnific Popup core CSS file -->
<link rel="stylesheet" href="magnific-popup/magnific-popup.css">
<!-- jQuery 1.7.2+ or Zepto.js 1.0+ -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script><br />
<!-- Magnific Popup core JS file --><br />
<script src="magnific-popup/jquery.magnific-popup.js"></script>
It’s not required, but we recommend placing CSS files in <head> and JavaScript files and initialization code in the footer of your site (before the closing </body> tag).
If you already have jquery.js on your site, don’t include it a second time, or use jQuery.noConflict(); mode. Optionally, you can include Zepto.js instead of jQuery, or choose which one to include based on browser support. ACCORDING->http://dimsemenov.com/plugins/magnific-popup/documentation.html
-if you have the movie on your server and if the path to it is correct.
/ is for getting into folder
Then JS:
$(document).ready(function() {
$('.image-link').magnificPopup({type:'image'});
});
For more information see the link I putted few lines above

Related Links

how to manually open and close the popup using Magnific-Popup
How to customize arrows and close button?
no closing “X” with inline content
How to prevent close
Magnific-Popup Loading iframe from non-video players URL
Magnific popup - put arrows inside of an image
magnific closeOnContentClick does not work
How can style popup iframe in Magnific Pop-Up?
Gallery with mixed content types
Title for iframe/video in magnific popup
Magnific Popup: Close floats to the right
Calling magnific-popup on button element instead of an anchor
Implement query.magnific-popup.js in dreamweaver cs5. Syntax error in original code
Magnific-popup event binding to popup content
Magnific Popup - Error when opening a you tube video
Magnific-Popup, Limit items to direct siblings

Categories

HOME
vim
log4j
amazon-ec2
image-processing
server
ngrx
layout
relative-path
tesseract
react-router
jsp-tags
elm
disassembler
cross-browser
directx
vifm
volttron
midi
resize
jqwidget
excel-vba-mac
custom-wordpress-pages
cloudhub
facebook-instant-articles
sox
p-value
microsoft-sync-framework
fish
spring-mybatis
xacml
fabric8
bcd
semantic-versioning
xmlreader
y86
amazon-kinesis-kpl
mapbox-gl
environment-modules
restlet
adobe-premiere
uft-api
ensembles
ncalc
gulp-sourcemaps
g-code
ibpy
import-from-excel
wptoolkit
google-datalayer
python-webbrowser
lift-json
snmptrapd
windows-iot-core-10
pearson
zendesk-app
jspdf-autotable
medium.com
slicknav
player
qpid
skype4py
r-tree
php-ci
sniffer
jsapi
c++03
website-monitoring
xc16
javafx-webengine
neolane
zend-route
starcluster
p4java
reactfx
oracle-warehouse-builder
algebraic-data-types
intentservice
rabl
android-hardware
factory-method
bitsharp
google-email-migration
parametric-equations
punbb
subgurim-maps
appender
locate
gdlib
asp.net-mvc-areas
forums
sustainable-pace

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App