bbc / VideoContext

An experimental HTML5 & WebGL video composition and rendering API.
http://bbc.github.io/VideoContext/
Apache License 2.0
1.33k stars 157 forks source link

Easier set volume #55

Closed gossi closed 7 years ago

gossi commented 7 years ago

I could not find the volume for the VideoContext. Instead, each source has its own volume. I - and I guess most others as well - treat the whole composition as one video with one volume control. However if I do have build an UI around video context, setting the volume, is cycle through all source nodes and set it on each. I was wondering, whether there is a default volume, that is set on all source nodes, when they are added and when set is applied onto all present source nodes as well.

In pseudo code:

VideoContext {
    get volume(); // returns the default volume
    set volume(value); // sets the default volume and applies it to all present source nodes
}

Would be wonderful to have that.

emshotton commented 7 years ago

Hey Gossi.

This sounds like a good idea! I'll add it in shortly.

emshotton commented 7 years ago

This has been added to v0.51.0 available here or on npm.

I'll close this issue for now. Feel free to re-open if you find any bugs!

gossi commented 7 years ago

Wow. You are amazing!