forked from matrix/element-web
Explicitly make React use the same audio element.. Use a 'key' and comment why it is required.
This commit is contained in:
parent
05dba9c2d4
commit
35862e0c66
src/skins/vector/views/molecules/voip
|
@ -32,11 +32,10 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
||||||
// NB: This block MUST be the first thing inside the <div> else react won't
|
// NB: This block MUST have a "key" so React doesn't clobber the elements
|
||||||
// know that they refer to the same thing and so will clobber them between
|
// between in-call / not-in-call.
|
||||||
// in-call / not-in-call resulting in no inbound audio.
|
|
||||||
var audioBlock = (
|
var audioBlock = (
|
||||||
<audio ref="ringAudio" loop>
|
<audio ref="ringAudio" key="voip_ring_audio" loop>
|
||||||
<source src="media/ring.ogg" type="audio/ogg" />
|
<source src="media/ring.ogg" type="audio/ogg" />
|
||||||
<source src="media/ring.mp3" type="audio/mpeg" />
|
<source src="media/ring.mp3" type="audio/mpeg" />
|
||||||
</audio>
|
</audio>
|
||||||
|
|
Loading…
Reference in New Issue