Fix setPaused threading

Fixes #66
This commit is contained in:
Baris Sencan 2015-06-26 14:31:03 -07:00
parent ab93afd2c3
commit 449b97a6c2

View File

@ -294,10 +294,14 @@ static NSString *const statusKeyPath = @"status";
{
if (paused) {
[self stopProgressTimer];
dispatch_async(dispatch_get_main_queue(), ^{
[_player pause];
});
} else {
[self startProgressTimer];
dispatch_async(dispatch_get_main_queue(), ^{
[_player play];
});
}
_paused = paused;