livekit / client-sdk-flutter

Flutter Client SDK for LiveKit

Home Page:https://docs.livekit.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bug] Glitches when initializing video renderer (also with Hero)

Unbreathable opened this issue · comments

Describe the bug
When I initialize a video renderer or put it inside of a Hero widget to try and animate it, it always glitches when it is initialized. There is always this little black flickering or glitching when the thing starts to render video. There is also this platform message channel error that keeps popping up.

To Reproduce
Put a video renderer with the same video track into different pages and then try to switch between those two pages. You can also add a Hero widget to make it more obvious.
It should then look something like this (the video isn't embedded for some reason):
https://github.com/livekit/client-sdk-flutter/assets/70802809/b1e0e077-0461-4f77-907b-957fdca8cdac

Expected behavior
No glitched or black screen when initializing one of these video track renderers. If it appears when the track is first loaded that's totally fine since all the information isn't there yet, but the track flickering when changing between pages or during an animation causes serious issues for people with epilepsy and other related things.

Platform information

  • Flutter version: 3.19.2
  • Plugin version: 2.0.2
  • Flutter target OS: Linux
  • Flutter target OS version: Arch Linux (newest version)
  • Flutter console log:
[ERROR:flutter/shell/common/shell.cc(1038)] The 'FlutterWebRTC/Texture111002247562032' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1038)] The 'FlutterWebRTC/Texture111002246794256' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.
[ERROR:flutter/shell/common/shell.cc(1038)] The 'FlutterWebRTC/Texture111002247626992' channel sent a message from native to Flutter on a non-platform thread. Platform channel messages must be sent on the platform thread. Failure to do so may result in data loss or crashes, and must be fixed in the plugin or application code creating that channel.
See https://docs.flutter.dev/platform-integration/platform-channels#channels-and-platform-threading for more information.