Highlighted

streaming audio player problems.

New Here ,
Feb 28, 2014

Copy link to clipboard

Copied

I would be grateful if someone could help me with the following problems.

I have developed an audio streaming app that relies on OSMF framework in Android and StageVideo / Netstream classes in iOS (OSMF is HLS agnostic).

The Android app, works great except when the screen goes dark or when the app is pushed in the background.

When the screen goes dark, the app takes almost a minute to switch between streams. When testing in AIR simulator and when the device screen is not dark, the app moves to the next track quickly. Why? Is this related to the fact that the framerate slows to 4 per second when device screen is dark?

If the app is pushed to the background, the audio continues playing, but when the track is complete, the player does not continue to play the next track. If I bring the app to the foreground, it immediately starts playing the next track. Again, I don't understand why this is the case?

I tried setting the different rendering modes to direct, and cpu. When set to direct, the app stops playing as soon as the screen goes dark. In auto and cpu mode, it continues to play but it does exhibit the problems mentioned above. I did not try the GPU since Adobe is against doing so for Flex applications.

When testing in iOS, the app keeps the screen lit the whole time. This is by design from me because I have added

 

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

to keep the phone screen from going dark. If I allow the screen to go dark, the app stops playing. The audio stops playing if I push the app to the background as well. Of course, keeping the screen lit is not ideal because it unnecessarily drains the battery and is distracting when driving at night. I have seen other apps for example that keep playing audio when the screen dark, so I know that it is possible. Any suggestions on how to keep the audio playing when the screen goes dark or when the app is pushed to the background would be greatly appreciated.

TOPICS
Performance issues

Views

272

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

streaming audio player problems.

New Here ,
Feb 28, 2014

Copy link to clipboard

Copied

I would be grateful if someone could help me with the following problems.

I have developed an audio streaming app that relies on OSMF framework in Android and StageVideo / Netstream classes in iOS (OSMF is HLS agnostic).

The Android app, works great except when the screen goes dark or when the app is pushed in the background.

When the screen goes dark, the app takes almost a minute to switch between streams. When testing in AIR simulator and when the device screen is not dark, the app moves to the next track quickly. Why? Is this related to the fact that the framerate slows to 4 per second when device screen is dark?

If the app is pushed to the background, the audio continues playing, but when the track is complete, the player does not continue to play the next track. If I bring the app to the foreground, it immediately starts playing the next track. Again, I don't understand why this is the case?

I tried setting the different rendering modes to direct, and cpu. When set to direct, the app stops playing as soon as the screen goes dark. In auto and cpu mode, it continues to play but it does exhibit the problems mentioned above. I did not try the GPU since Adobe is against doing so for Flex applications.

When testing in iOS, the app keeps the screen lit the whole time. This is by design from me because I have added

 

NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;

to keep the phone screen from going dark. If I allow the screen to go dark, the app stops playing. The audio stops playing if I push the app to the background as well. Of course, keeping the screen lit is not ideal because it unnecessarily drains the battery and is distracting when driving at night. I have seen other apps for example that keep playing audio when the screen dark, so I know that it is possible. Any suggestions on how to keep the audio playing when the screen goes dark or when the app is pushed to the background would be greatly appreciated.

TOPICS
Performance issues

Views

273

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Feb 28, 2014 0

Have something to add?

Join the conversation