HTML5 responsive popup video
A simple script of jquery emulating a video clip in the modal window. The video is response.
A simple script jquery embeding a video clip in a modal window. Video is responsive.
Example/Example
--open video --How to use / How to use
Jquery / Required library jquery is required
In the first step we attach the script js and css.
In the first step, we attach the script js and css.
<script src="js/videopopup.js"></script>
<link rel="stylesheet" type="text/css" href="css/videopopup.css" media="screen" />In HTML code, for example:
In the HTML code for example:
<a href="javascript:void(0)" id="video1">-- open video --</a>
<div id="vidBox">
<div id="videCont">
<video autoplay id="v1" loop controls="controls">
<source src="video/VideoPopUpHTML5.webm" type="video/webm">
<source src="video/VideoPopUpHTML5.mp4" type="video/mp4">
</video>
</div>
</div>
Initiate in code js
We initiated the js code
<script type="text/javascript">
$(function () {
$('#vidBox').VideoPopUp({
backgroundColor: "#17212a",
opener: "video1",
maxweight: "640",
idvideo: "v1"
});
});
</script>
Options / Options
backgroundColor: "#000000" - background color (default black) / background color (default is black)
opener: "video" - id tag html after clicking which window opens with video / id tag html click which opens a window with a video clip
maxweight: "640" - maximum video width / maximum width video
pausevideo: false - whether after closing the video window to stop or pause / or when you close the video window has to stop or pause (default false - then stops)
idvideo: "" - mandatory id main div / required id of the first div
Below the download script. The script can be used both privately and commercially.
If you put a link to my website somewhere, I'll be grateful but it's not mandatory.
The following script for download. The script can be used both privately and commercially.
If you put somewhere a link to my site I would appreciate but it is not ticketory.