Bug 457687 - Playing audio files does not work
Summary: Playing audio files does not work
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-09 17:11 UTC by Jan Bidler
Modified: 2022-08-26 18:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Bidler 2022-08-09 17:11:26 UTC
SUMMARY
NeoChat shows a play button for audio files, but it doesn't work


STEPS TO REPRODUCE
1. Have someone send an audio attachmetn
2. Click on the Playing symbol

OBSERVED RESULT
GStreamer; Unable to play - "<mxc url to audio file>"
Warning: "Failed to connect: Connection refused"
Error: "There is no URI-Handler für »mxc« implemented."


EXPECTED RESULT
NC should play the audio file.

SOFTWARE/OS VERSIONS
Linux: Arch Linux
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5
NeoChat: self compiled flatpak
Comment 1 Bug Janitor Service 2022-08-09 19:45:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/495
Comment 2 Tobias Fella 2022-08-26 18:42:58 UTC
Git commit 7dfac8a9f7ac8cca06577d829f52b22a63813a3d by Tobias Fella.
Committed on 26/08/2022 at 18:37.
Pushed by tfella into branch 'master'.

Fix audio playback

Since the preparation for encrypted events landed, audio playback was broken since QtMultimedia (gstreamer)
doesn't use our custom QNAM. Instead of letting QtMultimedia download the media, we thus need to manually download it
and point QML Audio to the local file. On the positive side, this also allows encrypted Audio files to be played and enables us to seek in the audio delegate :)
It does however mean that we do need to do an annoying bit of manual state management.

M  +71   -18   imports/NeoChat/Component/Timeline/AudioDelegate.qml
M  +1    -0    src/messageeventmodel.cpp

https://invent.kde.org/network/neochat/commit/7dfac8a9f7ac8cca06577d829f52b22a63813a3d