VideoBox
#EN | #PT-BR
Plugin created for jQuery to load videos from YouTube and Vimeo, using the URL.
Documentation
The method used is .videoBox().
Method:
$(".video-div").videoBox();YouTube:
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 });Vimeo:
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 });| Parameters | Default Value |
|---|---|
| width | 640 |
| height | 360 |
| loop | false |
| autoplay | false |
| byline | true |
| color | "00adef" |
| maxheight | |
| maxwidth | |
| portrait | true |
| title |
Documentação PT-BR
O método a ser usado é o .videoBox().
Chamada do Método:
$(".video-div").videoBox();Usando YouTube:
Adicione o atributo no HTML data-youtube com a URL do vÃdeo.
HTML da página:
<div class="video-div" data-youtube="https://www.youtube.com/watch?v=lXtvSyj87TU"></div>Adicionando parâmetros para o método:
Os parâmetros são baseadas na YouTube API, mas foram adicionados os parâmetros de width e height.
$(".video-div").videoBox({ controls: 0 });Usando Vimeo:
Adicione o atributo no HTML data-vimeo com a URL do vÃdeo HTML da página:
<div class="video-div" data-vimeo="https://vimeo.com/77696897"></div>Adicionando parâmetros para o método:
Os parâmetros estão na tabela abaixo:
$(".video-div").videoBox({ autoplay: true });| Parâmetro | Valor Padrão |
|---|---|
| width | 640 |
| height | 360 |
| loop | false |
| autoplay | false |
| byline | true |
| color | "00adef" |
| maxheight | |
| maxwidth | |
| portrait | true |
| title |
