Class: Google::Apis::YoutubeV3::LiveBroadcastStatistics

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/youtube_v3/classes.rb,
generated/google/apis/youtube_v3/representations.rb,
generated/google/apis/youtube_v3/representations.rb

Overview

Statistics about the live broadcast. These represent a snapshot of the values at the time of the request. Statistics are only returned for live broadcasts.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ LiveBroadcastStatistics

Returns a new instance of LiveBroadcastStatistics.



3937
3938
3939
# File 'generated/google/apis/youtube_v3/classes.rb', line 3937

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#concurrent_viewersFixnum

The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended. Corresponds to the JSON property concurrentViewers

Returns:

  • (Fixnum)


3925
3926
3927
# File 'generated/google/apis/youtube_v3/classes.rb', line 3925

def concurrent_viewers
  @concurrent_viewers
end

#total_chat_countFixnum

The total number of live chat messages currently on the broadcast. The property and its value will be present if the broadcast is public, has the live chat feature enabled, and has at least one message. Note that this field will not be filled after the broadcast ends. So this property would not identify the number of chat messages for an archived video of a completed live broadcast. Corresponds to the JSON property totalChatCount

Returns:

  • (Fixnum)


3935
3936
3937
# File 'generated/google/apis/youtube_v3/classes.rb', line 3935

def total_chat_count
  @total_chat_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3942
3943
3944
3945
# File 'generated/google/apis/youtube_v3/classes.rb', line 3942

def update!(**args)
  @concurrent_viewers = args[:concurrent_viewers] if args.key?(:concurrent_viewers)
  @total_chat_count = args[:total_chat_count] if args.key?(:total_chat_count)
end