Subject: bug#51674: 29.0.50; [PATCH] Fix hang when displaying xwidget script dialog

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 08 Nov 2021 07:25:43 +0100

Po Lu <[email-masked]> writes:

> What I would do instead is to use `make-xwidget' to create an xwidget,
> and then to make it the display property of a piece of text, like one
> would an image spec.

Thanks; this works, sort of:

(progn
  (require 'xwidget)
  (setq widget (make-xwidget 'webkit
			     "Video"
			     700
			     500
			     nil
			     (current-buffer)
			     (xwidget-webkit-current-session)))
  (insert
   (propertize
    "[video]"
    'display (list 'xwidget :xwidget widget)))
  (xwidget-put widget 'callback #'always))

And then

(xwidget-webkit-goto-uri widget "file:///tmp/vid.html")

will play the .mp4 video...  but only on Macos.  On this Debian laptop,
it just shows the controls, and doesn't play the mp4.  Is this due to
platform specific limitations?  (It won't play Youtube, either, with the
normal `xwidget-webkit-browse-url'.)

But on Macos there's a different twist: It doesn't heed the width/height
specs, and always maximises itself to fill the frame.  Which seems like
a bug.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no