File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
4646 const [ player , setPlayer ] = useState < any > ( null ) ;
4747 const searchParams = useSearchParams ( ) ;
4848 const vidUrl = options . sources [ 0 ] . src ;
49+ const href = window . location . href ;
50+ const courseId = href . split ( '/' ) [ 4 ] ;
4951
5052 const togglePictureInPicture = async ( ) => {
5153 try {
@@ -476,9 +478,8 @@ export const VideoPlayer: FunctionComponent<VideoPlayerProps> = ({
476478
477479 if ( isYoutubeUrl ( vidUrl ) ) return < YoutubeRenderer url = { vidUrl } /> ;
478480
479- //TODO: Figure out how to get the courseId
480481 if ( appxVideoId )
481- return < AppxVideoPlayer courseId = { '14' } videoId = { appxVideoId } /> ;
482+ return < AppxVideoPlayer courseId = { courseId } videoId = { appxVideoId } /> ;
482483
483484 return (
484485 < div
You can’t perform that action at this time.
0 commit comments