ScreenShare is a simple screen sharing application between 2 desktop browsers through using WebRTC. It was created as a prototype for a component in the Integrated Classroom Hub (another prototype that has not been released to the public).
This project is referenced heavily from j0r1's page. Please see the refrences at the bottom of this document.
You can fork and run this project on Repl.it through this link.
Alternatively, you can use the commands below to clone this repo to run it locally from your computer.
git clone https://github.com/AzlanCoding/ScreenShare
cd ScreenShare
After cloning, you must:
- Ensure TCP Port 443 and all UDP Ports are allowed to pass through your devices firewall if you are planning to share your screen outside the laptop.
- Turn on the device Wifi Hotspot if you are planning to share your screen outside the laptop.
- Modify
main.py
. Change
app.run(host='0.0.0.0', port=81)
in line 115 to
app.run(host='192.168.137.1', port=443, ssl_context='adhoc')
where 192.168.137.1
is the IP address where your hotspot is running on.
Once completed, you can run the server using the command
python3 main.py
ScreenShare requires HTTPS to run, therefore the ad-hoc server is required to allow ScreenShare to run. Without HTTPS getDisplayMedia()
may not work.