Auto hide audio recorder when wav uploads are not white listed

pull/1305/head
Ed 10 years ago
parent a4bea0656c
commit 5b16e73ede
  1. 4
      client/views/app/room.coffee

@ -188,7 +188,9 @@ Template.room.helpers
return !! ChatRoom.findOne { _id: @_id, t: 'c' }
canRecordAudio: ->
return RocketChat.settings.get('Message_AudioRecorderEnabled') and (navigator.getUserMedia? or navigator.webkitGetUserMedia?)
wavRegex = /audio\/wav|audio\/\*/i
wavEnabled = RocketChat.settings.get("FileUpload_MediaTypeWhiteList").match(wavRegex)
return RocketChat.settings.get('Message_AudioRecorderEnabled') and (navigator.getUserMedia? or navigator.webkitGetUserMedia?) and wavEnabled
unreadSince: ->
room = ChatRoom.findOne(this._id, { reactive: false })

Loading…
Cancel
Save