Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Audio/Sound Event notification.

By
Dr Obx
on 5/29/15, 7:00 AM 1,142 views

Hi guys, as far as You know if (event/calendar) reminder i set small window popup with information on the screen, is it possible to add some sound to it ?

If yes, how can i do it ?

I found in im_chat module folder named audio but I can't hear any sound while receiving message in im_chat

0
Dr Obx
On 6/23/15, 5:54 AM

SS*: all you have to do is just create a folder inside the im_chat module /im_chat/static/src/audio and add some audio files in mp3 or ogg format but remember to change audio file name to 'purr' or 'ting' or if you want to any other but some changes are required in js file /static/src/js/im_chat.js

So finally I have im_chat with audio notification which is very useful.

*SS - simple solution

0
FEDERICO LEONI
On 6/10/15, 12:28 PM

 The audio files you found are for a function on

/static/src/js/im_chat.js

The part of the code you are looking for is starting from line 67:

 window_beep: function() {
if (typeof(Audio) === "undefined") {
return;
}
var audio = new Audio();
var ext = audio.canPlayType("audio/ogg; codecs=vorbis") ? ".ogg" : ".mp3";
var kitten = jQuery.deparam !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined;
audio.src = openerp.session.url("/im_chat/static/src/audio/" + (kitten ? "purr" : "ting") + ext);
audio.play();
},

Good hunting.

Hi Federico, thank you, is this part of the code commented or something ? It doesn't work as default.

Dr Obx
on 6/11/15, 7:58 AM

Yeah I found it but how to make it work ?

Dr Obx
on 6/11/15, 8:16 AM

Cool, just created a folder with audio files and now in im_chat I can hear the sound :) But my question was not strictly related to im_chat. I've had in mind a sound notification about calendar events. So when you create some event in calendar I would like to hear the sound when notification is displayed on the screen.

Dr Obx
on 6/11/15, 8:36 AM

I tested again the im_chat sound and is working, last time I used it was on an earlyer version of V8. Seems ok to me. But since you need to add sound (client side) for events/calendar you need to edit the js on calendar module.

FEDERICO LEONI
on 6/11/15, 8:41 AM

Yes I will ;)

Dr Obx
on 6/11/15, 9:39 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 5/29/15, 7:00 AM
Seen: 1142 times
Last updated: 6/23/15, 5:54 AM