Class: WebRTC::RTCInboundRtpStreamStats
- Defined in:
- lib/webrtc/stats_report.rb
Constant Summary
Constants inherited from RTCStats
Instance Attribute Summary collapse
-
#bytes_received ⇒ Object
readonly
Returns the value of attribute bytes_received.
-
#frames_decoded ⇒ Object
readonly
Returns the value of attribute frames_decoded.
-
#frames_dropped ⇒ Object
readonly
Returns the value of attribute frames_dropped.
-
#jitter ⇒ Object
readonly
Returns the value of attribute jitter.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#packets_lost ⇒ Object
readonly
Returns the value of attribute packets_lost.
-
#packets_received ⇒ Object
readonly
Returns the value of attribute packets_received.
-
#ssrc ⇒ Object
readonly
Returns the value of attribute ssrc.
Attributes inherited from RTCStats
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RTCInboundRtpStreamStats
constructor
A new instance of RTCInboundRtpStreamStats.
- #to_h ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ RTCInboundRtpStreamStats
Returns a new instance of RTCInboundRtpStreamStats.
79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/webrtc/stats_report.rb', line 79 def initialize( = {}) super(.merge(type: :inbound_rtp)) @ssrc = [:ssrc] @kind = [:kind] @packets_received = [:packets_received] || 0 @bytes_received = [:bytes_received] || 0 @packets_lost = [:packets_lost] || 0 @jitter = [:jitter] || 0.0 @frames_decoded = [:frames_decoded] || 0 @frames_dropped = [:frames_dropped] || 0 end |
Instance Attribute Details
#bytes_received ⇒ Object (readonly)
Returns the value of attribute bytes_received.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def bytes_received @bytes_received end |
#frames_decoded ⇒ Object (readonly)
Returns the value of attribute frames_decoded.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def frames_decoded @frames_decoded end |
#frames_dropped ⇒ Object (readonly)
Returns the value of attribute frames_dropped.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def frames_dropped @frames_dropped end |
#jitter ⇒ Object (readonly)
Returns the value of attribute jitter.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def jitter @jitter end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def kind @kind end |
#packets_lost ⇒ Object (readonly)
Returns the value of attribute packets_lost.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def packets_lost @packets_lost end |
#packets_received ⇒ Object (readonly)
Returns the value of attribute packets_received.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def packets_received @packets_received end |
#ssrc ⇒ Object (readonly)
Returns the value of attribute ssrc.
76 77 78 |
# File 'lib/webrtc/stats_report.rb', line 76 def ssrc @ssrc end |
Instance Method Details
#to_h ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/webrtc/stats_report.rb', line 91 def to_h super.merge( ssrc: @ssrc, kind: @kind, packetsReceived: @packets_received, bytesReceived: @bytes_received, packetsLost: @packets_lost, jitter: @jitter, framesDecoded: @frames_decoded, framesDropped: @frames_dropped ) end |