This commit is contained in:
2024-10-23 17:08:05 +08:00
parent 4b107ea59f
commit 6bfd2d8736
2 changed files with 9 additions and 2 deletions

View File

@@ -161,6 +161,10 @@ func (s *Streamer) start() {
<-s.ctx.Done()
log.Printf("stop stream: %s", videoPath)
if currentVideo == s.videoList[s.currentVideoIndex] {
s.Next()
}
}
func (s *Streamer) Stop() {
@@ -169,7 +173,6 @@ func (s *Streamer) Stop() {
go func() {
done <- s.cmd.Wait()
}()
s.cancel()
s.mu.Lock()
if s.cmd != nil && s.cmd.Process != nil {