branch: externals/hyperbole
commit 4ffeaa75301cdebfcd7daef0583b0bea9e7d052c
Author: bw <[email protected]>
Commit: bw <[email protected]>
hsys-youtube-end-format - Fix so at least plays from start time
End time is no longer supported in URLs by YouTube.
---
ChangeLog | 4 ++++
hsys-youtube.el | 10 ++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7e6f1caf115..e847f03891c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2026-07-07 Bob Weiner <[email protected]>
+* hsys-youtube.el (hsys-youtube-end-format): YouTube no longer allows end
times or the
+ embed protocol in video urls, so update this format to at least jump to
the proper
+ start time. The end time is sent but ignored.
+
* hui-mouse.el (hkey-alist): Trigger 'hui-select-thing' or
'hui-select-mark-delimited-sexp'
if (point) >= any hbut end point, not just equal to it, as before. This
was causing
a failure to trigger when a HyWikiWord came right before a closing double
quote that
diff --git a/hsys-youtube.el b/hsys-youtube.el
index 78562dad1b0..e51a2720c10 100644
--- a/hsys-youtube.el
+++ b/hsys-youtube.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 10-Jul-22 at 18:10:56
-;; Last-Mod: 19-Jan-24 at 12:11:07 by Mats Lidell
+;; Last-Mod: 7-Jul-26 at 18:03:16 by Bob Weiner
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
@@ -59,9 +59,12 @@ where the time string is inserted. The time string must be a
colon-separated hours:minutes:seconds string, e.g. 1:2:44 (1 hour, two
minutes, 45 seconds), where the hours and minutes are optional.")
-(defvar hsys-youtube-end-format
"https://www.youtube.com/embed/%s?autoplay=1&start=%s&end=%s"
+ ;; Old format that used to work:
+ ;; "https://www.youtube.com/embed/%s?autoplay=1&start=%s&end=%s"
+(defvar hsys-youtube-end-format
"https://www.youtube.com/watch?v=%s&t=%s&end=%s"
"Format string used to play a section of a Youtube video.
-This requires use of the `embed' api.
+This requires use of the `embed' api (but YouTube has since disallowed
+this in urls, so stop end times no longer work).
The first %s is where the video id string is inserted; the second %s is
where the start time string in seconds is inserted; the third %s is
@@ -247,4 +250,3 @@ START-TIME-STRING format is invalid, return it unchanged."
(provide 'hsys-youtube)
;;; hsys-youtube.el ends here
-