Skip to content

GreenIndustiralTrading/AppRTC-Kurento

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppRTC - Kurento

##About This project is a webrtc signaling server written in Java. All calls are beeing pipelined and recorded by Kurento Media Server to the configured directory.

##Features

  • signaling server written in Java which communicates via websockets to browser, Android and iOS webrtc peers
  • implements Kurento-Media-Server API.
  • records all calls on server (by default - one file per peer)
  • support widget (predefined support can be configured and called by web users)
  • screensharing support on firefox and chrome via chrome/firefox extension
  • iOS-native App (see github repository: AppRTC-iOS)
  • Android-native App (see github repository: AppRTC-Android)

##Documentation:

###Installation:

  1. Clone this repository to your workstation git clone https://github.com/<<repository-url>>.git
  2. Change into the 'jWebrtc' directory
    cd <<repository-dir>>/jWebrtc
  3. Create war file mvn package
  4. Deploy war file into your servlet container (e.g. JBoss, Tomcat, Glassfish)
  5. Configure environment variables of your servlet container. E.g. modify .profile in the home directory of the user who runs the servlet container. We configure the URL of the Kurento-Server (here on localhost), STUN-,TURN-Urls and TURN username and password. Use public IP since its used by the clients not by the server. export JAVA_OPTS="$JAVA_OPTS -Dkms.url=ws://localhost:8888/kurento -DSTUN_URL=stun:<<stun-ip>>:3478 -DTURN_USERNAME=<<turn-username>> -DTURN_PASSWORD=<<turn-password>> -DTURN_URL=turn:<<turn-ip>>:3478"
  6. configure your servlet container to use SSL if you wanto to use WebRTC outside of localhost (WebRTC only works with HTTPS!)
  7. Start Servlet Container and Test WebRTC in (e.g. go to: http://localhost/jWebrtc)
  8. Download, install and configure your Android-WebRTC App( (AppRTC-Android))
  9. Download, install and configure your iOS-WebRTC App (AppRTC-iOS)

##Configuration:

  1. Turn-Server:
    • config under: /etc/turnserver.conf
    • username/password for client auth
    • logs under /var/log
  2. Kurento-Server:
    • config under /etc/kurento/kurento.conf.json
    • configure modules/kurento/WebRtcEndpoint.conf.ini (stun and turn server)
    • configure modules/kurento/UriEndpoint.conf.ini defaultPath = file:///var/kurento/
    • logs under /var/log/kurento/
    • recorded webrtc video/audio under /var/kurento
  3. Tomcat
    • configure environment variables e.g. in .profile (stun/turn server for clients) export JAVA_OPTS="$JAVA_OPTS -Dkms.url=ws://localhost:8888/kurento -DSTUN_URL=stun:<<stun-public-ip>>:3478 -DTURN_USERNAME=<<turn-user>> -DTURN_PASSWORD=<<turn-password>> -DTURN_URL=turn:<<stun-public-ip>>:3478"

##Support-Widget for websites

  • connect and login with to webrtc with browser, android or ios e.g. with your user ''
  • install a support-widget.html on your favourite webserver e.g.
	<html>
		<head><title>Example Simple Support Widget v0.1</title>
			<script src="https://<<your-webrtc-server>>/jWebrtc/js/webrtcStatusWidget_simple_0.1.js"></script>
		</head>
		<body>
			 <h1>Example Simple WebRTC Support Widget</h1>
			 	<div 
			 		id="webrtc-online-status" 
			 		data-peer="<CustomerSupportUser>">
			    </div>
		</body>
	</html>
  • or connect to working example at: https://<>/jWebrtc/status.html

##Tests

  • Browser2Browser in local-LAN and to remote LANs
  • Browser2AndroidApp in local-LAN and to remote LANs
  • Browser2iOSApp in local-LAN and to remote LANs
  • Android2AndroidApp in local-LAN and to remote LANs
  • iOS2iOSApp in local-LAN and to remote LANs
  • iOS2AndroidApp in local-LAN and to remote LANs
  • STUN-Server Test (if clients are behind a firewall or in different networks)
  • TURN-Server Relay Test ???
  • Screensharing - Tests https://www.webrtc-experiment.com/getScreenId/ https://mozilla.github.io/webrtc-landing/gum_test.html

###Todo/Bugs

###Nice2Haves

  • Widget: When a web user is offline - try to wake up the user
  • allow both partys to transmit screen same time - (as an extension)
  • show splash for microphone, video, microphone permission
  • choose audio, video devices in browser https://webrtc.github.io/samples/src/content/devices/input-output/ https://webrtc.github.io/samples/
  • display message for non-webrtc-browser instead of displaying call buttons
  • display download webrtc-plugin for non-webrtc browsers like safari and internet explorer.
  • improve busy messages if somebody starts a call (or wants to call somebody)
  • error-message-improvents
    • if kurento connection cannot be established create better error message and send it to the client (which can see the detail)
  • widget
    • enable screen sharing button
    • switch kamera button (if more cameras are involved)
  • TURN over Port 80/443 for very restrictive corporate firewalls ("everything closed")
  • Recording
    • merge recorded videos with composite hub http://doc-kurento.readthedocs.io/en/stable/ mastering/kurento_API.html
    • Merge recorded videos of call participants into a split screen view
    • ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex '[0:v]pad=iw*2:ih[int];[int][1:v]overlay=W/2:0[vid]' -map [vid] -c:v libx264 -crf 23 -preset veryfast output.mp4 (http://superuser.com/a/537482)
  • Turn-Config
    • change Turn-Authentication with every appConfig call

###Bugs

  • (P1) Tomcat does not create nice session IDs for the websockts - use HTTP-SessionId? SecurityProblem?

###Done

About

AppRTC working with websockets and kurento (written in Java and Node.JS)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 40.7%
  • CSS 39.0%
  • Java 16.2%
  • HTML 4.0%
  • Shell 0.1%