samueljun / tomato-clock

Tomato Clock is a simple browser extension for managing your productivity.
GNU General Public License v3.0
331 stars 55 forks source link

Use mp3 format for notification audio file #72

Closed eprikazc closed 4 years ago

eprikazc commented 4 years ago

This fixes https://github.com/samueljun/tomato-clock/issues/64 Tested with Ubuntu 18.04 and Firefox 68.0.2.

With .m4a file I am getting following in debugging console and audio is not played. 1

I don't quite understand why it happens. The file itself seems to be ok. For example, if I create dummy html page in src/, launch http server and load it in browser, then I can access the file and play it - by typing following in console:

a=new Audio('/assets/sounds/Portal2_sfx_button_positive.m4a')
p=a.play()

So, the issue happens only in extension and with this particular file (or file type?)

I tried to convert .m4a file to .wav and to .mp3 and extension worked with both. In this PR I use .mp3 file because of its smaller size.

samueljun commented 4 years ago

Thanks for the fix!