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
{
if (_muted) {
[_player setVolume:0];
[_player setMuted:YES];
dispatch_async(dispatch_get_main_queue(), ^{
[_player setVolume:0];
[_player setMuted:YES];
});
} else {
[_player setVolume:_volume];
[_player setMuted:NO];
dispatch_async(dispatch_get_main_queue(), ^{
[_player setVolume:_volume];
[_player setMuted:NO];
});
}
[self setResizeMode:_resizeMode];