setLoopCount abstract method
Sets loop playback.
If you want to enable loop playback, call this method and set the number of loops. When loop playback ends, the SDK triggers the onPlayerSourceStateChanged callback to report the playback state as playerStatePlaybackAllLoopsCompleted.
loopCountNumber of playback loops. ≥0: Number of loops. For example, 0 means no loop, play once in total; 1 means loop once, play twice in total. -1: Infinite loop.
Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly. See Error Codes for details and resolution suggestions.
Implementation
Future<void> setLoopCount(int loopCount);