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

Can AIR add Audio support set for ios?

Explorer ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

i use Adobe AIR to develop a music player, use SampleDataEvent and FileStream AIR can play flac,wav,aiff,dsf,dff,aifc music files.
air audio decoder has done and it work great well.

but for ios , it can't show music info at ios control center (music part) and cant recive the next / prev pause / play button event at ios control center.
it is a big bug for music player.

can air team add this feature in AIR? just ios is OK.

or give a ANE for this.

thanks.

or open some function to set ios AVAudioSession and get ios control center music control button event.

just ios is OK.

Thanks very much.

TOPICS
Air beta

Views

893

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

correct answers 1 Correct answer

Explorer , May 01, 2019 May 01, 2019

i use ANE has done. show in ios music control center and dsp music sample at AIR use SampleDataEvent.

Thanks.

code:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategorySoloAmbient error:nil];

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];

[[AVAudioSession sharedInstance] setActive:YES error:nil];

[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

NSString *list = [productIdsString substringFromIndex:1];;

NSArray *listItems = [li

...

Votes

Translate

Translate
Engaged ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

Have you tried the Media Player ANE by distriqt?  It looks like it can display music info in the control center and also register for control center events:

MediaPlayer by distriqt

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
Explorer ,
Mar 21, 2019 Mar 21, 2019

Copy link to clipboard

Copied

I need use air sound to output and need use as3 dsp sound.not by apple itself. Sound is better than apple.need use air sound.

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
Engaged ,
Mar 22, 2019 Mar 22, 2019

Copy link to clipboard

Copied

Yes, but looking at the documentation for the ANE, the control center functionality seems to be separate from the actual media player.  You could try using the ane ONLY for the control center code and use your own player code, ignoring the media player code in the ANE if you only want access to control center. 

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
Explorer ,
May 01, 2019 May 01, 2019

Copy link to clipboard

Copied

LATEST

i use ANE has done. show in ios music control center and dsp music sample at AIR use SampleDataEvent.

Thanks.

code:

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategorySoloAmbient error:nil];

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];

[[AVAudioSession sharedInstance] setActive:YES error:nil];

[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];

NSString *list = [productIdsString substringFromIndex:1];;

NSArray *listItems = [list componentsSeparatedByString:@"<ori>"];

NSMutableDictionary *songDict=[NSMutableDictionary dictionary];

NSString *tmpTitleStr = listItems[0];

//歌名

[songDict setObject:tmpTitleStr forKey:MPMediaItemPropertyTitle];

//歌手名

[songDict setObject:listItems[1] forKey:MPMediaItemPropertyArtist];

//歌曲的总时间

NSString *tmpTimeStr = listItems[2];

[songDict setObject:[NSNumber numberWithDouble:[tmpTimeStr doubleValue]] forKeyedSubscript:MPMediaItemPropertyPlaybackDuration];

//设置歌曲图片

// MPMediaItemArtwork *imageItem=[[MPMediaItemArtwork alloc]initWithImage:nil];

// [songDict setObject:imageItem forKey:MPMediaItemPropertyArtwork];

//设置控制中心歌曲信息

[[MPNowPlayingInfoCenter defaultCenter] setNowPlayingInfo:songDict];

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