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

Background Audio

New Here ,
Oct 17, 2015 Oct 17, 2015

Copy link to clipboard

Copied

Hi,

I'm using Flex 4.6.0 / AIR 18.0 for creating a radio app for independent radio stations. Therefore, the feature of continuing playback of an mp3 stream when deactivating the app is a must. This can be achieved by the following settings (not a single thing can be different, otherwise playback just fades out when the app is deactivated/suspended):

application.xml:

  1. <key>UIBackgroundModes</key><array><string>audio</string></array>

Main.as:

  1. NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
  2. NativeApplication.nativeApplication.executeInBackground = true;
  3. SoundMixer.audioPlaybackMode = AudioPlaybackMode.MEDIA;

MyStreamPlayer.as:

  • Sound() object
  • SoundTransform() object
  • URLRequest() object
  • (If somebody needs a code snippet, let me know.)

When playing back the stream (no matter if the app is in background or active) and a call comes in, the stream is paused/silenced during that time. Exactly how it has to be.

The only weird thing about the behaviour is that when I leave the app (that continues playback) and, for example, go to iTunes and play a track, the iTunes track is played simultaneously to / over my my app's mp3 stream. My problem is that I don't know whether Apple is gonna reject my app because of this.. Because with other (I guess native) radio apps, this is not the case. Their stream stops when playing a track in iTunes after deactivating the radio app, and I have no clue how to achieve this because as I said in the beginning, the settings have to be exactly as mentioned above so playback doesn't stop when entering the background.

Can anybody help? Thanks!

TOPICS
Development

Views

618

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
New Here ,
Oct 29, 2015 Oct 29, 2015

Copy link to clipboard

Copied

Wow, thanks Adobe for your support. /sarcasm off

Votes

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
Adobe Employee ,
Oct 29, 2015 Oct 29, 2015

Copy link to clipboard

Copied

LATEST

Thanks for reporting the issue. We are looking into it.

Thanks,

Adobe Air Team

Votes

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