I would like to do a login page using flare actor but the animation provided by 2Dimension site is not available is there any other recourses for downloading animation for flare actor
i tried in 2dimension site but it is not available
Related
I need to add the video player to my Flutter app. Is there a way to display video but use my own methods to play, pause and stop presenting the video?
Now I'm using video_player dart package and when I'm calling my methods it doesn't work, the video reacts only on methods called on controller from package.
I need something to display the video only(widget?) and be able to manage it by myself. Is it possible?
Hi You need to use chewie its based on The video_player plugin and provides low-level access to video playback.
here:- https://pub.dev/packages/chewie
You can use _ControlsOverlay or create your custom controller widget using stack for any video player.
I am building an app to play video like in youtube. Now I need to implement the play next and add to queue feature. I am using video_player 2.4.8 and chewie package. For the add to queue feature I created a List in Provider and played the video from next index as soon as the current index video had completed playing but now I found out that while in full screen mode the next video does not play when the current song completes playing but in normal screen it does. Could anyone help me with this and also what would be the best approach to implement add play next feature.
I maintained a List of songs to be played in provider and removed the first song of queue once it started playing.
void removeFirstSong() {
songQueue.removeAt(0);
updatedSongQueue.removeAt(0);
notifyListeners();
}
Then I played the first song from list after the current video completed.
I have a book with pictures. The task is that a each picture is attached to video, and when the camera hovers over the picture, the application should open another screen and play the video associated with the photo. i tried to use teachablemachine, but it cant detect if there's too many photos. Any ideas is highly appreciated. Thanks
You could use firebase's Object Detection and Tracking and Camera Plugin's image stream feature.
Basically, you would process each frame you get from camera plugin with Firebase's ML feature, and once you detect an object you can perform any action with it.
You can use Tensoflow Lite: https://www.tensorflow.org/lite
You have some dependencies for flutter, for example: https://pub.dev/packages/tflite
I am looking into creating a Flutter mobile app that live streams to YouTube using the YouTube Live Streaming API. I have checked the API and found that it does not offer a way to overlay text and images onto the livestream. How would I achieve this using Flutter?
I imagine this involves using the Stack widget to overlay content on top of the user's video feed. However this would somehow need to be encoded into the video stream to be sent to YouTube.
this type of work is usually done with FFmpeg
See this discussion for more info: https://video.stackexchange.com/questions/12105/add-an-image-overlay-in-front-of-video-using-ffmpeg
FFmpeg for mobile devices is made available by this project:
https://github.com/tanersener/mobile-ffmpeg
And then, as always, we have a flutter package called flutter_ffmpeg to allow us these features on flutter
https://pub.dev/packages/flutter_ffmpeg
TLDR: You can use CameraController (Camera package) and Canvas in Flutter for drawing the text. Unfortunately CameraController.startImageStream is not documented in the API docs, and is a 1 year+ GitHub issue.
Everytime the camera plugin gives you a video frame controller.startImageStream((CameraImage img) { /* your code */}, you can draw the image onto the canvas, draw the text, capture the video and call the YouTube API. You can see an example of using the video buffer in Tensorflow Lite package here or read more info at this issue.
On this same canvas, you can draw whatever you want, like drawArc, drawParagraph, drawPoints. It gives you ultimate flexibility.
A simple example of capturing the canvas contents is here, where I have previously saved the strokes in state. (You should use details about the text instead, and just pull the latest frame from the camera.):
Future<img.Image> getDrawnImage() async {
ui.PictureRecorder recorder = ui.PictureRecorder();
Canvas canvas = Canvas(recorder);
canvas.drawColor(Colors.white, BlendMode.src);
StrokesPainter painter = StrokesPainter(
strokes: InheritedStrokesHistory.of(context).strokes);
painter.paint(canvas, deviceData.size);
ui.Image screenImage = await (recorder.endRecording().toImage(
deviceData.size.width.floor(), deviceData.size.height.floor()));
ByteData imgBytes =
await screenImage.toByteData(format: ui.ImageByteFormat.rawRgba);
return img.Image.fromBytes(deviceData.size.width.floor(),
deviceData.size.height.floor(), imgBytes.buffer.asUint8List());
}
I was going to add a link to an app I made which allows you to draw and screenshot the drawing into your phone gallery (but also uses Tensorflow Lite), but the code is a little complicated. Its probably best to clone it and see what it does if you are struggling with capturing the canvas.
I initially could not find the documentation on startImageStream and forgotten I have used it for Tensorflow Lite, and suggested using MethodChannel.invokeMethod and writing iOS/ Android specific code. Keep that in mind if you find any limitations in Flutter, although I don't think Flutter will limit you in this problem.
I want to create a video player like youtube which will appear all over the screen like youtube app.
After minimize or back pressed this video will play like this for all screens:
You can try miniplayer dependencies and read how to persistence to pass miniplayer over all pages.
Use the same controller and pass it to a new widget( the one sitting down at bottom) and use hero animation to swap it there.