[
https://issues.apache.org/jira/browse/CB-11313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Veenstra updated CB-11313:
-------------------------------
Description:
We are trying to play online radio stations with Cordova, for example these
stations:
http://www.hendrikjansen.nl/henk/streaming.html
But when we try the current released version {{2.3.0}} or the current dev
{{2.3.1-dev}}, both give the same {{adb logcat}} output:
{code}
05-24 15:22:08.936 27095 27176 E MediaPlayer-JNI: JNIMediaPlayerFactory:
bIsQCMediaPlayerPresent 0
05-24 15:22:08.936 27095 27176 E MediaPlayer-JNI: JNIMediaPlayerFactory:
bIsQCMediaPlayerPresent 0
05-24 15:22:08.940 798 3345 I MediaFocusControl: AudioFocus
requestAudioFocus() from
android.media.AudioManager@fd128bforg.apache.cordova.media.AudioHandler$1@932bb8c
req=1flags=0x0
05-24 15:22:08.953 27095 27415 D MediaHTTPConnection: filterOutInternalHeaders:
key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
05-24 15:22:08.954 27095 27810 D MediaHTTPConnection: proxy null port 0
05-24 15:22:13.341 258 30530 I FFmpegExtractor: android-source:0xb5f4f8c0
05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
05-24 15:22:13.343 258 30530 I FFMPEG : [mp3 @ 0xae696e00] Skipping 0 bytes
of junk at 0.
05-24 15:22:13.343 258 30530 D FFmpegExtractor: suppoted codec(mp3) by
official Stagefright
05-24 15:22:13.343 258 30530 D FFmpegExtractor: ffmpeg detected media content
as 'audio/mpeg' with confidence 0.08
05-24 15:22:13.344 258 30529 D NuPlayerDriver: notifyListener_l(0xae76c0e0),
(1, 0, 0)
05-24 15:22:13.345 27095 27176 D MediaPlayer: setSubtitleAnchor in MediaPlayer
05-24 15:22:13.347 258 2659 E MediaPlayerService: getDuration returned
-2147483648
05-24 15:22:13.347 27095 27176 W MediaPlayer: Stream has no duration and is
therefore not seekable.
05-24 15:22:13.347 27095 27176 E MediaPlayer: error (-2147483648, 0)
05-24 15:22:13.347 27095 27176 D AudioPlayer: Send a onStatus update for the
new seek
05-24 15:22:13.348 27095 27176 E MediaPlayer: start called in state 0
05-24 15:22:13.348 27095 27176 E MediaPlayer: error (-38, 0)
05-24 15:22:13.348 27095 27176 E MediaPlayer: Attempt to call getDuration
without a valid mediaplayer
05-24 15:22:13.348 27095 27176 E MediaPlayer: error (-38, 0)
05-24 15:22:13.348 27095 27176 E MediaPlayer: Error (-2147483648,0)
05-24 15:22:13.348 27095 27176 D AudioPlayer: on completion is calling stopped
05-24 15:22:13.349 27095 27176 E MediaPlayer: Error (-38,0)
05-24 15:22:13.349 27095 27176 D AudioPlayer: on completion is calling stopped
05-24 15:22:13.349 27095 27176 E MediaPlayer: Error (-38,0)
05-24 15:22:13.349 27095 27176 D AudioPlayer: on completion is calling stopped
{code}
If I comment out the lines
https://github.com/apache/cordova-plugin-media/blob/master/src/android/AudioPlayer.java#L435
({{this.seekToPlaying(this.seekOnPrepared);}}) and
https://github.com/apache/cordova-plugin-media/blob/master/src/android/AudioPlayer.java#L445
({{this.duration = getDurationInSeconds();}}). It does start the stream, but
as soon as I receive a notification from a different app (for example a new
WhatApp message) the MediaPlayer crashes.
was:
We are trying to play online radio stations with Cordova, for example these
stations:
http://www.hendrikjansen.nl/henk/streaming.html
But when we try the current released version {{2.3.0}} or the current dev
`2.3.1-dev`, both give the same `adb logcat` output:
{code}
05-24 15:22:08.936 27095 27176 E MediaPlayer-JNI: JNIMediaPlayerFactory:
bIsQCMediaPlayerPresent 0
05-24 15:22:08.936 27095 27176 E MediaPlayer-JNI: JNIMediaPlayerFactory:
bIsQCMediaPlayerPresent 0
05-24 15:22:08.940 798 3345 I MediaFocusControl: AudioFocus
requestAudioFocus() from
android.media.AudioManager@fd128bforg.apache.cordova.media.AudioHandler$1@932bb8c
req=1flags=0x0
05-24 15:22:08.953 27095 27415 D MediaHTTPConnection: filterOutInternalHeaders:
key=User-Agent, val= stagefright/1.2 (Linux;Android 6.0.1)
05-24 15:22:08.954 27095 27810 D MediaHTTPConnection: proxy null port 0
05-24 15:22:13.341 258 30530 I FFmpegExtractor: android-source:0xb5f4f8c0
05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
05-24 15:22:13.343 258 30530 I FFMPEG : [mp3 @ 0xae696e00] Skipping 0 bytes
of junk at 0.
05-24 15:22:13.343 258 30530 D FFmpegExtractor: suppoted codec(mp3) by
official Stagefright
05-24 15:22:13.343 258 30530 D FFmpegExtractor: ffmpeg detected media content
as 'audio/mpeg' with confidence 0.08
05-24 15:22:13.344 258 30529 D NuPlayerDriver: notifyListener_l(0xae76c0e0),
(1, 0, 0)
05-24 15:22:13.345 27095 27176 D MediaPlayer: setSubtitleAnchor in MediaPlayer
05-24 15:22:13.347 258 2659 E MediaPlayerService: getDuration returned
-2147483648
05-24 15:22:13.347 27095 27176 W MediaPlayer: Stream has no duration and is
therefore not seekable.
05-24 15:22:13.347 27095 27176 E MediaPlayer: error (-2147483648, 0)
05-24 15:22:13.347 27095 27176 D AudioPlayer: Send a onStatus update for the
new seek
05-24 15:22:13.348 27095 27176 E MediaPlayer: start called in state 0
05-24 15:22:13.348 27095 27176 E MediaPlayer: error (-38, 0)
05-24 15:22:13.348 27095 27176 E MediaPlayer: Attempt to call getDuration
without a valid mediaplayer
05-24 15:22:13.348 27095 27176 E MediaPlayer: error (-38, 0)
05-24 15:22:13.348 27095 27176 E MediaPlayer: Error (-2147483648,0)
05-24 15:22:13.348 27095 27176 D AudioPlayer: on completion is calling stopped
05-24 15:22:13.349 27095 27176 E MediaPlayer: Error (-38,0)
05-24 15:22:13.349 27095 27176 D AudioPlayer: on completion is calling stopped
05-24 15:22:13.349 27095 27176 E MediaPlayer: Error (-38,0)
05-24 15:22:13.349 27095 27176 D AudioPlayer: on completion is calling stopped
{code}
If I comment out the lines
https://github.com/apache/cordova-plugin-media/blob/master/src/android/AudioPlayer.java#L435
(`this.seekToPlaying(this.seekOnPrepared);`) and
https://github.com/apache/cordova-plugin-media/blob/master/src/android/AudioPlayer.java#L445
(`this.duration = getDurationInSeconds();`). It does start the stream, but as
soon as I receive a notification from a different app (for example a new
WhatApp message) the MediaPlayer crashes.
> Can't start media streaming on Android 6.0
> ------------------------------------------
>
> Key: CB-11313
> URL: https://issues.apache.org/jira/browse/CB-11313
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Media
> Reporter: Mark Veenstra
>
> We are trying to play online radio stations with Cordova, for example these
> stations:
> http://www.hendrikjansen.nl/henk/streaming.html
> But when we try the current released version {{2.3.0}} or the current dev
> {{2.3.1-dev}}, both give the same {{adb logcat}} output:
> {code}
> 05-24 15:22:08.936 27095 27176 E MediaPlayer-JNI: JNIMediaPlayerFactory:
> bIsQCMediaPlayerPresent 0
> 05-24 15:22:08.936 27095 27176 E MediaPlayer-JNI: JNIMediaPlayerFactory:
> bIsQCMediaPlayerPresent 0
> 05-24 15:22:08.940 798 3345 I MediaFocusControl: AudioFocus
> requestAudioFocus() from
> android.media.AudioManager@fd128bforg.apache.cordova.media.AudioHandler$1@932bb8c
> req=1flags=0x0
> 05-24 15:22:08.953 27095 27415 D MediaHTTPConnection:
> filterOutInternalHeaders: key=User-Agent, val= stagefright/1.2 (Linux;Android
> 6.0.1)
> 05-24 15:22:08.954 27095 27810 D MediaHTTPConnection: proxy null port 0
> 05-24 15:22:13.341 258 30530 I FFmpegExtractor: android-source:0xb5f4f8c0
> 05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
> 05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
> 05-24 15:22:13.343 258 30530 E FFMPEG : FFSource getSize failed
> 05-24 15:22:13.343 258 30530 I FFMPEG : [mp3 @ 0xae696e00] Skipping 0
> bytes of junk at 0.
> 05-24 15:22:13.343 258 30530 D FFmpegExtractor: suppoted codec(mp3) by
> official Stagefright
> 05-24 15:22:13.343 258 30530 D FFmpegExtractor: ffmpeg detected media
> content as 'audio/mpeg' with confidence 0.08
> 05-24 15:22:13.344 258 30529 D NuPlayerDriver:
> notifyListener_l(0xae76c0e0), (1, 0, 0)
> 05-24 15:22:13.345 27095 27176 D MediaPlayer: setSubtitleAnchor in MediaPlayer
> 05-24 15:22:13.347 258 2659 E MediaPlayerService: getDuration returned
> -2147483648
> 05-24 15:22:13.347 27095 27176 W MediaPlayer: Stream has no duration and is
> therefore not seekable.
> 05-24 15:22:13.347 27095 27176 E MediaPlayer: error (-2147483648, 0)
> 05-24 15:22:13.347 27095 27176 D AudioPlayer: Send a onStatus update for the
> new seek
> 05-24 15:22:13.348 27095 27176 E MediaPlayer: start called in state 0
> 05-24 15:22:13.348 27095 27176 E MediaPlayer: error (-38, 0)
> 05-24 15:22:13.348 27095 27176 E MediaPlayer: Attempt to call getDuration
> without a valid mediaplayer
> 05-24 15:22:13.348 27095 27176 E MediaPlayer: error (-38, 0)
> 05-24 15:22:13.348 27095 27176 E MediaPlayer: Error (-2147483648,0)
> 05-24 15:22:13.348 27095 27176 D AudioPlayer: on completion is calling stopped
> 05-24 15:22:13.349 27095 27176 E MediaPlayer: Error (-38,0)
> 05-24 15:22:13.349 27095 27176 D AudioPlayer: on completion is calling stopped
> 05-24 15:22:13.349 27095 27176 E MediaPlayer: Error (-38,0)
> 05-24 15:22:13.349 27095 27176 D AudioPlayer: on completion is calling stopped
> {code}
> If I comment out the lines
> https://github.com/apache/cordova-plugin-media/blob/master/src/android/AudioPlayer.java#L435
> ({{this.seekToPlaying(this.seekOnPrepared);}}) and
> https://github.com/apache/cordova-plugin-media/blob/master/src/android/AudioPlayer.java#L445
> ({{this.duration = getDurationInSeconds();}}). It does start the stream, but
> as soon as I receive a notification from a different app (for example a new
> WhatApp message) the MediaPlayer crashes.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]