-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature/web]: Add Support for Flutter Web (sample provided) #14
Comments
Thanks, will take a deep look once find some free time. |
Hello @Ahmadre , I'm trying to find a way to create thumbnail on Flutter Web. can you explain how I can achieve it using this? I had two data that can hold my video, using image_picker_for_web that gives a network path or a byte data. |
I see that you are the one who develop image_picker_web, how can I use this code using your package? can I use html.File for the path? Thank you for the help @Ahmadre |
Hi, any updates on this one? Are we planning to add Flutter web support to this package? |
Not working with latest html version |
Any updates on this? |
1 similar comment
Any updates on this? |
Any update? Thanks. |
did any one figure out this? |
Hi, Here you have a newer working version with CORS enabled:
Regards. |
Check out #135 PR. Clone the repo (unfortunately
Add it to your dependencies:
video_thumbnail:
path: ../video_thumbnail/video_thumbnail I have already tested it with video_editor.mp4 |
Can you give us a sample project for web? I'm getting error when i run git clone code: [video_thumbnail/video_thumbnail_web] flutter pub get Please make sure you have the correct access rights |
https://stackoverflow.com/a/51820472/4609658 use https link ( instead of |
Actually i'm running https url (git clone -b feat-web_implementation https://github.com/maRci002/video_thumbnail.git) This is my vscode terminal output:
And this is my Output window:
|
Okay I think I got it. Recently I made a commit to avoid local path and replace with git path and your output window using different SSH agent than the terminal I think if you run So currently you do not need to manually clone the project and configuring local path, instead you can use this: video_thumbnail:
git:
url: git@github.com:maRci002/video_thumbnail.git
ref: feat-web_implementation
path: video_thumbnail But I think this way you will get the same error, since the SSH agent which is used by Output window is not registered in your Github's SSH keys. If you cannot add SSH key to your github account for output window then
dependencies:
video_thumbnail:
path: ../video_thumbnail/video_thumbnail |
Thank you so much. Your last opinion worked! I'm normally call thumnail data like "final thumbData = await VideoThumbnail.thumbnailData(.." for ios-android. |
I think example is updated, you can also check out readme. XFile thumbnailFile = await VideoThumbnail.thumbnailFile( ... );
final image = kIsWeb ? Image.network(thumbnailFile.path) : Image.file(File(thumbnailFile.path));
final uint8list = await VideoThumbnail.thumbnailData( ... );
final image = Image.memory(uint8list ); |
If I'm not mistaken, the video needs to be called via the url to be able to create thumbnails on the web? |
You can use localy picked files too since it lives on the filesystem and in that case the underlying VideoElement is smart enough to not create network calls with range headers. In the example you can pick a media, for test choose a long one. |
@maRci002 Sorry for the late reply due to the holiday. I was able to create thumbnail on web in debug mode but when i send it to hosting chrome gives below error. I think I'm getting this error because the plugin folder is on root? If so how can I include this folder in release?
|
@maRci002 Thank you for making this addition to support thumbnail generation on the web! I just tried your branch and it works perfectly. Do you know what's the timeline to merge your PR ? |
Unfortunately, I don't have a timeline for the merge since I've just made the PR. It appears that the author of this package is no longer active. |
Ok thank you for the information and for your work! |
@maRci002 If this package is abandoned and you feel like creating your own package from this one, I think it would be popular, because I've met many comments online from people looking for a solution to generate thumbnails for videos on the web. |
@mehmetemregokberk sorry to go back to this but I had the same issue with the same responses and all. As @maRci002 said is a problem with the SSH key, in my case the Key on my mac to authenticate to GitHub was outdated (you can check by running What worked for me was removing the old key following this official instructions: https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/ (from https://github.com/orgs/community/discussions/50878) and then adding new SSH keys to my account following the instructions on the link that maRci002 provided: https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account |
Playing with SSH is not fun at all. In my case, Git Bash was configured while PowerShell was not. Git, during the installation phase, asks if it should use the operating system's SSH agent or its own, so every terminal might work differently. Furthermore, if your project is managed via CI/CD on the cloud, it has its own terminal. https://dart.dev/tools/pub/dependencies#git-packages dependencies:
video_thumbnail:
git:
url: https://github.com/maRci002/video_thumbnail.git
ref: feat-web_implementation
path: video_thumbnail |
I encountered,. that this package only works for ios and android.
I got pure 100% dart solution for flutter web:
Maybe you can combine that with your platform channels and create a platform interface :).
Code ported from: https://cwestblog.com/2017/05/03/javascript-snippet-get-video-frame-as-an-image/
The text was updated successfully, but these errors were encountered: