johannest / webrtc

Simple Vaadin add-on for a WebRTC peer-to-peer webcam sharing
2 stars 3 forks source link

Add API for resizing video element of peer's and self's webcam #4

Closed johannest closed 7 years ago

Pasadena commented 7 years ago

So @johannest did you have something like this in mind:

  1. create custom js for making video-elements resizable by dragging the from corner with mouse
  2. add listener to each video-element on page that listens videoElementResized -events?
  3. expose videoElementResized - events to server side and provide way for add-on user to listen to them?
johannest commented 7 years ago

Better ask from the customer first: I suppose that it is not that important to be able to DnD resize videos

johannest commented 7 years ago

More like setting the size in the server-side like in normal Vaadin Components

Pasadena commented 7 years ago

Here's a sketch UI that is used with the add-on:

image

And comments from customer: [11/05/2017, 13.18.34] Andrey: In first prototype this is how webcam interface is going to look like [11/05/2017, 13.18.50] Andrey: the white box under "drawing pad" [11/05/2017, 13.19.04] Andrey: so at least half of the screen [11/05/2017, 13.19.20] Andrey: make the local cam small and remote cam big [11/05/2017, 13.19.38] Andrey: and buttons to swap cameras so the user can adjust his own webcam in bigger size and then switch back to thumbnail mode again

Pasadena commented 7 years ago

And here's example on how the webcams should be aligned:

image

Based on this and previous comment there might not be a need to have API for resizing of cameras. At least now it looks like that cams have static sizes and the sizes can be swapped with a button. What do you think @johannest?

Pasadena commented 7 years ago

@johannest ATM there's Java-API for setting the width of the self-camera / peer camera, and button that can be used to toggle the sizes. I also did some layouting so that the layout would match the provided sketch. I think this might be enough for this issue?

johannest commented 7 years ago

Sounds good. Yes, I suppose that should be enough!

johannest commented 7 years ago

Looks good!