You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability record a movie, exposed to Dart code #8245
Similar to #8244, but recording movies instead of screenshots.
The raw bytes of the movie will be too big, so we'll need to use libffmpeg to encode it. Any sufficiently compressing codec that's playable in a browser by default will do (mp4 may not be suitable because of licensing requirements). We also don't want to statically link the engine against libffmpeg, so we'll have to dlopen it.
In testing, this will be especially handy when you have continuous integration tests being run in an automated remote environment. Failing tests can provide a link to the movie recording of what the test was doing, which will provide insight into the test failure.
Initial take on what the Dart API would look like (in dart:ui):
/// Represents a movie recording of the current frame buffer activity.classScreenRecording {
/// Creates a new `ScreenRecording`. /// /// Recording will commence immediatly and will continue until [stop] is /// called (unless [duration] is specified, in which case the recording will /// automatically be stopped after the specified duration).ScreenRecording([Duration duration]);
/// Gets the stream of encoded bytes produced by the recording. /// /// These bytes will be encoded using the <TODO> codec.Stream<List<int>> get stream;
/// Stops recording. The recording's [stream] will send a "done" event after /// the final bytes of the recording have been sent. /// /// If the recording is already stopped, a [StateError] will be thrown.voidstop();
/// Whether the recording has been stopped, either automatically or explicitly /// using [stop].boolget isStopped;
}
We'll have to make it clear in the docs that device deployments will have to bundle libffmpeg in order to be able to use this...
@zoechi Is this going to be picked in the near future?
If not, is there any other way I can achieve this in a graceful manner?
Would be a good add-on since most of the existing sdk's like appsee and uxcam do not work on flutter ui. I want this for initial testing of my app and see how user's are interacting with it.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
tvolkert commentedon Feb 17, 2017
Initial take on what the Dart API would look like (in
dart:ui):We'll have to make it clear in the docs that device deployments will have to bundle
libffmpegin order to be able to use this...@abarth for thoughts
ishaan1995 commentedon Jul 9, 2019
@zoechi Is this going to be picked in the near future?
If not, is there any other way I can achieve this in a graceful manner?
Would be a good add-on since most of the existing sdk's like appsee and uxcam do not work on flutter ui. I want this for initial testing of my app and see how user's are interacting with it.
tvolkert commentedon Jul 17, 2020
We're unlikely to do this in the foreseeable future.
The https://github.com/flutter/assets-for-api-docs repository has code to use a test widgets binding to go one frame at a time, capturing screenshots, then assemble them into a video after the fact. It's how we achieve animations like the one in https://api.flutter.dev/flutter/widgets/Image/loadingBuilder.html
tvolkert commentedon Mar 22, 2023
We're unlikely to ever do this, so closing.
github-actions commentedon Apr 5, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.