setPlayerOption [2/2]

Sets media player options.

virtual int setPlayerOption(const char* key, const char* value) = 0;

The media player supports setting options through key and value.

The difference between this method and setPlayerOption [1/2] is that the value parameter of this method is of type String, while the value of setPlayerOption [1/2] is of type String. These two methods cannot be used together.

Applicable scenarios

Scenarios that require technical previews or special customization features. In general, you do not need to call this method; you can simply use the default options provided by the media player.

Call timing

Call this method before the open or openWithMediaSource method.

Restrictions

None.

Parameters

key
The key of the option.
value
The value of the key.

Returns

  • 0: Success.
  • < 0: Failure.