Audio recording/playing not working in Chrome 24

180 views
Skip to first unread message

Björn Ruberg

unread,
Dec 10, 2012, 6:20:47 PM12/10/12
to discuss...@googlegroups.com
Hello,

I've implemented (successfully I think) a web conference tool, which allows microphone-streams (from getUserMedia) to be shared accross the participants. The connection over RPCPeerConnection is successful and all browser get notified of attached remote streams. The remote streams are attached to an audio element like this:

Audiochat.prototype.connection_stream_added = function(event) {
   
   
var audioElement = $('<audio autoplay="autoplay" />');
    $
("body").append(audioElement);

   
// browser handling
   
if (navigator.mozGetUserMedia) {
        audioElement
.mozSrcObject = event.stream;
        audioElement
.play();
   
}
   
else if (navigator.webkitGetUserMedia) {
        audioElement
.src = webkitURL.createObjectURL(event.stream);
   
}
}



I tried the conference tool on three laptops under Fedora. All of them have a working mic/sound setup (tested with skype). The main difference is that two of them are running Chrome24-beta and the third one is running Chrome 23.

When I start the audio conference, I can hear the Microphone-streams of the laptops running Chrome 24 in the sound output of the Chrome 23 laptop. Great!
But I cannot hear sound in any of the Chrome 24 laptops boxes. All laptops are running the same code from my side, so I have the suspicion that something is not working Chrome 24.

What could that be?

Fred oleary

unread,
Dec 10, 2012, 6:28:37 PM12/10/12
to discuss...@googlegroups.com
We've noticed something simlar usein the <video> tag. What appeared to work for us was not to add the <audio> tag as part of the stream_added callback. E.g. try the same with the <audio> tag embedded in the html page and then use:
 
'document.getElementByID( 'audioTagId').src = webkitURL.createObjectURL(event.stream);'

Björn Ruberg

unread,
Dec 11, 2012, 3:15:22 AM12/11/12
to discuss...@googlegroups.com
Indeed, that helps. Thanks.
Looks like a bug though.
Reply all
Reply to author
Forward
0 new messages