-
Notifications
You must be signed in to change notification settings - Fork 749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Voice Message #3598
Voice Message #3598
Conversation
The CI is very unhappy, can you have a look please? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some remarks after a first quick review
vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt
Outdated
Show resolved
Hide resolved
vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewModel.kt
Outdated
Show resolved
Hide resolved
...r/src/main/java/im/vector/app/features/home/room/detail/composer/VoiceMessageRecorderView.kt
Outdated
Show resolved
Hide resolved
* develop: (286 commits) Fix crash after video call Fix issue on button styles Clean after benoits review Fix warning about implicit type, introduced in Kotlin 1.5.20. "Returning type parameter has been inferred to Nothing implicitly. Please specify type arguments explicitly to hide this warning. Nothing can produce an exception at runtime." Bump kotlin_version from 1.5.10 to 1.5.20 Bump libphonenumber from 8.12.25 to 8.12.26 Fix call invite processed after call is ended because of fastlane mode. Jump to unread: removes unnecessary check which can cause scroll issue Jump to unread: avoid blink when jumping Clean after Benoits review Delete unused drawable to avoid conflict on develop Jump to unread: add towncrier file. Read marker: fix some issues with jump to unread visibility. Stop using ProgressDialog, there is a theme issue with it. It's not maintain by Google since it's deprecated. Force usage of MaterialAlertDialogBuilder to have the same UI effect. We sometimes need to block the UI :/ Reordering Add text style for dialogs Colored dialog button is now handled by the theme Update theme for material dialog and create a destructive variant Reorder buttons Update doc ... # Conflicts: # library/ui-styles/src/main/res/values/theme_dark.xml # library/ui-styles/src/main/res/values/theme_light.xml # vector/build.gradle # vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailFragment.kt # vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewModel.kt # vector/src/main/java/im/vector/app/features/home/room/detail/composer/TextComposerView.kt # vector/src/main/res/values/strings.xml
Good work! Some remarks, I will update the list for each new remark: In the composer
In the timeline
Technical
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
The recording should start after 1 sec upon user pressing on the mic buttonThere is already a 1s limit to prevent accidental records. -
The release to send action should only work after 1 sec of recording. If the user releases their finger before this time margin, the recording should not be sent and the composer should return to its default state
-
In the release to send toast, please add : " Hold to record, release to send"
-
Once the recording starts, add a vibration to indicate that the recording is started
-
Once the recording is started, and I start to slightly move my finger towards the padlock, the Slide to cancel and recording timer strings overlap
-
The recordings in the timeline should always have the same length no matter the duration of the recording. They should always be filled with a set length for the waveform
-
Cancelling action: Once users start dragging The Slide to cancel string, its opacity should start reducing (see the example given)
-
Cancelling action: Once the cancelling is performed, (upon finger release halfway through the UI) the Mic shouldn't animate in its default position but should simply return to its default state minus the animation
-
Locking mode: As I move my finger towards the padlock, it should become green and its shape should return to a circle that shrinks down in size. (see Figma or iOS implementation)
-
Locking mode: Once users enter the lock mode a toast should be displayed with the following string " Tap on the wavelength to stop and playback"
-
Recordings are currently set to 2 min. At 1:50, a toast should be displayed "10sec left" add vibration. Currently, a toast gets displayed at 11 sec left, then 10 sec. In locked mode, if the time limit is reached the recording should not be sent automatically, instead, it should go into playback mode. In unlocked mode, we should allow the recording to be sent automatically as soon as the time limit is reached.
-
Playback mode: Once in playback mode, there is a UI bug. The Delete icon overlaps with the expand menu button. This means that it causes the menu to open instead of allowing users to delete their recording
-
Playback mode: we can see the composer frame edge
-
In playback mode, the pause icon isn't centred properly
-
The emoji icon needs to be changed to https://www.figma.com/file/uaWc62Ux2DkZC4OGtAGcNc/Voice-Messages?node-id=562%3A1344
-
Change based on our discussion: if a user navigates back whilst a recording is ongoing and returns in the chatroom, the recording should be discarded and the composer should return to its default state.
-
Replace dialog strings upon first interaction with the MIC with: Title: Title: "Element would like to access the microphone on your device
Body "Element needs to access your microphone to make and receive calls, take videos, and record voice messages." -
Change based on our discussion: On reply mode replace random text string with Voice message
-
- [ ] For this PR, disable reply/edit mode if the user is recording a voice message (locked mode)
TEST BUILD 1.1.12-dev 40101132 / 26th Jul 21 by GD
- In record mode, the audio input seem to come from the right where it should come from the left
- The media player colours should be updated - I see this is updated for Dark theme, is it the case for the Light theme? Specs in compound here https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=2039%3A26421
For the Background (circle) it should be System colour for both Light and Dark themes. For the icon (e.g: play icon) It should be Secondary for both Light and Dark - Change string "Tap on the wavelength to stop and playback" to --> "Tap on your recording to stop or listen"
- On Dark mode, please change the instruction toast background to the Quarternary for better contrast when media players overlap https://www.figma.com/file/uaWc62Ux2DkZC4OGtAGcNc/Voice-Messages?node-id=1313%3A50406
28/07/21 Live testing
- Increase the size of the MIC button when users interact with it
- On default mode the MIC icon isn't centered. There is too much padding on the left and less padding on the right. Can we correct so we have equal distance padding?
Reminder
|
...d/src/main/java/org/matrix/android/sdk/api/session/room/model/message/MessageAudioContent.kt
Outdated
Show resolved
Hide resolved
...android/src/main/java/org/matrix/android/sdk/internal/crypto/model/rest/AudioWaveformInfo.kt
Outdated
Show resolved
Hide resolved
...oid/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt
Outdated
Show resolved
Hide resolved
...oid/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt
Show resolved
Hide resolved
multipicker/src/main/java/im/vector/lib/multipicker/utils/ContentResolverUtil.kt
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments
And one small remark: I think it will be possible to select headphones mic or device mic I want to record the audio. |
|
Now use limit for distances
Still a pb when Mic is on, margins are not correct
To be converted to an issue if not done for the release
|
Some issues from testing, can share screenshots if useful:
|
roomDetailViewModel.handle(RoomDetailAction.EnterEditMode(action.eventId, views.composerLayout.text.toString())) | ||
} else { | ||
requireActivity().toast(R.string.error_voice_message_cannot_reply_or_edit) | ||
} | ||
} | ||
is EventSharedAction.Quote -> { | ||
roomDetailViewModel.handle(RoomDetailAction.EnterQuoteMode(action.eventId, views.composerLayout.text.toString())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should disable this as well
waveform = if (amplitudeList.size < 50) { | ||
amplitudeList | ||
} else { | ||
amplitudeList.chunked(amplitudeList.size / 50) { items -> items.maxOrNull() ?: 0 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the limit of waveform list size on the SDK can be removed / commented out?
Hello,
|
I never programmed Android, but a general question: A lot of the above mentioned issues sound like you don't use a state machine - is there a reason for this? I'm pretty shure that would make it much easier and less error prone. 🤔 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, remaining issues will be handled in the coming days. Good work!
Fixes #29
https://www.figma.com/file/uaWc62Ux2DkZC4OGtAGcNc/Voice-Messages?node-id=546%3A27109
Default state:
When text is not blank:
Voice Message initial state:
Sliding to cancel:
Locking:
Locked:
Playback before sending:
Timeline: