tobiasfl / tobias-master-thesis-webrtc

0 stars 0 forks source link

screen sharing using webrtc #4

Closed safiqul closed 6 months ago

safiqul commented 3 years ago

I know that you can use getUserMedia for screen sharing. However, is it also possible to use data channel for screen sharing. I think it's a good idea to use screen sharing using a data channel instead of sending a large dummy file. Could you please check what we can use here?

safiqul commented 3 years ago

check this: https://medium.com/@chris_82106/implementing-webrtc-screen-sharing-in-a-web-app-late-2016-51c1a2642e4

tobiasfl commented 3 years ago

Just so I get this right, the intention of this is for testing purposes so that we that we make sure the SCTP flow has some data to send but without a dummy file?

safiqul commented 3 years ago

the intention of this is not for testing purposes - a large dummy file would suffice in this case. For your thesis, it would be great to have a real test scenario :). Screen sharing is very common due to covid these days, ikke sant? :)

tobiasfl commented 3 years ago

Yeah, that makes more sense! :)

tobiasfl commented 3 years ago

I'd like to try to extend the webrtc-app you have made with this functionality. First I have to get the webrtc-app up and running though since there seems to be some outdated stuff. To run the server did you just use node server.js and then that somehow uses completeNodeClientWithDataChannel.js?

safiqul commented 3 years ago

I'd like to try to extend the webrtc-app you have made with this functionality. First I have to get the webrtc-app up and running though since there seems to be some outdated stuff. To run the server did you just use node server.js

yes, using node

and then that somehow uses `completeNodeClientWithDataChannel.js?

line 92 of the completeNodeClienWithDataChannel.js connects with the server. Your HTML page will use this script.

I used this book to write my simple app: http://subnets.ru/books/real-time-communication-with-webrtc-peer-to-peer-in-the-browser.pdf

safiqul commented 3 years ago

There are many better libraries nowadays. You probably won't have to design an app from scratch any more :)

tobiasfl commented 3 years ago

I think i'll try to find some examples/ libraries + bits and pieces from the one you made to get something up and running.

safiqul commented 3 years ago

good plan; sorry, my intention was not to suggest you to make a new one :).. We only need this app for testing purpose for now.

tobiasfl commented 3 years ago

No worries :)

tobiasfl commented 3 years ago

Is your app supposed to work out of the box on a single machine with two peers through the loopback interface or do I have to change something for that to work? If I remember correctly you have mentioned that you normally used two computers for testing things?

safiqul commented 3 years ago

should work; I did test with both. Just change the hardcoded server ip address with your local machine address/loopback int. address.

tobiasfl commented 3 years ago

Great! It seems like at least video still works without having to change any code.

safiqul commented 3 years ago

Cool; "data transfer" should also work!

tobiasfl commented 3 years ago

In the https://medium.com/@chris_82106/implementing-webrtc-screen-sharing-in-a-web-app-late-2016-51c1a2642e4 it seems they only explain thoroughly how to send screen sharing over the media channel. For sending over the data channel they briefly mention in the conclusion that to send over the data channel they made a "simplified transcoding method using images and send these over a dataChannel". It sounds like they basically take screenshots or something and send the images, should I try to achieve this as well?

safiqul commented 3 years ago

For task 1, let's use media channel for screen sharing.

For task 3, a large dummy file should be okay for now.