Skip to content

Instantly share code, notes, and snippets.

@hugofabricio
Created March 13, 2017 19:00
Show Gist options
  • Save hugofabricio/82b593deb9b2349136747d7a64662e54 to your computer and use it in GitHub Desktop.
Save hugofabricio/82b593deb9b2349136747d7a64662e54 to your computer and use it in GitHub Desktop.
class Player {
constructor() {
console.log('>>> Player constructor');
this.initPlayer();
}
initPlayer() {
$('.video').each(function(index, element){
let video = $(this);
let source = video.data('source');
let poster = video.data('poster');
let parent = video.data('parent');
new Clappr.Player({
source: source,
poster: poster,
parentId: parent
});
});
}
}
export default Player;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment