trevorf / ti-android-streamer

Android Media Streamer Module for Titantium
Other
9 stars 9 forks source link

Weird behaviour after disconnecting from net #10

Closed AppWerft closed 8 years ago

AppWerft commented 8 years ago

Hi, if I kill the internet connection by choosing of airplan mode, then the player works as aspected: the player stops. If I now switch on the net and try to restart player then never comes any event from player and no bytes I can hear.

Bug, workaround?

AppWerft commented 8 years ago

Last weekend I wrote a module to control the native module: https://github.com/AppWerft/DLRmediathek/blob/master/Resources/controls/audiostreamer.adapter.js

Missing in java module:

  1. timeout of connection for play(). In this case no event is firing.
  2. losing of connection. In this case the javascript should start, wait, stop, wait, start and the audiostream is reconencted. This is ugly – I know, but it works. Reason: the connection will initialized only in constructor.
AppWerft commented 8 years ago

Self solved. In a JS wrapper I have called stop() after loosing of connection