I'm trying to configue a vimeo player using the "plyr html5 player". But as I try to send the source through js it simply won't work, Just gives me back the error player.source is not a function.
HTML:
<div id="p1_s2_vimeo-id" class="p1_s2-player" data-type="vimeo" data-video-id="">
JS:
var player = plyr.setup('.p1_s2-player', {
html: controls
});
player.source({
type: 'video',
title: 'Example title',
sources: [{
src: '143418951',
type: 'vimeo'
}]
});