Class: WebRTC::PeerConnectionFactory
- Inherits:
-
Object
- Object
- WebRTC::PeerConnectionFactory
- Defined in:
- lib/webrtc/factory.rb
Instance Attribute Summary collapse
-
#task_queue_factory ⇒ Object
readonly
Returns the value of attribute task_queue_factory.
Instance Method Summary collapse
- #create_peer_connection(configuration = nil) ⇒ Object
-
#initialize(task_queue_factory: CurrentTaskQueueFactory.new, default_configuration: nil) ⇒ PeerConnectionFactory
constructor
A new instance of PeerConnectionFactory.
Constructor Details
#initialize(task_queue_factory: CurrentTaskQueueFactory.new, default_configuration: nil) ⇒ PeerConnectionFactory
Returns a new instance of PeerConnectionFactory.
13 14 15 16 |
# File 'lib/webrtc/factory.rb', line 13 def initialize(task_queue_factory: CurrentTaskQueueFactory.new, default_configuration: nil) @task_queue_factory = task_queue_factory @default_configuration = default_configuration end |
Instance Attribute Details
#task_queue_factory ⇒ Object (readonly)
Returns the value of attribute task_queue_factory.
11 12 13 |
# File 'lib/webrtc/factory.rb', line 11 def task_queue_factory @task_queue_factory end |
Instance Method Details
#create_peer_connection(configuration = nil) ⇒ Object
18 19 20 |
# File 'lib/webrtc/factory.rb', line 18 def create_peer_connection(configuration = nil) RTCPeerConnection.new(configuration || @default_configuration, factory: self) end |