GithubHelp home page GithubHelp logo

flutter-webrtc / flutter-webrtc-server Goto Github PK

View Code? Open in Web Editor NEW
724.0 39.0 303.0 5.8 MB

A simple WebRTC signaling server for flutter-webrtc.

License: MIT License

JavaScript 23.75% HTML 0.75% Makefile 2.82% Go 72.67%
webrtc flutter turn golang webrtc-signaling-server

flutter-webrtc-server's Introduction

flutter-webrtc-server

slack

A simple WebRTC Signaling server for flutter-webrtc and html5.

Online Demo: https://demo.cloudwebrtc.com:8086/

Features

Usage

Run from source

  • Clone the repository.
git clone https://github.com/flutter-webrtc/flutter-webrtc-server.git
cd flutter-webrtc-server
  • Use mkcert to create a self-signed certificate.
brew update
brew install mkcert
mkcert -key-file configs/certs/key.pem -cert-file configs/certs/cert.pem  localhost 127.0.0.1 ::1 0.0.0.0
  • Run
brew install golang
go run cmd/server/main.go

Note

If you need to use it in a production environment, you need more testing.

screenshots

iOS/Android

PC/HTML5

flutter-webrtc-server's People

Contributors

cloudwebrtc avatar gene-dana avatar jeesang7 avatar kangshaojun avatar renovate-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-webrtc-server's Issues

Configs path error

Getting the following Error:

�[90m2020-05-26T12:15:44-04:00�[0m �[1m�[31mERR�[0m�[0m Fail to read file: open configs/config.ini: The system cannot find the path specified.

How can I send text between peers ?

Hello,

I have two peers on ios and Android. Video and audio work fine using flutter-webrtc-server as signaling server and a TURN server.
Now, I want to send data from peer 1 to peer 2. The data is a simple int, sent every second in order to synchronise counters.
I try to send data using _socket.send(_encoder.convert(request)); (Signaling.dart), but if the type is not known ("peers", "offer", ...), but the signaling server blocks my message (Unknown type). It would have been a good solution...

Do you have any idea to send simple text message to another peer, or to a room, I don't care if other peers can read the messages !

Thanks,
Luc

Not managed to test using connected iPhone with ngrok

Hi,

I tested using iPhone simulator and I entered localhost as server address for P2P Call Sample. I managed to get connected to the server and can establish video call (no visual from simulator though but visual from webapp works). So I tried using connected iPhone to test the visual, and entered the ngrok host name to tunnel localhost:8086, I can't get connected to the server. Anyone has solution for this?

如何让客户端不用开4442, 4443端口?

在NGINX中,想把端口4443集成到443中,不想让客户端再开4442,4443

upstream webrtcServer {
    server 0.0.0.0:8086;
}
upstream webrtcWSS {
    server 0.0.0.0:4443;
}
server {
    listen 443 ssl;
    server_name webrtc.touroad.cn;
    index index.html index.htm index.php;
    ssl on;
    ssl_certificate /home/ssl/webrtc.touroad.cn.pem;
    ssl_certificate_key /home/ssl/webrtc.touroad.cn.key;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    gzip_min_length 1k;
    gzip_comp_level 2;
    gzip_types text/plain text/css application/xml image/jpeg image/gif image/png image/jpg text/javascript application/javascript;

    location / {
        if ( $http_sec_websocket_protocol = "" ) {
            proxy_pass https://webrtcServer;
        }
        if ( $http_sec_websocket_protocol != "" ) {
            proxy_pass https://webrtcWSS;
        }
        proxy_redirect off;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

我测试了这样的配置,不成功,请问有办法吗?
谢谢

Why does this not work over the internet?

Hi! Thanks for what looks like the start of a great library.

Do you know why it doesn't work over the internet? Even with appropriate STUN/TURN servers?

(I notice you say it only works on local LAN)

can't connect if use mobile data (but use wifi works)

i try build webrtc demo (android version) and try to connect demo.cloudwebrtc.com as server
if using connection from wifi is works can share video and sound
but if i change to mobile connection cant share video or sound

fyi
using wifi or mobile can access list device

What next ?

Sorry, i am beginner. I got server on 0.0.0.0:8086, what i should do if i want start call video in local network ?

Failed to build on ubuntu 18.08 with latest node/NPM installed

~/webrtc$ git clone https://github.com/cloudwebrtc/flutter-webrtc-server.git
Cloning into 'flutter-webrtc-server'...
remote: Counting objects: 194, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 194 (delta 1), reused 3 (delta 1), pack-reused 189
Receiving objects: 100% (194/194), 2.61 MiB | 4.72 MiB/s, done.
Resolving deltas: 100% (95/95), done.
stream@bayradio:/webrtc$ ls
flutter-webrtc-server
stream@bayradio:
/webrtc$ cd flutter-webrtc-server
stream@bayradio:/webrtc/flutter-webrtc-server$ ls
LICENSE certs screenshots src
README.md package.json server webpack.config.js
stream@bayradio:
/webrtc/flutter-webrtc-server$ npm install
npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
extract:mamacro → gunzTar ▐ ╢██████████████████████████████████░░░░░░░░░░░░░░░╟
Killed
stream@bayradio:~/webrtc/flutter-webrtc-server$ npm install
npm WARN deprecated [email protected]: 🙌 Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!
npm WARN deprecated [email protected]: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
extract → gentlyRm ▀ ╢██████████████████████████████████░░░░░░░░░░░░░░░╟

请教下,服务器启动了,没达到预期效果

用了二级域名指向,服务器启动后,在浏览器中访问,列表内容为空

用flutter-webrtc-demo app,输入我的服务器域名,列表中的内容为空。
在APP中,输入 demo.cloudwebrtc.com,列表中是有内容。

请问,哪里没弄对?

我是按照说明来的。
Clone the repository, run npm install.
Run npm start and open https://your_sever_ip_or_domain:8086 to use html5 demo.

Getting rid of built-in turn server

I only want to use signaling part of the package. How can I get rid of built-in ones? Can you suggest me some documentation to create my own signaling server with different language?

expiry for temp user

just wondering, with the rest api, what is the default expiry for the temp user, i have try to look through the codes, but couldn't figure what is set, any help would be awesome

thank you

Unable to establish the video connection on local network.

Hi, i am doing this on local network i.e., without internet.
I updated the all iceServers to [].

After npm start, I can establish an audio connection i.e., just like phone call.
However, if I try to establish a video connection, the screen was black and iceConnectionState is failed.

After testing, I can establish a video connection but it is abnormal.
The procedures:

  1. Establish an audio connection
  2. Disconnect the audio connection
  3. establish a video connection successfully.

P2P Call Sample

Hello @cloudwebrtc ,
I am trying to establish a video call between the mobile application using the given demo (https://github.com/cloudwebrtc/flutter-webrtc-demo) and a PC web browser using server demo (https://github.com/cloudwebrtc/flutter-webrtc-server). There isn't any issue when I try to establish the connection from the emulator's browser, but as I said my goal is to reach out from the flutter mobile app demo.
I read the previous issues, in one of which there was mentioned the iceServers[], but still couldn't understand how and what do I exactly need to change. I tried to replace here in {"url": "stun:stun.l.google.com:19302"} the (stun:stun.l.google.com:19302) part with the localhost ip address (192.x.x.x) + the port (8086). Maybe I've done it wrong I don't know and that's why I am raising this topic here ?
Thanks in advance!

uncaught exception: Object

when i try to initiate a video call using the web view it does nothing and console shows uncaught exception: Object onclick, audio is working fine, like last year this was OK until now. please help

Only Navbar visible

Hi. I managed to compile using npm start. However, when i visited the page https://localhost:8086/, i only see a blue navbar and nothing else. On the left side of the url, it just indicates 'Not Secure'. What should I do to get it working? btw, i using a chrome browser on macos. thanks

Issue in windows. Port 8086 can't be reached.

> [email protected] start C:\html\webrtc
> npm-run-all --parallel run-server run-webpack-dev-server


> [email protected] run-server C:\html\webrtc
> node server/index.js


> [email protected] run-webpack-dev-server C:\html\webrtc
> webpack-dev-server --mode development --https --cert ./certs/cert.pem --key ./certs/key.pem --hot --inline --progress --colors --watch --compress --content-base ./dist  --port 8086 --host 0.0.0.0 --open

Start WS Server: bind => ws://0.0.0.0:4442
Start WSS Server: bind => wss://0.0.0.0:4443
 10% building 1/1 modules 0 activei 「wds」: Project is running at https://0.0.0.0:8086/
i 「wds」: webpack output is served from /
i 「wds」: Content not from webpack is served from C:\html\webrtc\dist
i 「wdm」: Hash: 80195648e4df421d78f4
Version: webpack 4.35.3
Time: 4509ms
Built at: 07/10/2019 4:00:03 PM
                      Asset       Size  Chunks             Chunk Names
               ./index.html  234 bytes          [emitted]
    main.80195648.bundle.js   2.01 MiB    main  [emitted]  main
main.80195648.bundle.js.map   2.17 MiB    main  [emitted]  main
Entrypoint main = main.80195648.bundle.js main.80195648.bundle.js.map
[0] multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js 52 bytes {main} [built]
[./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
[./node_modules/react/index.js] 190 bytes {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/webpack-dev-server/client/index.js?https://0.0.0.0:8086] (webpack)-dev-server/client?https://0.0.0.0:8086 4.29 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.77 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
[./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.63 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.59 KiB {main} [built]
[./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 75 bytes {main} [built]
[./src/index.js] 166 bytes {main} [built]
    + 331 hidden modules
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = ./index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 370 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 528 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
i 「wdm」: Compiled successfully.

Tested on different machine on windows got same results. But on linux it works fine.

Can't see the users connected to localhost

Hello,
I'm trying to set up the server and I ran into some problems.
I successfully started the project with "npm start" but when I connect to https://0.0.0.0:8086 nothing happens. I can see the blue bar but that's it. I tried connecting in the same time with Mozilla, Chrome and an Android phone and none update.
After this I tried deploying it on heroku but it fails. You can see it here.
I have a turn server because now I'm rewrtiting my application and I had another signaling server before but I'm not sure how to make this work. Please help me! Thank you! ^_^

How to send Dtmf ?

How can I send dtmf tones with this package. I see there is RTCDTMFSender class in package but it is empty. any solution for this?

How to deploy on production

Hi, how can we deploy the server on production, I see that the turn server is already included in this.
Is there a separate Turn server required to deploy.
If yes, where should the configuration of the same be updated.
If no, where should the ip of live server be updated.
Thanks in advance.

about server setup?

How can I edit the ... /config/config.ini file and put it on the server?
can you also explain how to put this project on the server and run it?

Unable to open one way connection

Hi i updated createOffer function in Signaling.js to pc.createOffer({offerToReceiveVideo: true}) but im unable to see anything in stream on my browser in remoteView

建议修改如下:

1、nginx.conf中,增加/wss二级目录,配置参考如下:

upstream webrtcServer {
server 0.0.0.0:8086;
}
upstream webrtcWSS {
server 0.0.0.0:4443;
}

server {
listen 443 ssl;
server_name webrtc.touroad.cn;
index index.html index.htm index.php;
ssl on;
ssl_certificate /home/ssl/x.xxx.cn.pem;
ssl_certificate_key /home/ssl/x.xxx.cn.key;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

gzip_min_length 1k;
gzip_comp_level 2;
gzip_types text/plain text/css application/xml image/jpeg image/gif image/png image/jpg text/javascript application/javascript;

location / {
    proxy_pass https://webrtcServer;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}
location /wss {
    proxy_pass https://webrtcWSS;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
}

}

2、flutter-webrtc-server/src/App.js
第79行,修改为

var url = 'wss://' + window.location.hostname + '/wss';

3、flutter-webrtc-demo/lib/src/call_sample/call_sample.dart
第53行,修改为

  _signaling = new Signaling('wss://' + serverIP + '/wss', _displayName)

4、flutter-webrtc-demo/lib/src/call_sample/data_channel_sample.dart
第48行,修改为

  _signaling = new Signaling('wss://' + serverIP + '/wss', _displayName)

这样,客户端就可以不用开4442,4443端口。
通过 wss://x.xxx.cn/ww 就可以访问 wss
供参考。

另外,请教下,有windows版本的客户端demo吗?

Auth

How i can make simple Auth solution over this server? or where i can check token for example? Thank you!

build error on ubuntu

When I run make I get this error

CGO_ENABLE=0 GOOS=linux GOARCH=amd64 go build -o bin/server-linux-amd64 -ldflags "-s -w" cmd/server/main.go
build command-line-arguments: cannot load golang_org/x/crypto/chacha20poly1305: malformed module path "golang_org/x/crypto/chacha20poly1305": missing dot in first path element
Makefile:15: recipe for target 'linux' failed
make: *** [linux] Error 1

Go version: go version go1.13.4 linux/amd64

This site can’t be reached

I have created server in aws.
and i have setup that project and
than start npm,

also got compile success (see below log):
but when i am going to start to connect with webrtc using http://52.66.250.53:4443/ws
but can't get connection. can you help me what i have to do?
even it can't be open in html page in using http://52.66.250.53:8086

--------------------------------------- Server Log ----------------------------------------
ubuntu@ip-172-31-13-9:~/flutter-webrtc-server$ npm start

[email protected] start /home/ubuntu/flutter-webrtc-server
npm-run-all --parallel run-server run-webpack-dev-server

[email protected] run-server /home/ubuntu/flutter-webrtc-server
node server/index.js

[email protected] run-webpack-dev-server /home/ubuntu/flutter-webrtc-server
webpack-dev-server --mode development --https --cert ./certs/cert.pem --key ./certs/key.pem --hot --inline --progress --colors --watch --compress --content-base ./dist --port 8086 --host 0.0.0.0 --open

Start WS Server: bind => ws://0.0.0.0:4442
Start WSS Server: bind => wss://0.0.0.0:4443
10% building 1/1 modules 0 activeℹ 「wds」: Project is running at https://0.0.0.0:8086/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /home/ubuntu/flutter-webrtc-server/dist
ℹ 「wdm」: Hash: d3d1792c4c5825caa6a1
Version: webpack 4.41.5
Time: 5799ms
Built at: 01/08/2020 1:26:07 PM
Asset Size Chunks Chunk Names
./index.html 234 bytes [emitted]
main.d3d1792c.bundle.js 2.19 MiB main [emitted] [immutable] main
main.d3d1792c.bundle.js.map 2.4 MiB main [emitted] [dev] main
Entrypoint main = main.d3d1792c.bundle.js main.d3d1792c.bundle.js.map
[0] multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js 52 bytes {main} [built]
[./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
[./node_modules/react/index.js] 190 bytes {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/webpack-dev-server/client/index.js?https://0.0.0.0:8086] (webpack)-dev-server/client?https://0.0.0.0:8086 4.29 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.51 KiB {main} [built]
[./node_modules/webpack-dev-server/client/socket.js] (webpack)-dev-server/client/socket.js 1.53 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/createSocketUrl.js] (webpack)-dev-server/client/utils/createSocketUrl.js 2.91 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/log.js] (webpack)-dev-server/client/utils/log.js 964 bytes {main} [built]
[./node_modules/webpack-dev-server/client/utils/reloadApp.js] (webpack)-dev-server/client/utils/reloadApp.js 1.59 KiB {main} [built]
[./node_modules/webpack-dev-server/client/utils/sendMessage.js] (webpack)-dev-server/client/utils/sendMessage.js 402 bytes {main} [built]
[./node_modules/webpack/hot sync ^./log$] (webpack)/hot sync nonrecursive ^./log$ 170 bytes {main} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.59 KiB {main} [built]
[./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 75 bytes {main} [built]
[./src/index.js] 166 bytes {main} [built]
+ 330 hidden modules
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = ./index.html
[./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 370 bytes {0} [built]
[./node_modules/lodash/lodash.js] 528 KiB {0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
ℹ 「wdm」: Compiled successfully.

Flutter App Demo server not working 0.0.0.0

Hello guys. Im trying to connect to the webrtc server with this wss://0.0.0.0:4443 but I can't connect. I tried this wss://demo.cloudwebrtc.com:4443 and it works but the webrtc running on the node can;t connect to the demo app on mobile. can you help me with this one? i'm new with web rtc stuffs

Rewrite the flutter webrtc server using golang.

  • Use flutter web instead of React.js.
  • Support the built-in turn/stun server uses pion/webrtc stack.
  • More demos, such as multi-party video conference, live broadcast, etc.
  • Add cross-platform server binaries.

Have other ideas? Please leave a comment below

Demo fails

I've followed the instructions to run the demo. After installing, I run "npm start" which seems to succeed, but then fails. Full output is below.

flutter-webrtc-server $ npm install
npm WARN deprecated [email protected]: 🙌  Thanks for using Babel: we recommend using babel-preset-env now: please read babeljs.io/env to update!

> [email protected] install /Users/Sites/webrtc/flutter-webrtc-server/node_modules/fsevents
> node install

[fsevents] Success: "/Users/Sites/webrtc/flutter-webrtc-server/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node" is installed via remote

> [email protected] postinstall /Users/Sites/webrtc/flutter-webrtc-server/node_modules/jss
> node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"

Love JSS? You can now support us on open collective:
 > https://opencollective.com/jss/donate
npm notice created a lockfile as package-lock.json. You should commit this file.
added 1137 packages in 87.457s
flutter-webrtc-server $ npm start

> [email protected] start /Users/Sites/webrtc/flutter-webrtc-server
> npm-run-all --parallel run-server run-webpack-dev-server


> [email protected] run-server /Users/Sites/webrtc/flutter-webrtc-server
> node server/index.js


> [email protected] run-webpack-dev-server /Users/Sites/webrtc/flutter-webrtc-server
> webpack-dev-server --mode development --https --cert ./certs/cert.pem --key ./certs/key.pem --hot --inline --progress --colors --watch --compress --content-base ./dist  --port 8086 --host 0.0.0.0

Start WS Server: bind => ws://0.0.0.0:4442
Start WSS Server: bind => wss://0.0.0.0:4443
 10% building modules 1/1 modules 0 activeℹ 「wds」: Project is running at https://0.0.0.0:8086/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from /Users/Sites/webrtc/flutter-webrtc-server/dist
✖ 「wdm」: Hash: 20c9379ed53a3fe1c1ae
Version: webpack 4.17.1
Time: 3838ms
Built at: 22/08/2018 18:02:05
 1 asset
Entrypoint main = main.20c9379e.bundle.js
[./node_modules/loglevel/lib/loglevel.js] 7.68 KiB {main} [built]
[./node_modules/react-dom/index.js] 1.33 KiB {main} [built]
[./node_modules/react/index.js] 190 bytes {main} [built]
[./node_modules/strip-ansi/index.js] 161 bytes {main} [built]
[./node_modules/url/url.js] 22.8 KiB {main} [built]
[./node_modules/webpack-dev-server/client/index.js?https://0.0.0.0:8086] (webpack)-dev-server/client?https://0.0.0.0:8086 7.78 KiB {main} [built]
[./node_modules/webpack-dev-server/client/overlay.js] (webpack)-dev-server/client/overlay.js 3.58 KiB {main} [built]
[./node_modules/webpack/hot sync ^\.\/log$] (webpack)/hot sync nonrecursive ^\.\/log$ 170 bytes {main} [built]
[0] multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js 52 bytes {main} [built]
[./node_modules/webpack/hot/dev-server.js] (webpack)/hot/dev-server.js 1.61 KiB {main} [built]
[./node_modules/webpack/hot/emitter.js] (webpack)/hot/emitter.js 75 bytes {main} [built]
[./node_modules/webpack/hot/log-apply-result.js] (webpack)/hot/log-apply-result.js 1.27 KiB {main} [built]
[./node_modules/webpack/hot/log.js] (webpack)/hot/log.js 1.11 KiB {main} [built]
[./src/App.js] 13.1 KiB {main} [built]
[./src/index.js] 466 bytes {main} [built]
    + 328 hidden modules

ERROR in ./node_modules/@material-ui/icons/Menu.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/Menu.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/Videocam.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/Videocam.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/Call.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/Call.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/CallEnd.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/CallEnd.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/VideocamOff.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/VideocamOff.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/Mic.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/Mic.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/MicOff.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons'
 @ ./node_modules/@material-ui/icons/MicOff.js 3:29-92
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js

ERROR in ./node_modules/@material-ui/icons/utils/createSvgIcon.js
Module not found: Error: Can't resolve '@babel/runtime/helpers/builtin/interopRequireDefault' in '/Users/Sites/webrtc/flutter-webrtc-server/node_modules/@material-ui/icons/utils'
 @ ./node_modules/@material-ui/icons/utils/createSvgIcon.js 3:29-92
 @ ./node_modules/@material-ui/icons/Menu.js
 @ ./src/App.js
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?https://0.0.0.0:8086 (webpack)/hot/dev-server.js ./src/index.js
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = ./index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html] 370 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 527 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 489 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {0} [built]
ℹ 「wdm」: Failed to compile.

Some cases are not working.

I have tested the flowing cases:

  • Web browser (Chrome):
    . Linux to Android: OK
    . Linux to MacOS: Fail
    . Android to Linux: Fail
    . Android to MacOS: Fail
    . iOS: Fail - just show top bar
    . MacOS to all cases:

Uncaught (in promise) DOMException
Promise.then (async)
Signaling._this.invite @ Signaling.js:152
App._this.handleInvitePeer @ App.js:119
onClick @ App.js:197
callCallback @ react-dom.development.js:149
invokeGuardedCallbackDev @ react-dom.development.js:199
invokeGuardedCallback @ react-dom.development.js:256
invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:270
executeDispatch @ react-dom.development.js:561
executeDispatchesInOrder @ react-dom.development.js:583
executeDispatchesAndRelease @ react-dom.development.js:680
executeDispatchesAndReleaseTopLevel @ react-dom.development.js:688
forEachAccumulated @ react-dom.development.js:662
runEventsInBatch @ react-dom.development.js:816
runExtractedEventsInBatch @ react-dom.development.js:824
handleTopLevel @ react-dom.development.js:4826
batchedUpdates$1 @ react-dom.development.js:20439
batchedUpdates @ react-dom.development.js:2151
dispatchEvent @ react-dom.development.js:4905
(anonymous) @ react-dom.development.js:20490
unstable_runWithPriority @ scheduler.development.js:255
interactiveUpdates$1 @ react-dom.development.js:20489
interactiveUpdates @ react-dom.development.js:2170
dispatchInteractiveEvent @ react-dom.development.js:4882

  • Mobile app:
    . Android to iOS: OK
    . iOS to Android: OK

  • Mobile with Web Browser:
    . Mobile to web browser (Desktop): Fail
    . Web browser (Desktop) - Mobile: Ok
    . Mobile browser to Mobile: Ok
    . Mobile to mobile browser: Ok

Technology used for this server project

Many thanks for which you created a project for peer to peer call. I am an android/flutter developer and I would like to use this flutter project inside my project but I dont know how to use this server project so that I can check the flutter demo, Can you tell me which languge the server project is written? Which IDE I have to use to open this server project? Any help will be much appreciated

How to config nginx default file.

I've created ssl connection succesfully, but currently websocket connection is not working.
just googled and knew that it has problem in nginx config.

is there standard config method for nginx?
I'm using AWS EC2 Ubuntu 18.04 instance.

Doc should say to open port 4442

Thank you for the project.

Though port 4442 is in the code, either your readme file here or on the flutter client should clearly say to open port 4442 in order for flutter clients to connect. It helps people to run a quick test.

Also, is it just me or firefox on Ubuntu cannot connect to the server, only chrome does?

Thanks.

hello, production some program

i use this project from production , all is well!
but i find in public network video call can't recevier other device message
i cry to change turn , but it's fail,

Coule give me some help? Thankyou

failed to connect

I tried running the go server and the webrtc-demo repo on the local machine and added the local server URL
but it won't connect

connect to https://0.0.0.0:8086:8086/ws
Closed by server [500 => SyntaxError: Failed to construct 'WebSocket': The URL 'wss://0.0.0.0:8086:8086/ws' is
invalid.]!
image

Just seeing navbar with Firefox Quantum 65.0.1

I've managed to build and deploy the flutter-webrtc-server package. I've tested it with Google Chrome in two mobile devices and it worked just as expected.
However, when trying to access to the HTML5 demo via Firefox, I can only see the blue navbar. I'm aware of #3 and I have both opened two tabs and tried https://localhost:8086, but I can't get it working.
I'm facing the same issue when connecting to https://demo.cloudwebrtc.com:8086/, therefore I think it has to be something browser-related.

  • Firefox Quantum 65.0.1

Error while running on Production

Thank you for this great work.
I have tested this server app on my localhost (address: 0.0.0.0:8086) and it worked seamlessly.
However when i tested it on production (Ubuntu VPS), it said that the server cannot be reached.
I have tried using Nginx as a reverse proxy and i got still the same.
Last, i tried to deploy using Heroku. But when i accessed it from browser (through address: mpfamily-webrtc.herokuapp.com or mpfamily-webrtc.herokuapp.com:8086), i got these errors.

Process exited with status 1
2019-12-10T07:42:20.470667+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=mpfamily-webrtc.herokuapp.com request_id=29d78ba3-a655-4c85-8a42-4f285f734ab4 fwd="182.1.89.131" dyno= connect= service= status=503 bytes= protocol=https
2019-12-10T07:42:21.632697+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=mpfamily-webrtc.herokuapp.com request_id=1aff0606-3b70-40c0-a6fc-8b7d94d346e3 fwd="182.1.89.131" dyno= connect= service= status=503 bytes= protocol=https

I supposed that it is a problem with the port. But i still cannot figure out how to cope with this error, since basically i'm a mobile developer, not a NodeJS developer.

Is there any specific step i missed while deploying on production?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.