feat: improve YouTube videoIds detection

This commit is contained in:
swve 2024-05-03 17:28:35 +02:00
parent d703bb1865
commit 47a96d84d2
3 changed files with 10 additions and 1 deletions

View file

@ -25,7 +25,8 @@ function VideoActivity({ activity, course }: { activity: any; course: any }) {
React.useEffect(() => {
if (activity && activity.content && activity.content.uri) {
setVideoId(getYouTubeEmbed(activity.content.uri).videoId)
var getYouTubeID = require('get-youtube-id');
setVideoId(getYouTubeID(activity.content.uri))
}
}, [activity, org])