• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

streaming audio player problems.

New Here ,
Feb 28, 2014 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

321

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
community guidelines