SetAutoPlay

The error code.

void SetAutoPlay(bool auto_play, Error *err = nullptr);
Since
v4.5.0

Before you call OpenWithUrl to open the media stream, you can call this method to set whether to enable autoplay. The default setting is to enable autoplay.

Call timing

Call this method after OpenWithUrl.

Restrictions

None.

Parameters

auto_play
Whether to enable autoplay:
  • true: (Default) Yes.
  • false: No.
err
The state or error information: Error.