Bladeren bron

Fix issue with not being able to pause video (#4367)

Bartosz Dryl 1 jaar geleden
bovenliggende
commit
5a4c752e48

+ 1 - 0
packages/atlas/src/hooks/useSegmentAnalytics.ts

@@ -50,6 +50,7 @@ export const useSegmentAnalytics = () => {
   const trackVideoView = useCallback(
     (videoId: string, channelId: string, channelTitle: string, description: string, isNft: boolean) => {
       analytics.track('video viewed', {
+        videoId,
         channelId,
         channelTitle,
         description,

+ 4 - 2
packages/atlas/src/views/viewer/VideoView/VideoView.tsx

@@ -259,6 +259,8 @@ export const VideoView: FC = () => {
     setShareDialogOpen(true)
   }
 
+  const isNft = !!nftWidgetProps
+
   const handleAddVideoView = useCallback(() => {
     if (!videoId || !channelId) {
       return
@@ -276,9 +278,9 @@ export const VideoView: FC = () => {
       channelId ?? 'no data',
       channelName ?? 'no data',
       videoDescription ?? 'no data',
-      !!nftWidgetProps
+      isNft
     )
-  }, [addVideoView, channelId, videoId, channelName, videoDescription, nftWidgetProps, trackVideoView])
+  }, [videoId, channelId, addVideoView, trackVideoView, channelName, videoDescription, isNft])
 
   if (error) {
     return <ViewErrorFallback />