Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
2.98k stars 2.5k forks source link

[$250] IOS - Video - Video sound is not playing when device sound profile is silent mode #41204

Open kbecciv opened 2 weeks ago

kbecciv commented 2 weeks ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!

Action Performed:

Precondition: Device sound mode is not silent mode.

  1. Launch New Expensify app.
  2. Go to chat.
  3. Upload a video with sound.
  4. Play the video.
  5. Note that the sound is playing.
  6. Change the device sound mode to silent mode.
  7. Play the video.

Expected Result:

The video sound should play as long as the media volume is not zero.

Actual Result:

The video sound is not playing when device sound profile is silent mode.

Workaround:

n/a

Platforms:

Which of our officially supported platforms is this issue occurring on?

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/93399543/5b145ae1-afba-48fa-8d49-5956a0324902

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @getusha
melvin-bot[bot] commented 2 weeks ago

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

kbecciv commented 2 weeks ago

We think that this bug might be related to #vip-vsb

kbecciv commented 2 weeks ago

@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors.

ShridharGoel commented 2 weeks ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Video sound is not playing when device sound profile is silent mode in iOS.

What is the root cause of that problem?

This is the default functionality of expo-av in iOS.

What changes do you think we should make in order to solve the problem?

Add the below in Expensify.tsx. This will enable media volume in silent mode for iOS.

useEffect(() => {
    Audio.setAudioModeAsync({ playsInSilentModeIOS: true })
}, []);

We can add in BaseVideoPlayer instead, but Expensify.tsx would be a better choice.

What alternative options did you explore?

We can update the AppDelegate.m file to add the below line in didFinishLaunchingWithOptions.

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
melvin-bot[bot] commented 2 weeks ago

@abekkala Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 1 week ago

Job added to Upwork: https://www.upwork.com/jobs/~018b7c5dab39a2df1f

melvin-bot[bot] commented 1 week ago

Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

abekkala commented 1 week ago

@getusha we do have one proposal already for this one!

getusha commented 1 week ago

@abekkala @kbecciv is there a reproduction step? is it only on iOS?

kbecciv commented 1 week ago

@abekkala Can you please bring the OP back? Thank you!

melvin-bot[bot] commented 1 week ago

@abekkala, @getusha Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

abekkala commented 1 week ago

@abekkala Can you please bring the OP back? Thank you!

Odd, yes I put it back!

abekkala commented 1 week ago

@getusha OP is back - @kbecciv reported this as affecting iOS: Native

melvin-bot[bot] commented 1 week ago

@abekkala, @getusha Huh... This is 4 days overdue. Who can take care of this?

getusha commented 6 days ago

Will try reproducing this & we have a proposal to review

getusha commented 4 days ago

Asked another c+ with a physical iOS device https://expensify.slack.com/archives/C02NK2DQWUX/p1715517674210059 @c3024 will take it.

c3024 commented 3 days ago

@ShridharGoel 's proposal here looks good to me.

🎀 👀 🎀 C+ Reviewed

melvin-bot[bot] commented 3 days ago

Triggered auto assignment to @MonilBhavsar, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

mvtglobally commented 3 days ago

Issue not reproducible during KI retests. (First week)

c3024 commented 3 days ago

Still reproducible.

melvin-bot[bot] commented 2 days ago

@abekkala @MonilBhavsar this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

MonilBhavsar commented 1 day ago

Is this a feature and not a bug?

c3024 commented 1 day ago

It is a feature of iOS native.

But this iOS native behaviour is different from Android native, Android Chrome and iOS Safari. In these three, video sound continues to play even after changing the device to silent mode. This inconsistency can be considered as a bug.

MonilBhavsar commented 1 day ago

Thanks for clarifying!