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

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
Multiple Galleries with Magnific Popup
Pass data-attribute value of clicked element to ajax settings

Categories

HOME
testng
netsuite
amazon-ec2
deezer
webstorm
frameworks
jxls
mvvmcross
node-notifier
contact
metatrader4
quicklook
etl
commonmark
fallback
windows-server-2012
iron-router
windows-7-x64
oxyplot
extjs5
format-specifiers
sqlcipher
javacv
tdd
react-css-modules
fabric8
key-value-observing
http-status-code-503
typed.js
catch-all
webtest
stringtemplate
mpmediaquery
html5-fullscreen
wpf-controls
jquery-bootgrid
document.write
bootstrapper
awt
quadratic-programming
jvm-languages
modelmapper
sencha-touch-2.3
termination
upstart
svmlight
statsd
knockout-components
windows-iot-core-10
namecoin
mako
imanage
bind9
orthogonal
eventkit
time-and-attendance
xcb
gridpane
sts-springsourcetoolsuite
adxstudio-portals
autorest
moveit
hill-climbing
essence
wapiti
ruby-2.2
geonetwork
tablelayout
google-reader
doskey
undefined-reference
picturefill
dir
spring-io
dataservice
padarn
pygit2
free-variable
bitsharp
javaspaces
objective-c-2.0
getmessage
gnu-prolog
mod-auth
self-extracting
jmock
google-friend-connect
filtered-index
ext3
bespin
web-architecture
data-acquisition
multiple-languages
caching-application-block

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