make sounds great again

This commit is contained in:
syuilo 2018-03-04 18:50:30 +09:00
parent bad780ce96
commit 9cff3868de
6 changed files with 30 additions and 0 deletions

View file

@ -29,6 +29,7 @@ import Vue from 'vue';
import MessagingStreamConnection from '../../scripts/streaming/messaging-stream';
import XMessage from './messaging-room.message.vue';
import XForm from './messaging-room.form.vue';
import { url } from '../../../config';
export default Vue.extend({
components: {
@ -147,6 +148,11 @@ export default Vue.extend({
},
onMessage(message) {
//
if ((this as any).os.isEnableSounds) {
new Audio(`${url}/assets/message.mp3`).play();
}
const isBottom = this.isBottom();
this.messages.push(message);