Plugin created for jQuery to load videos from YouTube, Vimeo and Kaltura using the URL.
The method used is .videoBox().
Method:
$(".video-div").videoBox();
Add the attribute in HTML data-youtube with the video URL.
HTML page:
<div class="video-div" data-youtube="https://www.youtube.com/watch?v=lXtvSyj87TU"></div>
Adding parameters to the method:
The parameters are based on YouTube API, but the parameters of width and height were added.
$(".video-div").videoBox({
controls: 0
});
Example: https://jsfiddle.net/ted_k/uypnkcjh/2/
Parameters | Default Value |
---|---|
width | 640 |
height | 360 |
loop | false |
autoplay | false |
byline | true |
color | "00adef" |
maxheight | |
maxwidth | |
portrait | true |
title |
----------
Add the attribute in HTML data-vimeo vimeo with video URL
HTML page:
<div class="video-div" data-vimeo="https://vimeo.com/77696897"></div>
Adding parameters to the method:
The parameters are in the table below:
$(".video-div").videoBox({
autoplay: true
});
Example: https://jsfiddle.net/ted_k/uypnkcjh/4/
Parameters | Default Value |
---|---|
width | 640 |
height | 360 |
loop | false |
autoplay | false |
byline | true |
color | "00adef" |
maxheight | |
maxwidth | |
portrait | true |
title |
----------
Add the attribute in HTML data-kaltura kaltura with video partner_id
HTML page:
<div class="video-div" data-kaltura="243342"></div>
Adding parameters to the method:
The parameters are in the table below:
$(".video-div").videoBox({
partner_id: "243342",
uiconf_id: "12905712",
entry_id: "0_uka1msg4"
});
Example: https://jsfiddle.net/ted_k/uypnkcjh/7/
Parameters | Default Value |
---|---|
partner_id | 243342 |
uiconf_id | 12905712 |
entry_id | 0_uka1msg4 |
width | 640 |
height | 360 |
switchOnResize | false |
simpleFormat | true |
displayMode | "sizebitrate" (sizebitrate |
inlineScript | false |
hideSource | null |
autoPlay | false |