HTML5 responsive popup video
Einfaches Jquery-Skript, das Video-Clip in einem Modalfenster positioniert. Video ist responsive.
Ein simple script jquery embedding a video clip in a modal window. Video ist responsive.
Beispiel/Example
--open video --open videoWie zu verwenden / How to use
Die Bibliothek jquery / Required Library jquery ist erforderlich
Im ersten Schritt fügen wir das js- und css-Skript hinzu.
In der ersten Steppe, in den Attach the script js and css.
<script src="js/videopopup.js"></script>
<link rel="stylesheet" type="text/css" href="css/videopopup.css" media="screen" />Im HTML-Code zum Beispiel:
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>
Initiieren im Code js
We initiate the js code
<script type="text/javascript">
$(function () {
$('#vidBox').VideoPopUp({
backgroundColor: "#17212a",
opener: "video1",
maxweight: "640",
idvideo: "v1"
});
});
</script>
Optionen / Optionen
BackgroundColor: "#000000" - Hintergrundfarbe (Standard schwarz) /background color (default is black)
opener: "Video" - id Tagu html nach dem Klick auf ein Fenster mit Video / id tag html click which opens a window with a video clip
maxweight: "640" - maximale Breite des Videos / Maximum width video
pausevideo:false - ob nach dem Schließen des Videofensters das Video anhalten oder stoppen soll / or when you close the video window has to stop or pause (default false - then stops)
idvideo: "" - obligatorisch id haupt div / required id of the first div
Unterhalb des Download-Skripts Das Skript kann sowohl privat als auch kommerziell verwendet werden.
Wenn du einen Link zu meiner Website platzierst, bin ich dir dankbar, aber er ist nicht obligatorisch.
Die Following-Script für den Download. The script can be used both privatly and commercially.
If you put somewhere a link to my site I would appreciate but it is not mandatory.