Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14541

iOS: AudioPlayer throws error with no internet connection when attempting to play a remote resource

    Details

      Description

      Issue

      AudioPlayer error events implementation. If you try to get some errors about audio streaming and it's not possible. When the application tries to play a remote resource and the connection is off, an error is fired and the dialog message is showed. ("Unable to configure network stream").

      Use case

      I need get the error event about this error, but this is not implemented yet, i propose create an event for get all errors. (Ex. error event).

      var streamer = Ti.Media.createAudioPlayer();
      streamer.url = "http://54house.stream-balancer.de/";
      //Another way to force the issue "Unable to configure network stream" by giving another file, not sound. 
      //streamer.url = "http://54house.stream-balancer.de/listen.pls";
      streamer.addEventListener('change', function(e){
      	Ti.API.info( 'Change: '+ JSON.stringify(e) );	
      	if(e.state == 0){
      		//back to initialized state
      		//Handle it! 
      	}
      });
      streamer.start();
      

      Probably iOS error property would allow to find out receiver's status so the error could be described (read-only property)
      http://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html#//apple_ref/occ/instp/AVPlayer/error

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              fabiorphp Fábio Ribeiro
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-16982
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration