MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / SetLoop

Method SetLoop

mediaPlayer/MediaPlayer.cpp:550–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548 }
549
550 void MediaPlayer::SetLoop(bool bLoop)
551 {
552 mLoop = bLoop;
553
554 if (mCollector) {
555 mCollector->ReportLooping(bLoop);
556 }
557
558 GET_PLAYER_HANDLE
559 CicadaSetLoop(handle, bLoop);
560#ifdef ENABLE_CACHE_MODULE
561 //if cache successed before setLoop.
562 if (mCacheManager != nullptr) {
563 if (mCacheSuccess && IsLoop()) {
564 //if cache success and want play loop,
565 // we set loop false to let onCompletion callback deal loop.
566 CicadaSetLoop(handle, false);
567 }
568 }
569#endif
570 }
571
572 bool MediaPlayer::IsLoop()
573 {

Callers 4

java_SetLoopMethod · 0.80
completionCallbackMethod · 0.80
command_loopFunction · 0.80
mainFunction · 0.80

Calls 2

CicadaSetLoopFunction · 0.85
ReportLoopingMethod · 0.80

Tested by 1

command_loopFunction · 0.64