Ivy-YouTube is a simple plugin to query YouTube via emacs and play videos in your browser.
IMPORTANT: Remember to set your 'ivy-youtube-key' variable!
This package was based on Maximilian Roquemore's package called helm-youtube. Thanks Maximilian to create this awesome package.
The installation process is very simple:
M-x package-install: ivy-youtube
Obtain new google API key here
Credentials
->
Create Credentials
and select API Key
Library
, select
YouTube Data API
and click in Enable
button on top.IMPORTANT: Set 'ivy-youtube-key' variable
M-x customize-variable ;; search 'ivy-youtube-key'
Ivy Youtube Key: replace "NONE" with "API KEY" ;; FROM STEP 2
By default Ivy Youtube play the selected video in your default browser, but you can configure that:
Set browse-url-generic and add to .emacs
;;start ivy-youtube.el
(autoload 'ivy-youtube "ivy-youtube" nil t)
(global-set-key (kbd "C-c y") 'ivy-youtube) ;; bind hotkey
;;set default browser for you will use to play videos/default generic
(setq browse-url-browser-function 'browse-url-generic)
(setq browse-url-generic-program "google-chrome-open-url")
You can set a external player to watch your videos, like mpv
or
vlc
. To do that you need to set the custom varialble
ivy-youtube-play-at
: M-x customize-variable<RET>ivy-youtube-play-at<RET>
.
You can set in this field any binary that receives the youtube url as
parameter like: /usr/bin/mpv
or /usr/bin/vlc
.