You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/07/10 05:56:05 UTC
[GitHub] purplecabbage closed pull request #169: CB-13445 (iOS) Streaming
media can take up to 8-10 seconds to start
purplecabbage closed pull request #169: CB-13445 (iOS) Streaming media can take up to 8-10 seconds to start
URL: https://github.com/apache/cordova-plugin-media/pull/169
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/.travis.yml b/.travis.yml
index f39fe518..7b2ebfb7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -26,12 +26,12 @@ matrix:
node_js: '6.14.2'
- env: PLATFORM=ios-9.3
os: osx
- osx_image: xcode7.3
+ osx_image: xcode8.3
language: node_js
node_js: '6.14.2'
- env: PLATFORM=ios-10.0
os: osx
- osx_image: xcode7.3
+ osx_image: xcode8.3
language: node_js
node_js: '6.14.2'
- env: PLATFORM=android-4.4
diff --git a/src/ios/CDVSound.m b/src/ios/CDVSound.m
index 7a00eadf..d63b0ab2 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -265,7 +265,11 @@ - (void)create:(CDVInvokedUrlCommand*)command
// Pass the AVPlayerItem to a new player
avPlayer = [[AVPlayer alloc] initWithPlayerItem:playerItem];
- //avPlayer = [[AVPlayer alloc] initWithURL:resourceUrl];
+ // Avoid excessive buffering so streaming media can play instantly on iOS
+ // Removes preplay delay on ios 10+, makes consistent with ios9 behaviour
+ if ([NSProcessInfo.processInfo isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){10,0,0}]) {
+ avPlayer.automaticallyWaitsToMinimizeStalling = NO;
+ }
}
self.currMediaId = mediaId;
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org