We are running Odoo v8 and the chat system works fine, but there is no audio notification, which makes it easy to miss messages. Is there a way to provide this somehow?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- 客戶關係
- e-Commerce
- 會計
- 庫存
- PoS
- Project
- MRP
此問題已被標幟
I think the easiest way would be just add Audio Web API and something like this into the im_chat.js
var beep = function(duration, type, finishedCallback) {
if (!(window.audioContext || window.webkitAudioContext)) {
throw Error("Your browser does not support Audio Context.");
}
duration = +duration;
// Only 0-4 are valid types.
type = (type % 5) || 0;
if (typeof finishedCallback != "function") {
finishedCallback = function() {};
}
var ctx = new (window.audioContext || window.webkitAudioContext);
var osc = ctx.createOscillator();
osc.type = type;
osc.connect(ctx.destination);
osc.noteOn(0);
setTimeout(function() {
osc.noteOff(0);
finishedCallback();
}, duration);
};
相關帖文 | 回覆 | 瀏覽次數 | 活動 | |
---|---|---|---|---|
|
2
7月 23
|
4957 | ||
|
0
12月 23
|
2329 | ||
|
0
12月 22
|
2903 | ||
|
0
11月 22
|
3147 | ||
|
1
12月 20
|
2400 |