Class: RETerm::Components::YouTube

Inherits:
CmdOutput show all
Defined in:
lib/reterm/components/youtube.rb

Overview

YouTube viewer, use cmds to render youtube to ascii:

youtube-dl <url>
mplayer -vo aa <file>    -or-
CACA_DRIVER=ncurses mplayer -vo caca <file>

Constant Summary

Constants included from LogHelpers

LogHelpers::LOG_FILE

Instance Attribute Summary

Attributes inherited from ScrollingArea

#lines, #title

Attributes inherited from RETerm::Component

#activatable, #activate_focus, #highlight_focus, #window

Instance Method Summary collapse

Methods inherited from CmdOutput

#finalize!, #running?, #start!, #sync!, #wait

Methods inherited from ScrollingArea

#<<, #activatable?, #requested_cols, #requested_rows

Methods included from RETerm::CDKComponent

#_component, #activatable?, #activate!, #bind_key, #cdk?, #colors=, #component, #deactivate!, #draw!, #early_exit?, #erase, #escape_hit?, #init?, #init_cdk, #normal_exit?, #strip_formatting, #title_attrib=, #value

Methods inherited from RETerm::Component

#activatable?, #activate!, #activate_focus?, #cdk?, #colored?, #colors=, #deactivate!, #deactivate?, #distance_from, #extra_padding, #finalize!, #highlight_focus?, #reactivate!, #requested_cols, #requested_rows, #resize, #sync!, #sync_getch

Methods included from KeyBindings

#bind_key, #invoke_key_bindings, #key_bindings, #key_bound?

Methods included from LogHelpers

#logger

Methods included from EventDispatcher

#dispatch, #handle

Constructor Details

#initialize(args = {}) ⇒ YouTube

Initialize the YouTube component

Parameters:

  • args (Hash) (defaults to: {})

    youtube params

Options Hash (args):

  • :url (String)

    url of the video to load



13
14
15
16
17
# File 'lib/reterm/components/youtube.rb', line 13

def initialize(args={})
  @url = args[:url]
  cmd = "..."
  super(args.merge(:cmd => cmd))
end