Set volume and muted properties on main queue

This commit is contained in:
Baris Sencan 2015-06-28 23:23:31 -07:00
parent 3b53194839
commit e8e3ffec89

View File

@ -365,11 +365,15 @@ static NSString *const statusKeyPath = @"status";
- (void)applyModifiers - (void)applyModifiers
{ {
if (_muted) { if (_muted) {
dispatch_async(dispatch_get_main_queue(), ^{
[_player setVolume:0]; [_player setVolume:0];
[_player setMuted:YES]; [_player setMuted:YES];
});
} else { } else {
dispatch_async(dispatch_get_main_queue(), ^{
[_player setVolume:_volume]; [_player setVolume:_volume];
[_player setMuted:NO]; [_player setMuted:NO];
});
} }
[self setResizeMode:_resizeMode]; [self setResizeMode:_resizeMode];