-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Describe the bug
In iOS release mode, video recordings contain frozen frames at the end. The MediaRecorder creates videos with incorrect timestamps where the last frame is held/repeated for an extended duration. For example, a 3-second recording appears as 12-13 seconds with the video being the last frame frozen from the 3rd seconds until the end of the webRTC session. This issue only occurs in release mode - debug builds work correctly.
To Reproduce
Build Flutter app in release mode on iOS device
Use flutter_webrtc MediaRecorder to record video from a WebRTC stream
Record multiple short videos (e.g., two 3-second recordings)
Stop recording and wait couple of seconds before ending the session
check the video file duration with videoController
The output will show frozen frames
Expected behavior
Videos should maintain correct duration (3 seconds recorded = 3 seconds in file)
No frozen frames should appear at the end of recordings
Platform information
Flutter version: 3.32.5
Plugin version: flutter_webrtc 1.0.0
OS: iOS
Xcode - develop for iOS and macOS (Xcode 16.4)