mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-03 02:09:45 +07:00
33 lines
700 B
JavaScript
33 lines
700 B
JavaScript
// This use the plyr plugin, for more information use the link above
|
|
// https://github.com/sampotts/plyr
|
|
|
|
define(['jquery', 'lodash', 'plyr'],
|
|
function ($, _, plyr) {
|
|
$(document).ready(function() {
|
|
'use strict';
|
|
var YoutubePlayer = {
|
|
init: function() {
|
|
this.startPlayer();
|
|
this.getCss();
|
|
},
|
|
|
|
getCss: function() {
|
|
$('head').append('<link>');
|
|
var css = $('head').children(':last');
|
|
css.attr({
|
|
rel: 'stylesheet',
|
|
type: 'text/css',
|
|
href: 'https://cdn.plyr.io/2.0.13/plyr.css'
|
|
});
|
|
},
|
|
|
|
startPlayer: function() {
|
|
plyr.setup({
|
|
//Pass extra options here if needed
|
|
});
|
|
}
|
|
};
|
|
YoutubePlayer.init();
|
|
});
|
|
});
|