Skip to content

Conversation

SolankiYogesh
Copy link
Contributor

feat: added fabric example

fix: example testing

fix: removed unwated scripts

feat: new architecture support done

@SolankiYogesh SolankiYogesh force-pushed the master branch 2 times, most recently from eedcbfd to a408375 Compare November 22, 2024 12:37
@RomualdPercereau
Copy link
Collaborator

Thank you @SolankiYogesh. I don't currently have time to review & test. If anyone can review it? :)

@Okelm
Copy link

Okelm commented Nov 26, 2024

Thanks @SolankiYogesh !
Do you use this in production at the moment?

These methods are missing for Android.

@ReactMethod
 public void enable(final Boolean enabled) {
   // no op
 }

 @Override
 public Map<String, Object> getConstants() {
   final Map<String, Object> constants = new HashMap<>();
   constants.put("IsAndroid", true);
   return constants;
 }

enable seems to be just a stub,
getConstants might cause some regression for some devs

For iOS while there's enableInSilenceMode method, enable is missing.

enable vs enableInSilenceMode - these serve different purposes in iOS:

  • enable: Uses AVAudioSessionCategoryAmbient - sound is muted when phone is in silent mode
  • enableInSilenceMode: Uses AVAudioSessionCategoryPlayback - sound plays even in silent mode

@RomualdPercereau maybe let's consider releasing alpha version with the new arch and ask devs to test it with us. I'll try to run some tests as well

@SolankiYogesh
Copy link
Contributor Author

@Okelm i think both methods are not required because. enable is for IOS only and for IsAndroid i am directly using Platfrom.OS

ok let me check again all code and yes i am currently using this patch in my product app

@SolankiYogesh
Copy link
Contributor Author

ok yes enable method is missing let me add

`
RCT_EXPORT_METHOD(enable : (BOOL)enabled) {
AVAudioSession *session = [AVAudioSession sharedInstance];
[session setCategory:AVAudioSessionCategoryAmbient error:nil];
[session setActive:enabled error:nil];
}

`

@Okelm
Copy link

Okelm commented Nov 26, 2024

As long as there's no plan to ditch Windows support this will require Windows new arch rewrite as well.

@Okelm
Copy link

Okelm commented Jan 14, 2025

@SolankiYogesh do you want to add windows support?

@SolankiYogesh
Copy link
Contributor Author

Yes currently i am checking how to apply new arch support in mac os and windows so i will update patch again with windows changes

@farkerhaiku
Copy link

@SolankiYogesh is your investigation still ongoing? These changes not being merged are preventing newer react-native projects from making use of this library.

@dcorbin
Copy link

dcorbin commented Apr 14, 2025

Anxiously awaiting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants