appleple / modal-video

https://appleple.github.io/modal-video/
MIT License
268 stars 79 forks source link

Fix for issue #73 #74

Closed obj63mc closed 3 years ago

obj63mc commented 3 years ago

Removing the default options for list and playlist as if included with the video id it will not load. This will fix issue #73

obj63mc commented 3 years ago

The functionality still works, you just simply include the options when initializing the button -

<button data-video-id=""></button>
new ModalVideo(document.querySelector('button'), {channel: 'youtube', list:'music', listType:'search'});

or

<button data-video-id=""></button>
new ModalVideo(document.querySelector('button'), {channel: 'youtube', playlist:'ID'});

Per youtube's docs if you are going to embed a playlist or list type such as search, user etc, then you should not have a video id in the url