Rocket.Chat.ReactNative icon indicating copy to clipboard operation
Rocket.Chat.ReactNative copied to clipboard

iPhone goes into sleep during voice message recording

Open jacotec opened this issue 5 years ago • 15 comments

Description:

During the recording of a voice message the IOS device seems not always be forced to stay "awake". So it happens that the screen dims during the recording, if you don't pay attention to tap somewhere immediately it goes completely dark and in this case the message which was recorded so far gets lost.

Environment Information:

  • Rocket.Chat Server Version: 3.9.4
  • Rocket.Chat App Version: 4.13.1
  • Device Name: iPhone 11 Pro Max
  • OS Version: IOS 14.3

Steps to reproduce:

  1. Start a voice message in any chat
  2. Speak longer than your configured "sleep time" for the device
  3. The screen gets dark and the iPhone moves to sleep mode although a recording is active. The message ist lost then.

Expected behavior:

During the recording of a voice message the IOS device must be forced to stay awake.

Actual behavior:

In many cases the iPhones changes to sleep mode also during recording

Additional context:

This can't be always reproduced, but I've got tons of these complaints from my users and I've also seen it happening personally.

jacotec avatar Jan 08 '21 18:01 jacotec

@diegolmello can we use expo-keep-awake package for this?

If so I would be happy to work on it. Thanks.

yash-rajpal avatar Jan 08 '21 18:01 yash-rajpal

I see, we are already using expo-keep-awake package, I will be working on this.

Thanks.

yash-rajpal avatar Jan 08 '21 18:01 yash-rajpal

@yash-rajpal Awesome! Keep Awake is just a temp workaround and it should work, but we're going to remove it soon. The idea for the next months is to make it more similar to Whatsapp/Telegram and their hold to record approach. We'll also implement gestures and more stuff to it as well. If you feel like you can do the hold to record now, go for it. Thanks.

diegolmello avatar Jan 08 '21 18:01 diegolmello

@yash-rajpal Highly appreciated! Thanks!

jacotec avatar Jan 08 '21 18:01 jacotec

@diegolmello Nice outlook to what will come. That sounds awesome! Voice messaging is a killer feature in many deployments. Hopefully my #2586 will be fixed at some point as well.

jacotec avatar Jan 08 '21 18:01 jacotec

I would surely give it a try. @diegolmello @jacotec Thanks.

yash-rajpal avatar Jan 08 '21 18:01 yash-rajpal

@diegolmello can i give it a try? If it is not been addressed?

adityarajsinghvi avatar Jan 19 '21 14:01 adityarajsinghvi

@adityarajsinghvi Not yet, but @yash-rajpal wants to work on it. I've had a chat with him a few days ago, not sure how far he proceeded. Maybe Yash can comment?

I'm happy to test as well with my Whitelabel App as soon as a PR is here. I've got tons of complaints about this. Would be nice to have it in the next release which is scheduled for 25th as far as I've read.

jacotec avatar Jan 19 '21 15:01 jacotec

@jacotec I am on it. maybe half way there, not able to give much time to it as having exams right now. Would raise a PR as soon as I get time. Thanks.

yash-rajpal avatar Jan 19 '21 17:01 yash-rajpal

@yash-rajpal Do you see some light on the horizon with this issue? ;-)

jacotec avatar Mar 17 '21 21:03 jacotec

@adityarajsinghvi I'm not sure if @yash-rajpal is still on it, he's not replying. Do you still want to have a look into it as mentioned on Jan, 19?

jacotec avatar Apr 16 '21 16:04 jacotec

@diegolmello Is this issue on the roadmap to be fixed at some point?

jacotec avatar Jun 15 '21 21:06 jacotec

I thought it was under development by the community. If it's not, we can take over.

diegolmello avatar Jun 16 '21 12:06 diegolmello

@diegolmello I've heard nothing from @yash-rajpal since January, even when asking him on RocketChat. So I guess no one has taken it. I'd highly appreciate if this can be fixed, at least the "sleep" issue. ;-)

jacotec avatar Jun 16 '21 12:06 jacotec

My changes in #3373 are at least "defusing" the main drawback of lost voice messages as the recording now continues in background (and also when the iPhone goes to sleep). So this issue should not trash ongoing voice messages anymore.

However I leave that open as this does not help with the initial issue that sometimes the iPhone falls asleep (although from my point of view the use of the Expo keepawake looks good to me).

jacotec avatar Sep 15 '21 10:09 jacotec