playPreloadedSrc
Plays a preloaded media resource.
virtual int playPreloadedSrc(const char* src) = 0;
After calling preloadSrc to preload a media resource into the playlist, you can call this method to play the resource. If the call is successful and the onPlayerSourceStateChanged callback reports the PLAYER_STATE_PLAYING state, it indicates that playback has started.
If you want to switch to another preloaded media resource, call this method again with a new media resource URL. To replay the same media resource, you need to call preloadSrc again to preload it.
To clear the playlist, call the stop method.
Note: If you call this method while playback is paused, it will not take effect until playback resumes.
Parameters
- src
- The URL of the media resource in the playlist. It must match the
srcset via preloadSrc; otherwise, the media resource cannot be played.
Return Values
- 0: Success.
- < 0: Failure.