disable airplay when sideloaded captions
This commit is contained in:
parent
bbf37ed5cb
commit
7026ca7e51
@ -397,11 +397,14 @@ static int const RCTVideoUnset = -1;
|
|||||||
|
|
||||||
- (void)playerItemPrepareText:(AVAsset *)asset assetOptions:(NSDictionary * __nullable)assetOptions withCallback:(void(^)(AVPlayerItem *))handler
|
- (void)playerItemPrepareText:(AVAsset *)asset assetOptions:(NSDictionary * __nullable)assetOptions withCallback:(void(^)(AVPlayerItem *))handler
|
||||||
{
|
{
|
||||||
if (!_textTracks) {
|
if (!_textTracks || _textTracks.count==0) {
|
||||||
handler([AVPlayerItem playerItemWithAsset:asset]);
|
handler([AVPlayerItem playerItemWithAsset:asset]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AVPlayer can't airplay AVMutableCompositions
|
||||||
|
_allowsExternalPlayback = NO;
|
||||||
|
|
||||||
// sideload text tracks
|
// sideload text tracks
|
||||||
AVMutableComposition *mixComposition = [[AVMutableComposition alloc] init];
|
AVMutableComposition *mixComposition = [[AVMutableComposition alloc] init];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user