From e8e3ffec8944e684d08e2052c4f1a25d9baf243e Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Sun, 28 Jun 2015 23:23:31 -0700 Subject: [PATCH] Set volume and muted properties on main queue --- RCTVideo.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/RCTVideo.m b/RCTVideo.m index 668d8ca0..e5778d5c 100644 --- a/RCTVideo.m +++ b/RCTVideo.m @@ -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];