class Google::Apis::YoutubeV3::CaptionSnippet

Basic details about a caption track, such as its language and name.

Attributes

audio_track_type[RW]

The type of audio track associated with the caption track. Corresponds to the JSON property `audioTrackType` @return [String]

failure_reason[RW]

The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed. Corresponds to the JSON property `failureReason` @return [String]

is_auto_synced[RW]

Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. Corresponds to the JSON property `isAutoSynced` @return [Boolean]

is_auto_synced?[RW]

Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions. Corresponds to the JSON property `isAutoSynced` @return [Boolean]

is_cc[RW]

Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. Corresponds to the JSON property `isCC` @return [Boolean]

is_cc?[RW]

Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false. Corresponds to the JSON property `isCC` @return [Boolean]

is_draft[RW]

Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. Corresponds to the JSON property `isDraft` @return [Boolean]

is_draft?[RW]

Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. Corresponds to the JSON property `isDraft` @return [Boolean]

is_easy_reader[RW]

Indicates whether caption track is formatted for “easy reader,” meaning it is at a third-grade level for language learners. The default value is false. Corresponds to the JSON property `isEasyReader` @return [Boolean]

is_easy_reader?[RW]

Indicates whether caption track is formatted for “easy reader,” meaning it is at a third-grade level for language learners. The default value is false. Corresponds to the JSON property `isEasyReader` @return [Boolean]

is_large[RW]

Indicates whether the caption track uses large text for the vision-impaired. The default value is false. Corresponds to the JSON property `isLarge` @return [Boolean]

is_large?[RW]

Indicates whether the caption track uses large text for the vision-impaired. The default value is false. Corresponds to the JSON property `isLarge` @return [Boolean]

language[RW]

The language of the caption track. The property value is a BCP-47 language tag. Corresponds to the JSON property `language` @return [String]

last_updated[RW]

The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format. Corresponds to the JSON property `lastUpdated` @return [DateTime]

name[RW]

The name of the caption track. The name is intended to be visible to the user as an option during playback. Corresponds to the JSON property `name` @return [String]

status[RW]

The caption track's status. Corresponds to the JSON property `status` @return [String]

track_kind[RW]

The caption track's type. Corresponds to the JSON property `trackKind` @return [String]

video_id[RW]

The ID that YouTube uses to uniquely identify the video associated with the caption track. Corresponds to the JSON property `videoId` @return [String]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/youtube_v3/classes.rb, line 815
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/youtube_v3/classes.rb, line 820
def update!(**args)
  @audio_track_type = args[:audio_track_type] if args.key?(:audio_track_type)
  @failure_reason = args[:failure_reason] if args.key?(:failure_reason)
  @is_auto_synced = args[:is_auto_synced] if args.key?(:is_auto_synced)
  @is_cc = args[:is_cc] if args.key?(:is_cc)
  @is_draft = args[:is_draft] if args.key?(:is_draft)
  @is_easy_reader = args[:is_easy_reader] if args.key?(:is_easy_reader)
  @is_large = args[:is_large] if args.key?(:is_large)
  @language = args[:language] if args.key?(:language)
  @last_updated = args[:last_updated] if args.key?(:last_updated)
  @name = args[:name] if args.key?(:name)
  @status = args[:status] if args.key?(:status)
  @track_kind = args[:track_kind] if args.key?(:track_kind)
  @video_id = args[:video_id] if args.key?(:video_id)
end