Discussions
Flickering and Lag with Streaming Avatar on Mobile via LiveKit
Hi HeyGen team,
I'm building a mobile app using the HeyGen Streaming Avatar SDK in combination with LiveKit for real-time video calls between a user and an avatar.
While the streaming avatar works perfectly when tested directly via the HeyGen web interface, I’m experiencing visual issues when running the same stream on mobile devices (iOS). The avatar stream exhibits intermittent flickering and short frame freezing during calls. These issues don’t appear in the browser-based tests, only on mobile.
Implementation stack:
- React Native
- WebRTC via @livekit/react-native + react-native-webrtc
- HeyGen Streaming API using TaskType.REPEAT for speech
- Avatar video rendered using RTCView in React Native
I suspect this may be related to one or more of the following:
- Mobile WebRTC performance (hardware decoding?)
- Region latency (I'm testing from Europe — is the streaming routed via the US?)
- Insufficient buffering or dropped frames over the LiveKit connection
Are there any recommended settings or best practices for optimizing mobile avatar playback? For example:
- Preferred video_encoding?
- Streaming quality (low, medium, high) for mobile? I am currently using "medium"
- Any known issues using RTCView for avatar display?
Thanks in advance for your support, this product is fantastic, and I’d love to ensure the best experience for mobile users.