Issue Description
Video tracks configured with a mirror effect display correctly for an initial brief duration before automatically returning to the standard non mirrored view. This behavior occurs without explicit user action or input modifications during active streaming sessions, leading to a visual mismatch between local preview expectations and runtime rendering.
Platform/SDK
Framework: Electron
Service: Agora Video SDK for Electron
Root Cause
The unintended reversion originates from an unmaintained rendering state within the client integration layer. When the media pipeline executes a video track rendering update or triggers a view refresh, the layout context is reinitialized.
Because the custom mirror parameter is not bound dynamically to the ongoing component lifecycle, the view resets to the default camera orientation during the update sequence. The system fails to evaluate the previously specified mirroring flag upon drawing the new video frames, which leads to the loss of the mirror effect.
Step by Step Solution
Review Mirroring Logic
Review the mirroring logic in your video integration code. Follow the recommended best practices from the Agora Electron SDK documentation for applying mirror effects.
Persist Mirror State
Ensure that the mirror state parameter remains consistent and is reapplied whenever the video track is re-rendered or updated.
Immediate Workaround
As an immediate workaround, you can manually toggle the
transformproperty using CSS:/* Enable mirror */ transform: rotateY(180deg); /* Disable mirror */ transform: rotateY(0deg);Test this change to confirm that the video correctly mirrors as intended.
Summary
The problem stems from the client’s integration method, which resets the mirror state after rendering updates. Adjusting the code to maintain the mirror state resolves the issue.
Corresponding Document /Link
- CSD-77304