Configure WebRTC Authentication
Configure WebRTC Authentication
Watch a demonstration of the current section
- Inside of eclipse expand the folder example > src > main > webapp
-
open publisher.html and add the connectionParams object inside of publisher.init(…)
// Initialize publisher.init({ protocol: 'ws', host: 'localhost', port: 8081, app: 'example', streamName: 'mystream', iceServers: iceServers, tcpMuxPolicy: 'negotiate', connectionParams: {username: "testuser", password: "testpass"} })
-
open subscriber.html and add the connectionParams object inside of publisher.init(…)
// Initialize subscriber.init({ protocol: 'ws', host: 'localhost', port: 8081, app: 'example', streamName: 'mystream', iceServers: iceServers, subscriptionId: 'subscriber-' + Math.floor(Math.random() * 0x10000).toString(16), rtcpMuxPolicy: 'negotiate', connectionParams: {username: "testuser", password: "testpass"} })