目录

Screen Capture FAQs

AV_SCREEN_CAPTURE_ERR_OPERATE_NOT_PERMIT When Starting Screen Capture

[h2]Symptom

Setting screen capture parameters or starting screen capture fails.

[h2]Possible Causes

  1. The number of instances exceeds the current limit of two instances per data format.

  2. The policy for keeping screen capture running during calls is not set, so screen capture cannot start.

  3. The screen capture configuration exceeds the supported limits, so screen capture cannot start.

[h2]Solution

  1. If screen capture stops because its state changes, asynchronously release screen capture resources in OH_AVScreenCapture_SetStateCallback(), the state callback.

    Screen capture session limits:

    • A maximum of four client applications can coexist, such as meeting screen sharing, meeting screen projection, background music recognition, and system screen recording.

    • Each application can create up to two instances per mode (saving to a file or a stream). A typical scenario is recording an online meeting while sharing the screen.

  2. From API version 20, use OH_AVScreenCapture_StrategyForKeepCaptureDuringCall() to set the policy for keeping screen capture running during cellular calls.

  3. When screen capture starts in file mode, the video encoding parameters are checked against the supported limits. The video bitrate (videoBitrate) must be in the range [1, 30000000], in bits per second (bit/s). Values outside this range cause startup to fail. Check and adjust the screen capture configuration.