Skip to content

Commit ecd3a8d

Browse files
author
Buddy Reno
committed
Set minimize waiting to only be available for ios 10
1 parent bed2256 commit ecd3a8d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ios/CDVSound.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,10 @@ - (void)create:(CDVInvokedUrlCommand*)command
265265
// Pass the AVPlayerItem to a new player
266266
avPlayer = [[AVPlayer alloc] initWithPlayerItem:playerItem];
267267
// don't download whole file before playing
268-
avPlayer.automaticallyWaitsToMinimizeStalling = false;
268+
NSArray *osVersion = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."];
269+
if ([[osVersion objectAtIndex:0] intValue] >= 10) {
270+
avPlayer.automaticallyWaitsToMinimizeStalling = false;
271+
}
269272

270273
//avPlayer = [[AVPlayer alloc] initWithURL:resourceUrl];
271274
}

0 commit comments

Comments
 (0)