Compare commits
2 Commits
fb236d6825
...
566c64f8d9
Author | SHA1 | Date | |
---|---|---|---|
566c64f8d9 | |||
38502a12a5 |
56
README.org
56
README.org
@ -2954,15 +2954,17 @@ See `org-link-parameters' for details about PATH, DESC and FORMAT."
|
|||||||
:CUSTOM_ID: sec:make-org-yt-link-type
|
:CUSTOM_ID: sec:make-org-yt-link-type
|
||||||
:END:
|
:END:
|
||||||
|
|
||||||
Listing [[lst:define-org-yt-link-type][define org-yt-link type]] implements code to open the link to the
|
Listing [[lst:define-org-yt-link-type]] implements code to open the link to the
|
||||||
following YouTube video [[yt:eaZUZCzaIgw][Extending org-mode to handle YouTube links]] using the
|
following YouTube video [[yt:eaZUZCzaIgw][Extending org-mode to handle YouTube links]] modifying
|
||||||
following [[https://raw.githubusercontent.com/bitspook/spookmax.d/master/readme.org][Emacs setup]]. Note: Listing [[lst:define-org-yt-link-type][define org-yt-link type]] does only
|
code from the following [[https://raw.githubusercontent.com/bitspook/spookmax.d/master/readme.org][Emacs setup]].
|
||||||
implement normal =html= links, but no embedded =html= frames.
|
|
||||||
|
|
||||||
Opening [[yt:eaZUZCzaIgw][Extending org-mode to handle YouTube links]] may fail due to a bug in the
|
Opening [[yt:eaZUZCzaIgw][Extending org-mode to handle YouTube links]] may fail due to an old
|
||||||
interface between =mpv= and =yt-dlp=. Listing [[lst:set-emms-options][set EMMS options]] indicates how to
|
(fixed) bug in =mpv=. However, the link [[yt:48JlgiBpw_I][Absolute Beginner's Guide to Emacs]]
|
||||||
work around this bug at the cost of making the user interface less clean.
|
works always.
|
||||||
However, the link [[yt:48JlgiBpw_I][Absolute Beginner's Guide to Emacs]] works always.
|
|
||||||
|
NOTE: Listing [[lst:define-org-yt-link-type][define org-yt-link type]] does only implement normal =html= links
|
||||||
|
instead of embedded video links, but listing [[lst:howto-embed-yt]] shows a working
|
||||||
|
=html= example of how to embed a YouTube video in an inline frame element.
|
||||||
|
|
||||||
#+caption[Define an =org-link= type for =YouTube=]:
|
#+caption[Define an =org-link= type for =YouTube=]:
|
||||||
#+caption: Define an =org-link= type for =YouTube=.
|
#+caption: Define an =org-link= type for =YouTube=.
|
||||||
@ -3001,6 +3003,26 @@ However, the link [[yt:48JlgiBpw_I][Absolute Beginner's Guide to Emacs]] works a
|
|||||||
"yt" :follow #'org-yt-emms-open :export #'org-yt-export)))
|
"yt" :follow #'org-yt-emms-open :export #'org-yt-export)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+caption[How to embed a =YouTube= video in =HTML=]:
|
||||||
|
#+caption: How to embed a =YouTube= video in =HTML=.
|
||||||
|
#+name: lst:howto-embed-yt
|
||||||
|
#+begin_src html -n :exports code :tangle yegge.html
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>ChatGPT: How to embed a YouTube video in HTML</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Steve Yegge embedded YouTube video</h1>
|
||||||
|
<iframe width="630" height="420"
|
||||||
|
src="https://www.youtube.com/embed/lkIicfzPBys"
|
||||||
|
allowfullscreen></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** [[https://tecosaur.github.io/emacs-config/#translate-capital-keywords][Translate capital keywords (old) to lower case (new)]]
|
*** [[https://tecosaur.github.io/emacs-config/#translate-capital-keywords][Translate capital keywords (old) to lower case (new)]]
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:CUSTOM_ID: sec:convert-upper-to-lower-case-keywords
|
:CUSTOM_ID: sec:convert-upper-to-lower-case-keywords
|
||||||
@ -6065,25 +6087,17 @@ for ~mpv~ while eliminating use of ~mpd~.
|
|||||||
#+begin_src emacs-lisp -n :results silent
|
#+begin_src emacs-lisp -n :results silent
|
||||||
(when (ensure-package-installation 'emms)
|
(when (ensure-package-installation 'emms)
|
||||||
(with-eval-after-load 'emms
|
(with-eval-after-load 'emms
|
||||||
(emms-all)
|
(emms-all) ;; Restrict now to `emms-player-mpd' use only.
|
||||||
;; Since `emms-all' may add `emms-player-mpd' to `emms-player-list',
|
|
||||||
;; get rid off `emms-player-mpd' after calling `emms-all'.
|
|
||||||
(setopt emms-player-list '(emms-player-mpv)))
|
(setopt emms-player-list '(emms-player-mpv)))
|
||||||
|
|
||||||
(with-eval-after-load 'emms-mode-line
|
(with-eval-after-load 'emms-mode-line
|
||||||
(setopt emms-mode-line-format ""))
|
(setopt emms-mode-line-format ""))
|
||||||
|
|
||||||
(with-eval-after-load 'emms-player-mpv
|
(with-eval-after-load 'emms-player-mpv
|
||||||
(setopt emms-player-mpv-update-metadata t)
|
(setopt emms-player-mpv-update-metadata t
|
||||||
;; Uncomment the next two lines in case of too many broken YouTube links:
|
emms-player-mpv-parameters
|
||||||
(add-to-list 'emms-player-mpv-parameters "--ytdl-format=best" 'append)
|
(append emms-player-mpv-parameters
|
||||||
(add-to-list 'emms-player-mpv-parameters "--config=no" 'append)
|
'("--ytdl-format=best" "--config=no" "--fullscreen"))))
|
||||||
;; The two previous lines may make the setup less user friendly.
|
|
||||||
(add-to-list 'emms-player-mpv-parameters "--fullscreen" 'append))
|
|
||||||
|
|
||||||
(with-eval-after-load 'emms-playing-time
|
(with-eval-after-load 'emms-playing-time
|
||||||
(setopt emms-playing-time-display-format " %s "))
|
(setopt emms-playing-time-display-format " %s "))
|
||||||
|
|
||||||
(with-eval-after-load 'emms-streams
|
(with-eval-after-load 'emms-streams
|
||||||
(setopt emms-streams-file
|
(setopt emms-streams-file
|
||||||
(no-littering-expand-etc-file-name "emms/streams.emms"))))
|
(no-littering-expand-etc-file-name "emms/streams.emms"))))
|
||||||
|
Loading…
Reference in New Issue
Block a user