Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Cordova media is very slow to play on iOS

$
0
0

@Pasinetti wrote:

I apologize for my bad English but i'm italian and i don't speak english very well.

I have a problem with audio player, is very slow to start on iOS (not on android).


PlayerLiturgia.play = function() {

     $scope.state = 'loader';
            function mediaStatusCallback(status) {
                if (status == 0) {
                    console.log($scope.state);
                }
                if (status == 1) {
                    $scope.state = 'loader';
                }
                if (status == 2) {
                    $scope.state = 'play';
                }
                if (status == 3) {
                    $scope.state = 'pause';
                }
                if (status == 4) {
                    $scope.state = 'pause';
                }
            };
            if (media == null) {
                media = new Media(src, null, null, mediaStatusCallback);
                console.log('media != null');
            }
            media.play();
            console.log('media.play()');
        };</code>

When i tap play button, audio don't start, it start after a minute, while on Android it start immediately.

Why?
Thank you for help.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>