setPlayerOption [2/2]

Set media player options for providing technical previews or special customization features.

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


The media player supports setting options through key and value. In general, you don't need to know about the option settings. You can use the default option settings of the media player.

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.

Attention: Ensure that you call this method before open or openWithMediaSource.


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


  • 0: Success.
  • < 0: Failure.