Skip to content

eface2face/iOSRTCApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

screenshot

NOTE: This project is not being actively maintained and it may not work with the latest version of the cordova-plugin-iosrtc or the latest server side code of the Google's AppRTC.

iOSRTCApp

Google's AppRTC adapted to Cordova iOS with pure HTML5/JavaScript and cordova-plugin-iosrtc.

This project takes the HTML5 version of the AppRTC application and runs it in Cordova iOS (iPhone, iPad...) by using the cordova-plugin-iosrtc to provide the WebRTC W3C JavaScript APIs.

Building & usage

  • Get the source code:
$ git clone https://github.com/eface2face/iOSRTCApp
$ cd iOSRTCApp
  • Install NPM dependencies:
$ npm install
  • Add both platforms. All the needed plugins are installed automatically because of being included in the "config.xml" file:
$ cordova platform add ios android
  • Run as usual:
$ cordova run android --device
$ cordova run ios --device

Changes to the original AppRTC HTML5 code

There are minor changes in the original HTML, JavaScript and CSS in order to make it work as a Cordova application. Those changes are:

  • js/apprtc.debug.js and js/appwindow.js are loaded once Cordova's ondeviceready event is fired. This is needed since js/apprtc.debug.js relies on existing window.webkitRTCPeerConnection and navigator.webkitGetUserMedia which are not set by the cordova-plugin-iosrtc until ondeviceready fires.
  • webrtcDetectedVersion global variable is hardcoded to 43 (AppRTC JavaScript code expects browser to be Chrome or Chromium, and fails otherwise).
  • In order to correctly place video views (iOS native UIView elements) the plugin refreshVideos() function is called when the local or remote video is set (this is because the CSS video elements use "transition" effects that modify their position and size during 1 second).
  • A new CSS file css/main_overrides.css changes the properties of video elements. For example, it sets opacity: 0.85 in #local-video and #remote-video so HTML call controls are shown even below the native UIView elements rendering the local and remote video.

Author

AppRTC code is owned by Google as stated in the original LICENSE file.

Changes to the original AppRTC HTML5 source code (to become a Cordova iOS application) are written by Iñaki Baz Castillo at eFace2Face, inc.

About

Google's AppRTC adapted to Cordova iOS with HTML5 and cordova-plugin-iosrtc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published