DamonOehlman / videoproc

Draw video frames to a canvas and analyse / modify pixel data
10 stars 1 forks source link

Mute the video element created by videoproc #4

Closed balupton closed 10 years ago

balupton commented 10 years ago

Needed to stop the following from outputting the video's audio:

var localStreamMedia = media()
var canvas = videoproc(document.body, {})
localStreamMedia.render(canvas)
silviapfeiffer commented 10 years ago

You're better off not asking for audio in the first place. Use a constraint with { audio : false } for localStreamMedia.

balupton commented 10 years ago

Is there any time when you want a canvas element "playing" audio? especially when you can't see the video? It seems unlikely.

However, for our use case, we want audio in the original stream, just not when processing it.

DamonOehlman commented 10 years ago

I can understand why you want the original audio, and I think for the sake of consistency with the rtc-media module (which does mute the video element it is rendering to for locally captured video - https://github.com/rtc-io/rtc-media/blob/master/index.js#L397) this PR makes sense.

I'll merge it in and publish an update.

I think @silviapfeiffer has got the CLA stuff almost sorted too, so Ben early next week we'll probably just need you to sign a CLA (standard Apache 2.0 license stuff).

DamonOehlman commented 10 years ago

Just published 0.7.1 which implements this change.

silviapfeiffer commented 10 years ago

Fair enough :-)