cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "khushwant Singh (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-4571) Media Object issue with Error function
Date Mon, 12 Aug 2013 14:35:48 GMT
khushwant Singh created CB-4571:
-----------------------------------

             Summary: Media Object issue with Error function
                 Key: CB-4571
                 URL: https://issues.apache.org/jira/browse/CB-4571
             Project: Apache Cordova
          Issue Type: Bug
          Components: Android
    Affects Versions: 3.0.0
            Reporter: khushwant Singh
            Assignee: Joe Bowser


Hi Simon/Phonegap team,

I have been facing an issue with Media object while playing live streaming (shoutcast). It
looks like Media object's error function does not get called if the URL fails to return valid
stream (bytes) but does return status code 200 (OK). The LOG CAT clearly shows that there
is an error and Media cannot be played but this error message does not get forwarded to the
media error function and Media object dies silently. The error function only gets called when
I try to call Media.Stop() function.

I tested the same URL on Chrome, that implicitly uses HTML5 Audio object, and it seems like
in case they do not get valid stream but 200 (OK), the Audio object keeps on trying and stops
until it gets audio stream back. I used fiddler and can see Audio object calls the same URL
again and again until it gets response with stream. 

So my questions here are,

1) Can we make Media object works the same way HTML5 Audio control works?

2) Can we force Media object to call error function in case there is any error (just after
play).

I am hoping that you can help me on this.

URL
*******
http://radio.sgpc.net:8020/live16?1.mp3

LogCat logs
********************
08-12 11:09:32.348: E/HTTPStream(21328): HTTPStream::receive(): recv failed, server is gone,
total received: 0 bytes
08-12 11:09:32.348: E/NuHTTPDataSource(21328): NuHTTPDataSource::readAt(offset 0, size 65536)
err(-1005) = internalRead()
08-12 11:09:32.348: E/NuCachedSource2(21328): source returned error -1005
08-12 11:09:32.548: E/MediaPlayer(31929): error (1, -2147483648)
08-12 11:09:32.548: E/MediaPlayer(31929): Error (1,-2147483648)
08-12 11:09:42.988: E/CordovaWebView(31929): CordovaWebView: TIMEOUT ERROR!


Many Thanks,
Khushwant

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message