Giter Club home page Giter Club logo

Comments (4)

lherman-cs avatar lherman-cs commented on August 26, 2024

I definitely forgot about handling non-discrete values in the design. At first, I figured that it was nice to have this design because then you can do a sanity check in the wrapper level, and let the adapter implementors to simply use the prop.

from mediadevices.

lherman-cs avatar lherman-cs commented on August 26, 2024

As you have suggested in #69, it would be nice to have an interface from the wrapper to get the default value.

But, I think instead of putting the interface in Wrapper, we can put it under prop since the default values shouldn't be dependent on anything.

So, we probably have something like,

func (p Media) Default() prop.Media

Or probably even have it in package level

package prop

var Default = prop.Media{
  ...
}

What do you think?

from mediadevices.

at-wat avatar at-wat commented on August 26, 2024

I think the default values (especially continuous parameters) depends on the actual device.
For example camera would have default framerate of 30fps in most case. But, screen capture maybe 10fps since it's too heavy at 30fps.

from mediadevices.

lherman-cs avatar lherman-cs commented on August 26, 2024

I see. If that's the case, I'm not seeing that we can do better than we already have rn, set the default value in each adapter implementation.

from mediadevices.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.