<activityandroid:name="com.tencent.rtmp.video.TXScreenCapture$TXScreenCaptureAssistantActivity"android:theme="@android:style/Theme.Translucent"/>
encParams in startScreenCapture(), you can specify the encoding quality of screen sharing. If encParams is set to null, the SDK will use the encoding parameters set previously. We recommend the following settings:Item | Parameter | Recommended Value for Regular Scenarios | Recommended Value for Text-based Teaching |
Resolution | videoResolution | 1280 × 720 | 1920 × 1080 |
Frame rate | videoFps | 10 fps | 8 fps |
Highest bitrate | videoBitrate | 1600 Kbps | 2000 Kbps |
Resolution adaption | enableAdjustRes | NO | NO |
videoBitrate) refers to the highest output bitrate when a shared screen changes dramatically. If the shared content does not change a lot, the actual encoding bitrate will be lower.public void showView(View view, int width, int height) {mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);int type = WindowManager.LayoutParams.TYPE_TOAST;// `TYPE_TOAST` applies only to Android 4.4 and later. On earlier versions, use `TYPE_SYSTEM_ALERT` (the permission needs to be declared in `manifest`).// Android 7.1 and later set restrictions on `TYPE_TOAST`.if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {type = WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY;} else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {type = WindowManager.LayoutParams.TYPE_PHONE;}mLayoutParams = new WindowManager.LayoutParams(type);mLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;mLayoutParams.flags |= WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH;mLayoutParams.width = width;mLayoutParams.height = height;mLayoutParams.format = PixelFormat.TRANSLUCENT;mWindowManager.addView(view, mLayoutParams);}
TRTCCloudListener.TRTCCloudListener.Feedback