Class: Google::Apis::YoutubeV3::CaptionSnippet

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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CaptionSnippet

Returns a new instance of CaptionSnippet.



873
874
875
# File 'generated/google/apis/youtube_v3/classes.rb', line 873

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

Instance Attribute Details

#audio_track_typeString

The type of audio track associated with the caption track. Corresponds to the JSON property audioTrackType

Returns:

  • (String)


791
792
793
# File 'generated/google/apis/youtube_v3/classes.rb', line 791

def audio_track_type
  @audio_track_type
end

#failure_reasonString

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

Returns:

  • (String)


797
798
799
# File 'generated/google/apis/youtube_v3/classes.rb', line 797

def failure_reason
  @failure_reason
end

#is_auto_syncedBoolean Also known as: is_auto_synced?

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

Returns:

  • (Boolean)


808
809
810
# File 'generated/google/apis/youtube_v3/classes.rb', line 808

def is_auto_synced
  @is_auto_synced
end

#is_ccBoolean Also known as: is_cc?

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

Returns:

  • (Boolean)


815
816
817
# File 'generated/google/apis/youtube_v3/classes.rb', line 815

def is_cc
  @is_cc
end

#is_draftBoolean Also known as: is_draft?

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. @mutable youtube. captions.insert youtube.captions.update Corresponds to the JSON property isDraft

Returns:

  • (Boolean)


823
824
825
# File 'generated/google/apis/youtube_v3/classes.rb', line 823

def is_draft
  @is_draft
end

#is_easy_readerBoolean Also known as: is_easy_reader?

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

Returns:

  • (Boolean)


830
831
832
# File 'generated/google/apis/youtube_v3/classes.rb', line 830

def is_easy_reader
  @is_easy_reader
end

#is_largeBoolean Also known as: is_large?

Indicates whether the caption track uses large text for the vision-impaired. The default value is false. Corresponds to the JSON property isLarge

Returns:

  • (Boolean)


837
838
839
# File 'generated/google/apis/youtube_v3/classes.rb', line 837

def is_large
  @is_large
end

#languageString

The language of the caption track. The property value is a BCP-47 language tag. Corresponds to the JSON property language

Returns:

  • (String)


843
844
845
# File 'generated/google/apis/youtube_v3/classes.rb', line 843

def language
  @language
end

#last_updatedString

The date and time when the caption track was last updated. The value is specified in ISO 8601 format. Corresponds to the JSON property lastUpdated

Returns:

  • (String)


849
850
851
# File 'generated/google/apis/youtube_v3/classes.rb', line 849

def last_updated
  @last_updated
end

#nameString

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

Returns:

  • (String)


855
856
857
# File 'generated/google/apis/youtube_v3/classes.rb', line 855

def name
  @name
end

#statusString

The caption track's status. Corresponds to the JSON property status

Returns:

  • (String)


860
861
862
# File 'generated/google/apis/youtube_v3/classes.rb', line 860

def status
  @status
end

#track_kindString

The caption track's type. Corresponds to the JSON property trackKind

Returns:

  • (String)


865
866
867
# File 'generated/google/apis/youtube_v3/classes.rb', line 865

def track_kind
  @track_kind
end

#video_idString

The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert Corresponds to the JSON property videoId

Returns:

  • (String)


871
872
873
# File 'generated/google/apis/youtube_v3/classes.rb', line 871

def video_id
  @video_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
# File 'generated/google/apis/youtube_v3/classes.rb', line 878

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