cordova-issues mailing list archives

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

    [ https://issues.apache.org/jira/browse/CB-13445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16538079#comment-16538079
] 

ASF GitHub Bot commented on CB-13445:
-------------------------------------

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


> Streaming media in iOS has long load times
> ------------------------------------------
>
>                 Key: CB-13445
>                 URL: https://issues.apache.org/jira/browse/CB-13445
>             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
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message