PhoneRTC演示应用程序 [英] PhoneRTC demo application

查看:91
本文介绍了PhoneRTC演示应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试启动并运行PhoneRTC演示. https://github.com/alongubkin/phonertc/

I am Trying to get PhoneRTC demo up and running. https://github.com/alongubkin/phonertc/

我实际上有很多疑问

首先,我的理解是: 1.我们需要一台TURN服务器 2.我们需要一个信令服务器(repo中的演示/服务器) 3.我们需要一个cordova项目,该项目将使用phoneRTC项目(回购中的demo/client)

First of all, my understanding: 1. We need a TURN server 2. We need a signaling Server (demo/server in repo) 3. We need a cordova project which will use phoneRTC project (demo/client in repo)

  1. 启动了AWS实例,并为其分配了动态DNS. 安装了TURN服务器并启动了它-但是现在我对教程中提到的私有ip和公共ip部分感到困惑,因为每次重启实例时我的ip都会改变.我有一个DNS名称(来自noip),它将坚持下去.所以我正在探索如何使用它来设置TURN服务器

  1. started AWS instance, assigned a dynamic DNS. installed TURN server and started it - but now I'm confused over private ip and public ip part mentioned in tutorial as my ip changes every time I restart the instance. I have one dns name (from noip) which will stick to it. So I'm exploring on how to set TURN server with that

我签出了源代码,并按照npm install cordva等步骤进行操作,

I checked out the source code and followed the npm install cordva etc steps,

对于Signaling服务器,我导航至源代码中的demo/server,并在npm安装后尝试使用node index.js,但未找到有关模块的一些错误.

For Signaling server, I navigated to demo/server in the source code and tried node index.js after npm install, but got several errors regarding the module not found.

demo/client也是一个nodeJS项目,对吗?如果我启动并运行它,那就是视频聊天,对吧?

demo/client is also a nodeJS project, right ? If i get it up and running, that is the video chat, right ?

推荐答案

Amazon提供了弹性IPs 允许您为EC2主机设置永久IP地址.

Amazon provides Elastic IPs which allow you to make permanent IP addresses for your EC2 hosts.

以下是从头开始运行演示所需的全部命令:

Here are the full commands required to run the demo from scratch:

# install global dependencies
npm install -g cordova bower grunt-cli

# clone phonertc
git clone https://github.com/alongubkin/phonertc.git

# build client
cd demo/client
npm install
bower install

cordova plugin add org.apache.cordova.device
cordova plugin add org.apache.cordova.console
cordova plugin add https://github.com/alongubkin/phonertc.git

# follow the instructions for iOS after running this command
cordova platform add ios android  

# before running the next command, make sure to
# change your server details in demo/client/app/scripts/signaling.js 
# and in demo/client/app/scripts/CallCtrl.js 
grunt build --force

# build server
cd ../server
npm install

要运行服务器:

cd demo/server
node index.js

要在Android上运行客户端,请执行以下操作:

To run the client on Android:

cordova run android

要在iOS上运行客户端,请运行:

To run the client on iOS run:

cordova build ios

然后在真实的iOS设备上通过Xcode运行项目.

And run the project from Xcode on a real iOS device.

这篇关于PhoneRTC演示应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆