8000 Fix video rendering on pre-Lollipop · simphiwehlabisa/flutter-webrtc@d7bf924 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit d7bf924

Browse files
authored
Fix video rendering on pre-Lollipop
1 parent afb6f2c commit d7bf924

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

android/src/main/java/com/cloudwebrtc/webrtc/utils/EglUtils.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.cloudwebrtc.webrtc.utils;
22

3+
import android.os.Build;
4+
35
import org.webrtc.EglBase;
46

57
public class EglUtils {
@@ -16,7 +18,10 @@ public class EglUtils {
1618
*/
1719
public static synchronized EglBase getRootEglBase() {
1820
if (rootEglBase == null) {
19-
rootEglBase = EglBase.create();
21+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP)
22+
rootEglBase = EglBase.createEgl10(EglBase.CONFIG_PLAIN);
23+
else
24+
rootEglBase = EglBase.create();
2025
}
2126

2227
return rootEglBase;

0 commit comments

Comments
 (0)
0