p5LiveMedia icon indicating copy to clipboard operation
p5LiveMedia copied to clipboard

Add a stop and disconnect method

Open vanevery opened this issue 5 years ago • 2 comments

// Doesn't exist but we probably need: p5l.stop(); p5l.disconnect();

vanevery avatar Dec 01 '20 20:12 vanevery

Dear vanevery,

p5l.stop(); p5l.disconnect(); function is a good idea!

I am using this library for my project. I really appreciate it. However, I am wondering how I can use a mute function.

'myStream.getTracks()[0].enabled = false;' is not working. Is there any other option to use mute function?

Thank you so much. Best, Yeun

Hamsoon22 avatar Feb 20 '21 01:02 Hamsoon22

Glad it is useful for you! Yes, I need to get on those stop and disconnect methods! (Pull requests are more than welcome ;-)

For mute, I would probably do the following: myStream.muted = true; Actually, I am guessing that the myStream variable in this case is actually a p5.MediaElement in which case you'll either have to do: myStream.volume(0); or myStream.elt.muted = true;

vanevery avatar Feb 20 '21 02:02 vanevery