Class: WebRTC::VideoTrackInterface
- Inherits:
-
MediaStreamTrack
- Object
- MediaStreamTrack
- WebRTC::VideoTrackInterface
- Defined in:
- lib/webrtc/media_interfaces.rb
Constant Summary
Constants inherited from MediaStreamTrack
MediaStreamTrack::KINDS, MediaStreamTrack::READY_STATES
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Attributes inherited from MediaStreamTrack
#content_hint, #enabled, #id, #kind, #label, #muted, #ready_state
Instance Method Summary collapse
- #add_sink(sink) ⇒ Object
-
#initialize(source: VideoTrackSourceInterface.new, **options) ⇒ VideoTrackInterface
constructor
A new instance of VideoTrackInterface.
- #remove_sink(sink) ⇒ Object
Methods inherited from MediaStreamTrack
#apply_constraints, #clone, #get_capabilities, #get_constraints, #get_settings, #on_ended, #on_mute, #on_unmute, #stop
Constructor Details
#initialize(source: VideoTrackSourceInterface.new, **options) ⇒ VideoTrackInterface
Returns a new instance of VideoTrackInterface.
88 89 90 91 |
# File 'lib/webrtc/media_interfaces.rb', line 88 def initialize(source: VideoTrackSourceInterface.new, **) super({ kind: :video }.merge()) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
86 87 88 |
# File 'lib/webrtc/media_interfaces.rb', line 86 def source @source end |
Instance Method Details
#add_sink(sink) ⇒ Object
93 94 95 |
# File 'lib/webrtc/media_interfaces.rb', line 93 def add_sink(sink) @source.add_sink(sink) end |
#remove_sink(sink) ⇒ Object
97 98 99 |
# File 'lib/webrtc/media_interfaces.rb', line 97 def remove_sink(sink) @source.remove_sink(sink) end |