carderne / signal-export

Export your Signal chats to markdown files with attachments
Other
436 stars 46 forks source link

aac audio messages don't have audio player controls #43

Closed yringot closed 2 years ago

yringot commented 2 years ago

Some of the audio messages in my export are .m4a files and some are .aac files. (A conversation between an iPhone and an Android phone.) But in the HTML export only the m4a files have audio player controls while the aac files are just linked:

image

Seeing as the .aac files can be played in the browser (Firefox 95.0.2 on Windows 10 Home) after clicking the link, it seems that an easy fix for this issue would be for the script to add the audio control tag to them as well.

Changing the original source from:

<a href="./media/2020-04-01T13-47-49.821000_00_None.aac">
  2020-04-01T13-47-49.821000_00_None.aac
 </a>

to:

<audio controls="">
  <source src="./media/2020-04-01T13-47-49.821000_00_None.aac" type="audio/aac">
 </audio>

worked well to allow the audio to be played directly.

yringot commented 2 years ago

It seems that all the .aac files are coming from my Android phone.

carderne commented 2 years ago

Fixed in https://github.com/carderne/signal-export/commit/77387a619c4ffa7c84dd42effb56b443280f6f1a

yringot commented 2 years ago

It works! Phenomenal, thank you!

A minor thing: for each of the aac files, there is now an output in the console window:

image

carderne commented 2 years ago

Yeah sorry about that, it should be gone now if you re-run it.

An errant debug message that made it to GitHub...