From 449b97a6c283223fe11dcaae7b1b0d3009258928 Mon Sep 17 00:00:00 2001 From: Baris Sencan Date: Fri, 26 Jun 2015 14:31:03 -0700 Subject: [PATCH] Fix setPaused threading Fixes #66 --- RCTVideo.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/RCTVideo.m b/RCTVideo.m index 5b6b425f..af4e5a4a 100644 --- a/RCTVideo.m +++ b/RCTVideo.m @@ -294,10 +294,14 @@ static NSString *const statusKeyPath = @"status"; { if (paused) { [self stopProgressTimer]; - [_player pause]; + dispatch_async(dispatch_get_main_queue(), ^{ + [_player pause]; + }); } else { [self startProgressTimer]; - [_player play]; + dispatch_async(dispatch_get_main_queue(), ^{ + [_player play]; + }); } _paused = paused;