mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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:
parent
f0e5c8e0f2
commit
ee4ca699a0
1 changed files with 3 additions and 2 deletions
|
@ -42,7 +42,7 @@ class WebRTCClient:
|
||||||
self.pipe = None
|
self.pipe = None
|
||||||
self.webrtc = None
|
self.webrtc = None
|
||||||
self.peer_id = peer_id
|
self.peer_id = peer_id
|
||||||
self.server = server or 'wss://webrtc.nirbheek.in:8443'
|
self.server = server
|
||||||
|
|
||||||
async def connect(self):
|
async def connect(self):
|
||||||
self.conn = await websockets.connect(self.server)
|
self.conn = await websockets.connect(self.server)
|
||||||
|
@ -190,7 +190,8 @@ if __name__ == '__main__':
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('peerid', help='String ID of the peer to connect to')
|
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()
|
args = parser.parse_args()
|
||||||
our_id = random.randrange(10, 10000)
|
our_id = random.randrange(10, 10000)
|
||||||
c = WebRTCClient(our_id, args.peerid, args.server)
|
c = WebRTCClient(our_id, args.peerid, args.server)
|
||||||
|
|
Loading…
Reference in a new issue