Skip to content
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 messages #4433

Merged
merged 65 commits into from
Jul 22, 2021
Merged

Voice messages #4433

merged 65 commits into from
Jul 22, 2021

Conversation

stefanceriu
Copy link
Member

@stefanceriu stefanceriu commented Jun 15, 2021

fix #4090, fix #4091, fix #4092, fix #4094, fix #4095, fix #4096

Added initial voice messages implementation:

  • custom audio recorder based on AVAudioRecorder
  • new recording toolbar: long press to record, swipe left to cancel, release to send, duration label and red dot animation
  • custom audio player based on AVPlayer
  • audio message bubble cells which still supports all interaction types (reply, react etc.)
  • custom audio waveformView with sampling done through DSWaveformImage's WaveformAnalyzer
  • custom audio playback view

Notes:

  • currently recording and seding MPEG4AAC .m4a files, we need to replace that with opus ogg
  • missing locked mode recording UI
  • feature flag unde BuildSettings.voiceMessagesEnabled

@stefanceriu stefanceriu changed the title Element 4090 Voice messages Jun 15, 2021
@stefanceriu stefanceriu force-pushed the element_4090 branch 2 times, most recently from 3e52d2f to da7a136 Compare June 18, 2021 14:59
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Modules/Room/RoomViewController.m Outdated Show resolved Hide resolved
Riot/Utils/WeakObjectWrapper.swift Outdated Show resolved Hide resolved
…ixed completionCallback storage so they take the requestedNumberOfSamples into account.
…ue and fixed completionCallback storage so they take the requestedNumberOfSamples into account."

This reverts commit 9a3d26e.
…sing queue and fixed completionCallback storage so they take the requestedNumberOfSamples into account.""

This reverts commit cf884c6.
Podfile.lock Show resolved Hide resolved

func recordWithOuputURL(_ url: URL) {

let settings = [AVFormatIDKey: Int(kAudioFormatMPEG4AAC),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not an issue, but as an audio nerd it bothers me that this records to a lossy format rather than lossless when it's going to be converted to another lossy format immediately before sending. 🤓

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked about this privatelly and decided to try to only switch the container format when converting, using opus here.

… to DateFormatters for formatting durations, sanitising audio player durations and current times.
@manuroe manuroe merged commit b3cca16 into develop Jul 22, 2021
@manuroe manuroe deleted the element_4090 branch July 22, 2021 13:13
@MacLemon
Copy link

Will there be a possibility for Matrix servers to refuse that message type to conserve storage space?

I'm honestly not keen on receiving any audio from people who are too lazy to type or unwilling to use voice recognition to accommodate for their laziness.

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