mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: improve YouTube videoIds detection
This commit is contained in:
parent
d703bb1865
commit
47a96d84d2
3 changed files with 10 additions and 1 deletions
|
|
@ -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])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue