Skip to content

Commit

Permalink
Display sub delay on OSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
bbirec committed May 1, 2016
1 parent d9666aa commit 5d35c3d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions PeerPlayer/ControlUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,21 @@ -(void) updateUI {
cache = @"";
}

NSString* subDelay;
if(self.playInfo.subDelay != 0) {
subDelay = [NSString stringWithFormat:@"(SUB %+.1fsec)", self.playInfo.subDelay];
}
else {
subDelay = @"";
}

[self.osd setMsg:
[NSString stringWithFormat:@"%@ %@/%@ %@",
[NSString stringWithFormat:@"%@ %@/%@ %@%@",
self.playInfo.paused ? @"Paused":@"Playing",
[ControlUI formatTime:self.playInfo.timePos],
[ControlUI formatTime:self.playInfo.duration],
cache]];
cache,
subDelay]];
}
else {
self.osd.hidden = YES;
Expand Down

0 comments on commit 5d35c3d

Please sign in to comment.