cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-13445) Streaming media in iOS has long load times
Date Tue, 10 Jul 2018 05:59:00 GMT


ASF GitHub Bot commented on CB-13445:

purplecabbage closed pull request #149: CB-13445: (ios) Streaming media can take up to 8-10
seconds to start - fixed!

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/src/ios/CDVSound.m b/src/ios/CDVSound.m
index e1542871..c6ccdfbc 100644
--- a/src/ios/CDVSound.m
+++ b/src/ios/CDVSound.m
@@ -249,6 +249,9 @@ - (void)create:(CDVInvokedUrlCommand*)command
             // Pass the AVPlayerItem to a new player
             avPlayer = [[AVPlayer alloc] initWithPlayerItem:playerItem];
+            //Avoid excessive buffering so streaming media can play instantly on iOS
+            avPlayer.automaticallyWaitsToMinimizeStalling = NO;
             //avPlayer = [[AVPlayer alloc] initWithURL:resourceUrl];


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:

> Streaming media in iOS has long load times
> ------------------------------------------
>                 Key: CB-13445
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: cordova-plugin-media
>         Environment: iOS platform within cordova 
>            Reporter: Ashish Mehra
>            Priority: Major
> Using the plugin, cordova-plugin-media, one can stream audio/video media. On the iOS
front, streaming media can take anywhere from 8-10 seconds to start playing, even if the length
of the media is < 10 mins. 
> The culprit here is `automaticallyWaitsToMinimizeStalling` property, that seems to buffer
a more than required amount of the media causing load time delays. In some cases, it actually
downloads the entire media file before starting and on slow internet connections this can
mean load times of > 15 seconds.
> Disabling this property should make iOS media load times to almost instant as it will
only buffer a default/set amount.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message