class Yt::Annotations::Branding
A Branding
annotation is similar to a card, except that it does not have text, only a channel-linked image displayed in the bottom-right corner.
Private Instance Methods
ends_at_in(data)
click to toggle source
# File lib/yt/annotations/branding.rb, line 13 def ends_at_in(data) data['end_ms'] / 1000.0 end
text_in(data)
click to toggle source
# File lib/yt/annotations/branding.rb, line 9 def text_in(data) '' end
to_link(data, json)
click to toggle source
# File lib/yt/annotations/branding.rb, line 17 def to_link(data, json) return unless url = data.fetch('action', {})['url'] new_window = url['target'] != 'current' {url: url['value'], new_window: new_window, type: :channel} end