Element-android: Add an embedded player for Audio files

Created on 11 Dec 2020  Â·  17Comments  Â·  Source: vector-im/element-android

As per Element Web:

image

Currently the user has to download the file and play it with a third party application, and it's rendered like that in the timeline:

image

parity-with-web

Most helpful comment

Audio messages in Telegram looks as
Telegram_2020-12-12_00-23-44
Take note on bars.

Oh, yeah, this is definitely a cool look, but I don't think it's urgent functionality over a straight, flat seek bar. My personal thinking is: get it done, polish it later, and wait before we try adding any unnecessary features.

All 17 comments

Highly in favor of this.

For the record, the Element Web player is just the default HTML5 audio player for the browser. I'm not a fan of this; I think Element should have a consistent audio experience across all element apps, which I think demands a dedicated player style.

An embedded player must have a speed control change. @bmarty, should a separate issue be opened or it's a part of this one?

... why would it have a speed control change? That sounds like extreme clutter. Most other apps (whatsapp, telegram) don't even have a volume button on the embedded player, because they value design. It's an open source cliche to stuff niche functionality in and clutter the design. I might _never_ use a speed control changer for audio messages I receive. If you want one, download the file and open it in your audio player of choice.

I'm not a tg user, but even I know that it HAS speed control change! Youtube also has speed control change.

Could you explain, why should I waste my time listening at 1x speed?

Having a "Skip silence" button is also useful for voice messages.

Maybe it would be better just not create silence during the recording phase.

Perhaps it would be better if everyone around us became as convenient for us.
But so far this is not the case.

I'm not a tg user, but even I know that it HAS speed control change!

I don't see it here. Oh, and I just checked fluffychat -- they don't have it either, and they don't have volume control either. So I am very firmly of the opinion that it should _just_ be a seek bar + play/pause button.

Youtube also has speed control change.

Yeah, but YouTube is a very old video platform that hosts videos varying between one second and 24 hours in length, closed captions, subtitles, quality options, varying player sizes, popup bubbles, and a dozen other features. And it's been called clunky for a long time. Youtube is a dedicated video platform. We're talking about an inline audio player that will mostly be used for quick voice notes.

Could you explain, why should I waste my time listening at 1x speed?

Don't, don't listen, I don't care, but many of us are happy to listen to voice notes as they are recorded.

Having a "Skip silence" button is also useful for voice messages.

I see why this would be useful, but I don't see why it would be useful enough to take up space in an inline audio player.

Guys, please don't run away with this, it can and should be sleek and simple.

Maybe it would be better just not create silence during the recording phase.

I mean, yeah. The number of cases where silence is going to ruin a voice note will be few and far between. Most voice notes are going to be in the three to thirty second range. With a seek bar. That's good enough, you don't need to add five thousand options to each inline audio widget, that's absurd.

I don't see it here.

https://storage.googleapis.com/telesite-prod/photos/dcd677a0-b6ff-11ea-aab1-7bc436a38979-feed670-670-x.jpeg

many of us are happy to listen to voice notes as they are recorded

never speak for others

Audio messages in Telegram looks as
Telegram_2020-12-12_00-23-44
Take note on bars.

Audio messages in Telegram looks as
Telegram_2020-12-12_00-23-44
Take note on bars.

Oh, yeah, this is definitely a cool look, but I don't think it's urgent functionality over a straight, flat seek bar. My personal thinking is: get it done, polish it later, and wait before we try adding any unnecessary features.

bars are awesome for scrolling and positioning on long messages

Sad true is there are media files with sound. It can be a songs, lectorium, audiobooks, notes, discussions, etc, etc... They need volume control, speed chande, precize navigation, and so on.
And they should not start to play on receiving, newer.

But there are voice messages. 99,99% from them shorter then 2-3 minutes, they maybe need autto-volume-normaliser, and simple and not very slick navigation (I think telegram navigation with bars is good).
And they should auto-play on receive if you have channel on screen and with focus. Possible, by special option — play on receiving in background too.

Different use-case.

I would not expect to listen to a lecture, audiobook, or dialog inside my messaging app. You would still have the option to download each audio message as a file, and play that file in your audio player of choice. Our messenger does not need to be a messenger, an ebook reader, a music player, a study app, and everything else. It just needs to function as a messenger.

@DanHakimi have you ever received 2-3 minutes message with 'mmmm', 'aaaaa' or 'soooooo' sounds?

99,99% from them shorter then 2-3 minutes

I wouldn't say that's accurate in Venezuela... it's a cultural thing.

I think https://github.com/vector-im/element-android/issues/2525#issuecomment-743458446 maybe passed unnoticed because the image isn't embedded. Let me do it:

That might be the simplest speed control ever. The difference it makes is:

| incoming voice message in WhatsApp | in Telegram |
|---|---|
| ||

I also didn't feel like that's necessary until one day Telegram implemented it.

However, it's true that they didn't implement that feature in their 1st iteration. Having an audio message player is more important than making it 2x.

BTW, Telegram android client is open source. This might be silly but can't element reuse some code?

And they should auto-play on receive if you have channel on screen and with focus. Possible, by special option — play on receiving in background too.

@iav Such a feature needs to be Opt-in in the app's global settings or per room. Not only for privacy reasons the default behavior shouldn't play a message automated if this option is not explicitly set.
Setting auto-play as default could even be a legal issue in Europe or when providing services to European Citizens (Art. 6 (1) f GDPR)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bmarty picture bmarty  Â·  3Comments

Bubu picture Bubu  Â·  3Comments

nadonomy picture nadonomy  Â·  3Comments

mvgorcum picture mvgorcum  Â·  3Comments

Bubu picture Bubu  Â·  3Comments