playPreloadedSrc
Plays a preloaded media resource.
int playPreloadedSrc(String src);
After preloading a media resource into the playlist using preloadSrc, you can call playPreloadedSrc to play it. If you receive the onPlayerStateChanged callback reporting the PLAYER_STATE_PLAYING state, playback is successful.
To switch to another preloaded media resource, call playPreloadedSrc again with a new media resource URL. To replay the same media resource, preload it again using preloadSrc before playing. To clear the playlist, call stop.
Note: If you call this method while playback is paused, it will not take effect until playback resumes.
Parameters
- src
- URL of the media resource in the playlist. Must match the
srcset by preloadSrc, otherwise the media resource cannot be played.
Return Values
- 0: Success.
- < 0: Failure.