Skip to content

Media Server for zomie-app (online meeting apps). using SFU architecture which features the following data transmission processes between the media server and the endpoints (client)

License

Notifications You must be signed in to change notification settings

Mamena2020/zomie-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zomie - media server

❗ the project continues on branch 1peer ❗

Media server for zomie app. Server running on nodejs. Each client will have 1 active peer to handle broadcasting as well as a consumer, this server using SFU architecture which features the following data transmission processes between the media server and the endpoints (client), WebRTC for media real-time communication, and Socket.io for signaling & messaging.

This app also using TURN Server as relays media, work as a backup plan if STUN Server won't work because client device behind of symmetric NAT. TURN server is already end-to-end encrypted by the peers and the TURN Server cannot decode/read the encrypted packet, it just relays the packet to other peers. By default TURN already setup in file (lib/Services/WebRTC/Config/WRTCConfig.dart) using free TURN Servers from OPEN RELAY. but you can add your own Turn server using Zomie TURN Server as relays media.

#WebRTC Architecture - SFU (Selective Forwarding Unit)

#how to use

  • config
    • create your .env from .env.example, & fill the credential. you can ignore (TURN_SERVER_HOST, TURN_SERVER_USERNAME, TURN_SERVER_PASSWORD), because by default its already setup, but its okay if you want to add more your own TURN server.
      # MEDIA SERVER CONFIG
      HOST="localhost"
      PORT=5000
    
      ROOM_MONITOR_INTERVAL = 60000 # 1 minute  
      # 1000 * 60
    
      ALLOW_TURN_SERVER = "false"  # "true" or "false"
      TURN_SERVER_HOST = "turn:ip:port" #example: "turn:192.168.1.9:3478"
      TURN_SERVER_USERNAME = "zomie"
      TURN_SERVER_PASSWORD = "password"
    
  • install
    • npm install
  • dev
    • npm run dev
    • nodemon server
  • prod
    • npm run start
    • node server

Note

  • WebRTC

    • STUNT/TURN server
      • STUNT: "urls": "stun:stun.stunprotocol.org"
        • Stunt will not working if client is under symmetric NAT.
      • TURN: by default TURN server using from Open Relay, or you can add more using Zomie TURN Server
  • socket io

    • version match info[1]

      • server(node js): "socket.io": "^2.4.1"
      • client(flutter): socket_io_client: ^1.0.1 | ^1.0.2
    • version match info[2]

      • server(node js): "socket.io": "^4.5.3"
      • client(flutter): socket_io_client: ^2.0.0
    • Code for working on flutter.

          import 'package:socket_io_client/socket_io_client.dart' as IO;
          IO.Socket socket = IO.io(host,IO.OptionBuilder()
            .setTransports(['websocket']) // for Flutter or Dart VM
            .setExtraHeaders({'foo': 'bar'}) // optional
            .build());
      

References

About

Media Server for zomie-app (online meeting apps). using SFU architecture which features the following data transmission processes between the media server and the endpoints (client)

Topics

Resources

License

Stars

Watchers

Forks

Packages