Class: Google::Apis::YoutubeV3::CaptionSnippet
- Inherits:
-
Object
- Object
- Google::Apis::YoutubeV3::CaptionSnippet
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/youtube_v3/classes.rb,
lib/google/apis/youtube_v3/representations.rb,
lib/google/apis/youtube_v3/representations.rb
Overview
Basic details about a caption track, such as its language and name.
Instance Attribute Summary collapse
-
#audio_track_type ⇒ String
The type of audio track associated with the caption track.
-
#failure_reason ⇒ String
The reason that YouTube failed to process the caption track.
-
#is_auto_synced ⇒ Boolean
(also: #is_auto_synced?)
Indicates whether YouTube synchronized the caption track to the audio track in the video.
-
#is_cc ⇒ Boolean
(also: #is_cc?)
Indicates whether the track contains closed captions for the deaf and hard of hearing.
-
#is_draft ⇒ Boolean
(also: #is_draft?)
Indicates whether the caption track is a draft.
-
#is_easy_reader ⇒ Boolean
(also: #is_easy_reader?)
Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners.
-
#is_large ⇒ Boolean
(also: #is_large?)
Indicates whether the caption track uses large text for the vision-impaired.
-
#language ⇒ String
The language of the caption track.
-
#last_updated ⇒ DateTime
The date and time when the caption track was last updated.
-
#name ⇒ String
The name of the caption track.
-
#status ⇒ String
The caption track's status.
-
#track_kind ⇒ String
The caption track's type.
-
#video_id ⇒ String
The ID that YouTube uses to uniquely identify the video associated with the caption track.
Instance Method Summary collapse
-
#initialize(**args) ⇒ CaptionSnippet
constructor
A new instance of CaptionSnippet.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CaptionSnippet
Returns a new instance of CaptionSnippet.
1036 1037 1038 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1036 def initialize(**args) update!(**args) end |
Instance Attribute Details
#audio_track_type ⇒ String
The type of audio track associated with the caption track.
Corresponds to the JSON property audioTrackType
955 956 957 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 955 def audio_track_type @audio_track_type end |
#failure_reason ⇒ String
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
961 962 963 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 961 def failure_reason @failure_reason end |
#is_auto_synced ⇒ Boolean 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
972 973 974 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 972 def is_auto_synced @is_auto_synced end |
#is_cc ⇒ Boolean 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
979 980 981 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 979 def is_cc @is_cc end |
#is_draft ⇒ Boolean 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
987 988 989 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 987 def is_draft @is_draft end |
#is_easy_reader ⇒ Boolean 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
994 995 996 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 994 def is_easy_reader @is_easy_reader end |
#is_large ⇒ Boolean 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
1001 1002 1003 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1001 def is_large @is_large end |
#language ⇒ String
The language of the caption track. The property value is a BCP-47 language tag.
Corresponds to the JSON property language
1007 1008 1009 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1007 def language @language end |
#last_updated ⇒ DateTime
The date and time when the caption track was last updated.
Corresponds to the JSON property lastUpdated
1012 1013 1014 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1012 def last_updated @last_updated end |
#name ⇒ String
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
1018 1019 1020 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1018 def name @name end |
#status ⇒ String
The caption track's status.
Corresponds to the JSON property status
1023 1024 1025 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1023 def status @status end |
#track_kind ⇒ String
The caption track's type.
Corresponds to the JSON property trackKind
1028 1029 1030 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1028 def track_kind @track_kind end |
#video_id ⇒ String
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
1034 1035 1036 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1034 def video_id @video_id end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/google/apis/youtube_v3/classes.rb', line 1041 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 |