Class: WebRTC::RTCOutboundRtpStreamStats
- Defined in:
- lib/webrtc/stats_report.rb
Constant Summary
Constants inherited from RTCStats
Instance Attribute Summary collapse
-
#bytes_sent ⇒ Object
readonly
Returns the value of attribute bytes_sent.
-
#frames_encoded ⇒ Object
readonly
Returns the value of attribute frames_encoded.
-
#frames_per_second ⇒ Object
readonly
Returns the value of attribute frames_per_second.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#packets_sent ⇒ Object
readonly
Returns the value of attribute packets_sent.
-
#ssrc ⇒ Object
readonly
Returns the value of attribute ssrc.
-
#target_bitrate ⇒ Object
readonly
Returns the value of attribute target_bitrate.
Attributes inherited from RTCStats
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RTCOutboundRtpStreamStats
constructor
A new instance of RTCOutboundRtpStreamStats.
- #to_h ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ RTCOutboundRtpStreamStats
Returns a new instance of RTCOutboundRtpStreamStats.
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/webrtc/stats_report.rb', line 108 def initialize( = {}) super(.merge(type: :outbound_rtp)) @ssrc = [:ssrc] @kind = [:kind] @packets_sent = [:packets_sent] || 0 @bytes_sent = [:bytes_sent] || 0 @frames_encoded = [:frames_encoded] || 0 @target_bitrate = [:target_bitrate] @frames_per_second = [:frames_per_second] end |
Instance Attribute Details
#bytes_sent ⇒ Object (readonly)
Returns the value of attribute bytes_sent.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def bytes_sent @bytes_sent end |
#frames_encoded ⇒ Object (readonly)
Returns the value of attribute frames_encoded.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def frames_encoded @frames_encoded end |
#frames_per_second ⇒ Object (readonly)
Returns the value of attribute frames_per_second.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def frames_per_second @frames_per_second end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def kind @kind end |
#packets_sent ⇒ Object (readonly)
Returns the value of attribute packets_sent.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def packets_sent @packets_sent end |
#ssrc ⇒ Object (readonly)
Returns the value of attribute ssrc.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def ssrc @ssrc end |
#target_bitrate ⇒ Object (readonly)
Returns the value of attribute target_bitrate.
106 107 108 |
# File 'lib/webrtc/stats_report.rb', line 106 def target_bitrate @target_bitrate end |
Instance Method Details
#to_h ⇒ Object
119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/webrtc/stats_report.rb', line 119 def to_h super.merge( ssrc: @ssrc, kind: @kind, packetsSent: @packets_sent, bytesSent: @bytes_sent, framesEncoded: @frames_encoded, targetBitrate: @target_bitrate, framesPerSecond: @frames_per_second ) end |