[bug] Codec H264 on Android Screen-share non-functional
Describe the bug
When using H264 with Android screen-share, the local participant will see the video rendered correctly in their local UI viewer. However, other remote participants instead see no video rendered/produced. Remote participants are notified of the new track being publish/subscribed, but the VideoTrackRenderer does not render any video.
VP8 is not impacted by this bug and works as intended. iOS/Browsers are not impacted by this H264 bug when they are the publisher of screen-sharing. Other OSs not tested.
To Reproduce Switch the default codec to H264 within the example demo app. Try to share your screen on Android. I have also independently verified this bug behavior within my own private application.
Expected behavior Android screen-share video should be rendered by remote participants, and not just the local participant.
Platform information
- Flutter version:
[√] Flutter (Channel stable, 3.13.5, on Microsoft Windows [Version 10.0.22621.2283], locale en-US)
• Flutter version 3.13.5 on channel stable at C:\flutter
• Upstream repository https://github.com/flutter/flutter
• Framework revision 12fccda598 (3 weeks ago), 2023-09-19 13:56:11 -0700
• Engine revision bd986c5ed2
• Dart version 3.1.2
• DevTools version 2.25.0
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at C:\Users\alden\AppData\Local\Android\sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop Windows apps (Visual Studio Build Tools 2019 16.11.29)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
• Visual Studio Build Tools 2019 version 16.11.33927.289
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2022.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
[√] VS Code (version 1.83.0)
• VS Code at C:\Users\alden\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.74.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22621.2283]
• Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.150
• Edge (web) • edge • web-javascript • Microsoft Edge 117.0.2045.47
[√] Network resources
• All expected network resources are available.
• No issues found!
-
Plugin version:
ref: main - Flutter target OS: `Android (physical Pixel 6 Pro)
-
Flutter target OS version:
Android 13 -
Flutter console log:
Very long, trust me.
Screenshots
i have this situation too, i am not sure the codec but on my Samsung it's looks well at host phone, but viewers can not see anything only black screen.
Same issue for me. I'm using the SDK version 2.2.0 for native android and testing with Xiaomi Redmi 10C. VP8 works fine, but I'm just trying to understand if H264 would benefit my use case, but I can't get it to work.