Skip to content

fix(feed): video duration calculated from Video component#1405

Open
sujal-into wants to merge 6 commits intomainfrom
bugfix/video-duration
Open

fix(feed): video duration calculated from Video component#1405
sujal-into wants to merge 6 commits intomainfrom
bugfix/video-duration

Conversation

@sujal-into
Copy link
Collaborator

fix #1348

@sujal-into sujal-into added the Social Feed Everything related to the Social Feed label Nov 21, 2024
@sujal-into sujal-into self-assigned this Nov 21, 2024
@netlify
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for teritori-dapp ready!

Name Link
🔨 Latest commit e1dad48
🔍 Latest deploy log https://app.netlify.com/sites/teritori-dapp/deploys/6740765b4844a8000856112c
😎 Deploy Preview https://deploy-preview-1405--teritori-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@netlify
Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for testitori ready!

Name Link
🔨 Latest commit e1dad48
🔍 Latest deploy log https://app.netlify.com/sites/testitori/deploys/6740765b933bb60008e0c941
😎 Deploy Preview https://deploy-preview-1405--testitori.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this downloads all videos when navigating on the /feed/videos page

we can't load all videos to render thumbnails

@WaDadidou WaDadidou changed the title fix: video duration calculated from Video component fix(feed): video duration calculated from Video component Nov 21, 2024
Comment on lines +128 to +135
<Video
source={{ uri: web3ToWeb2URI(video.videoFile.url) }}
onPlaybackStatusUpdate={getVideoDuration}
videoStyle={{
height: 0,
width: 0,
}}
/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must find another solution

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Experimented with new approach:
749be8b
738d456
fc32d31
19a7b6e
e1dad48

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best thing would be to store the duration at the post's creation. It's another PR that we have to pause before making some refactos

Copy link
Collaborator

@n0izn0iz n0izn0iz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still downloads all videos

@sujal-into
Copy link
Collaborator Author

still downloads all videos

There is two approach, I have taken.

  1. Get the video duration while showing the video card
  2. Add the video duration when uploading the video

If it is downloading video in first approach, we can implement the second one. If second one is also not working then we can ask user to manually enter the video duration like you said earlier in this issue.

@sujal-into sujal-into requested a review from n0izn0iz November 26, 2024 04:38
@n0izn0iz
Copy link
Collaborator

In the issue I said to do 2.

@sujal-into
Copy link
Collaborator Author

In the issue I said to do 2.

Okay, so should i remove the approach one? In the second approach i did some refactoring. I also added new package MP4Box. Is the solution okay?

@WaDadidou
Copy link
Collaborator

In the issue I said to do 2.

@sujal-into , We need to refato. You can consider this issue as standed by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Paused Social Feed Everything related to the Social Feed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(feed): Video duration is always 00:00

3 participants