Remove video layer when entering background correctly, both if using controls or not
This commit is contained in:
@@ -223,6 +223,7 @@ static int const RCTVideoUnset = -1;
|
|||||||
if (_playInBackground) {
|
if (_playInBackground) {
|
||||||
// Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html
|
// Needed to play sound in background. See https://developer.apple.com/library/ios/qa/qa1668/_index.html
|
||||||
[_playerLayer setPlayer:nil];
|
[_playerLayer setPlayer:nil];
|
||||||
|
[_playerViewController setPlayer:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,6 +232,7 @@ static int const RCTVideoUnset = -1;
|
|||||||
[self applyModifiers];
|
[self applyModifiers];
|
||||||
if (_playInBackground) {
|
if (_playInBackground) {
|
||||||
[_playerLayer setPlayer:_player];
|
[_playerLayer setPlayer:_player];
|
||||||
|
[_playerViewController setPlayer:_player];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user