Skip to content

Commit

Permalink
reset lastRead on unmute
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Jul 9, 2024
1 parent 6e29a98 commit 043b4ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/pipeline/source/sdk/appwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ type AppWriter struct {
state state
initialized bool
ticker *time.Ticker
muted atomic.Bool
lastRead time.Time
muted atomic.Bool
disconnected atomic.Bool
playing core.Fuse
draining core.Fuse
Expand Down Expand Up @@ -180,6 +180,7 @@ func (w *AppWriter) SetTrackMuted(muted bool) {
w.callbacks.OnTrackMuted(w.track.ID())
} else {
w.logger.Debugw("track unmuted", "timestamp", time.Since(w.startTime).Seconds())
w.lastRead = time.Now()
if w.sendPLI != nil {
w.sendPLI()
}
Expand Down

0 comments on commit 043b4ea

Please sign in to comment.