Class: WebRTC::VideoTrackInterface

Inherits:
MediaStreamTrack show all
Defined in:
lib/webrtc/media_interfaces.rb

Constant Summary

Constants inherited from MediaStreamTrack

MediaStreamTrack::KINDS, MediaStreamTrack::READY_STATES

Instance Attribute Summary collapse

Attributes inherited from MediaStreamTrack

#content_hint, #enabled, #id, #kind, #label, #muted, #ready_state

Instance Method Summary collapse

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, **options)
  super({ kind: :video }.merge(options))
  @source = source
end

Instance Attribute Details

#sourceObject (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