Documentation ¶
Overview ¶
Package media wraps the JS MediaDevices API.
Index ¶
- Constants
- type Buffer
- type Device
- type DeviceKind
- type FacingMode
- type Float
- type Kind
- type Qualifier
- type Recorder
- type ResizeMode
- type Settings
- type Source
- type Stream
- type Track
- type Type
- type Uint
- type VideoSettings
- func (x VideoSettings) AspectRatio() Float
- func (x VideoSettings) AspectRatioSet(f Float)
- func (x VideoSettings) FacingMode() (Qualifier, FacingMode)
- func (x VideoSettings) FacingModeSet(q Qualifier, fm FacingMode)
- func (x VideoSettings) FrameRate() Float
- func (x VideoSettings) FrameRateSet(f Float)
- func (x VideoSettings) Height() Uint
- func (x VideoSettings) HeightSet(u Uint)
- func (x VideoSettings) ResizeMode() ResizeMode
- func (x VideoSettings) ResizeModeSet(rm ResizeMode)
- func (x VideoSettings) Width() Uint
- func (x VideoSettings) WidthSet(u Uint)
- type VideoTrack
Constants ¶
View Source
const ( VideoInput DeviceKind = "videoinput" AudioInput = "audioinput" AudioOutput = "audiooutput" )
View Source
const ( User FacingMode = "user" Environment = "environment" Left = "left" Right = "right" )
View Source
const ( Exact Qualifier = "exact" Ideal = "ideal" Max = "max" Min = "min" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
func Devices ¶
func Devices(kind DeviceKind) ([]Device, error)
Devices returns a slice of all available devices of the specified kind.
type DeviceKind ¶
type DeviceKind string
type FacingMode ¶
type FacingMode string
type Recorder ¶
type Recorder struct {
// contains filtered or unexported fields
}
func (*Recorder) ReaderChain ¶ added in v0.2.5
func (x *Recorder) ReaderChain(dst msg.ReaderTaker) error
type ResizeMode ¶
type ResizeMode string
const ( None ResizeMode = "none" CropScape = "crop-and-scale" )
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
Settings defines a set of properties common to all stream types.
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
func Get ¶
func Get(video VideoSettings) (Stream, error)
If a setting is a zero value, it will be ignored. Unmodified settings obtained from a respective make function is equivalent to requesting any stream of that kind.
func (Stream) VideoTracks ¶
func (x Stream) VideoTracks() []VideoTrack
type VideoSettings ¶
type VideoSettings struct {
Settings
}
func MakeVideoSettings ¶
func MakeVideoSettings() VideoSettings
func (VideoSettings) AspectRatio ¶
func (x VideoSettings) AspectRatio() Float
func (VideoSettings) AspectRatioSet ¶
func (x VideoSettings) AspectRatioSet(f Float)
func (VideoSettings) FacingMode ¶
func (x VideoSettings) FacingMode() (Qualifier, FacingMode)
func (VideoSettings) FacingModeSet ¶
func (x VideoSettings) FacingModeSet(q Qualifier, fm FacingMode)
func (VideoSettings) FrameRate ¶
func (x VideoSettings) FrameRate() Float
func (VideoSettings) FrameRateSet ¶
func (x VideoSettings) FrameRateSet(f Float)
func (VideoSettings) Height ¶
func (x VideoSettings) Height() Uint
func (VideoSettings) HeightSet ¶
func (x VideoSettings) HeightSet(u Uint)
func (VideoSettings) ResizeMode ¶
func (x VideoSettings) ResizeMode() ResizeMode
func (VideoSettings) ResizeModeSet ¶
func (x VideoSettings) ResizeModeSet(rm ResizeMode)
func (VideoSettings) Width ¶
func (x VideoSettings) Width() Uint
func (VideoSettings) WidthSet ¶
func (x VideoSettings) WidthSet(u Uint)
type VideoTrack ¶
type VideoTrack Track
func (VideoTrack) Apply ¶
func (x VideoTrack) Apply(vs VideoSettings) error
func (VideoTrack) Capabilities ¶
func (x VideoTrack) Capabilities() VideoSettings
func (VideoTrack) Settings ¶
func (x VideoTrack) Settings() VideoSettings
Click to show internal directories.
Click to hide internal directories.