webrtc_sendrecv.py: Use default arg for server URL

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1864>
This commit is contained in:
Nirbheek Chauhan 2022-03-01 23:53:32 +05:30 committed by GStreamer Marge Bot
parent f0e5c8e0f2
commit ee4ca699a0

View file

@ -42,7 +42,7 @@ class WebRTCClient:
self.pipe = None
self.webrtc = None
self.peer_id = peer_id
self.server = server or 'wss://webrtc.nirbheek.in:8443'
self.server = server
async def connect(self):
self.conn = await websockets.connect(self.server)
@ -190,7 +190,8 @@ if __name__ == '__main__':
sys.exit(1)
parser = argparse.ArgumentParser()
parser.add_argument('peerid', help='String ID of the peer to connect to')
parser.add_argument('--server', help='Signalling server to connect to, eg "wss://127.0.0.1:8443"')
parser.add_argument('--server', default='wss://webrtc.nirbheek.in:8443',
help='Signalling server to connect to, eg "wss://127.0.0.1:8443"')
args = parser.parse_args()
our_id = random.randrange(10, 10000)
c = WebRTCClient(our_id, args.peerid, args.server)