setPlayerOption [1/2]
Sets media player options.
virtual int setPlayerOption(const char* key, int value) = 0;
This method sets media player options using key and value. Unlike setPlayerOption(const char* key, const char* value), the value parameter of this method is of type int, while the latter is const char*. These two methods cannot be used simultaneously. In general, you do not need to call this method and can use the default options provided by the media player.
Scenario
Applicable to scenarios requiring technical preview or custom features.
Timing
Call this method before calling open or openWithMediaSource.
Parameters
- key
- The key of the option.
- value
- The value of the option.
Return Values
- 0: Success.
- < 0: Failure.