jech / galene

The Galène videoconference server
https://galene.org
MIT License
900 stars 119 forks source link

frontend: add support for showing raised hand #125

Closed silbe closed 2 years ago

silbe commented 2 years ago

We were puzzled that the /raise / /unraise commands had no effect and figured out the frontend simply ignores the raisehand status. This MR adds support for showing the hand-paper symbol (looks like a raised hand) instead of the circle symbol in the user list whenever a user raises their hand.

Is there any test for the frontend code that I should adjust?

jech commented 2 years ago

Applied in 993d664, with a tweak to get proper typing. (In the future, please check your changes with Typescript.)

jech commented 2 years ago

Updated by 0b5e40bc7f67182fa1f0bf49398d5325df4ff190.

silbe commented 2 years ago

Thanks for fixing my mistake! How can I perform the Typescript check myself? If I just run tsc (from node-typescript in Debian Bullseye) from inside the static directory I get a whole bunch of errors:

galene.js:921:38 - error TS2339: Property 'captureStream' does not exist on type 'HTMLCanvasElement'.

921     this.captureStream = this.canvas.captureStream(0);
                                         ~~~~~~~~~~~~~

galene.js:1144:23 - error TS2339: Property 'contentHint' does not exist on type 'MediaStreamTrack'.

1144                     t.contentHint = 'detail';
                           ~~~~~~~~~~~

galene.js:1346:47 - error TS2339: Property 'getDisplayMedia' does not exist on type 'never'.

1346         stream = await navigator.mediaDevices.getDisplayMedia({video: true});
                                                   ~~~~~~~~~~~~~~~

galene.js:1799:39 - error TS2339: Property 'requestPictureInPicture' does not exist on type 'HTMLVideoElement'.

1799         if(HTMLVideoElement.prototype.requestPictureInPicture) {
                                           ~~~~~~~~~~~~~~~~~~~~~~~

galene.js:1802:26 - error TS2339: Property 'requestPictureInPicture' does not exist on type 'HTMLVideoElement'.

1802                 if(media.requestPictureInPicture) {
                              ~~~~~~~~~~~~~~~~~~~~~~~

galene.js:1803:27 - error TS2339: Property 'requestPictureInPicture' does not exist on type 'HTMLVideoElement'.

1803                     media.requestPictureInPicture();
                               ~~~~~~~~~~~~~~~~~~~~~~~

protocol.js:1223:18 - error TS2339: Property 'restartIce' does not exist on type 'never'.

1223             c.pc.restartIce();
                      ~~~~~~~~~~

Found 7 errors.
jech commented 2 years ago

What version of typescript ? Mine is

$ dpkg -s node-typescript | grep Version Version: 4.5.4+ds1-1

silbe commented 2 years ago

I was using 4.1.3-1 from Bullseye (current stable). 4.5.4+ds1-1 is from Bookworm (current testing) but is installable in Bullseye. With that version there are no errors, thanks!