course-starter-r
course-starter-r copied to clipboard
Embedding videos
Hi @ines!
Thanks for your great work and the course templates! :clap:
I saw that in your spaCy course you now also have videos. Are you planning to put those in the templates as well?
If you could hint me to the files/relevant lines I could give it a try myself and create a PR.
Thanks and sorry for the late reply! The relevant code is pretty much all here: https://github.com/ines/spacy-course/blob/master/src/components/slides.js Here's the summary of the changes I made to spacy-course
: https://github.com/ines/spacy-course/commit/7823361f1ceb54f75bfb7a64f5f65f6bc935b9bf
Most of the heavy lifting is done by the plyr
library. I've also added some custom logic to allow setting a custom start and end timestamp for the video, so you can use one single video (e.g. on YouTube) and reference that across the chapters 🙂