Streaming camera view to website in unity?

2019-08-21 12:35发布

I need to write a script that would take a camera's view of the scene and stream it to a website. Also this is in a local, secluded network at my workplace. Is this possible with a nodejs server?

1条回答
我命由我不由天
2楼-- · 2019-08-21 13:23

It is possible, but you have to break it down :

  • recording the screen (client-side)
  • streaming to a server : sending the video (client-side : streamer)
  • streaming to a server : receiving the video (server-side)
  • serving a route for viewing the stream (server-side)
  • viewer-logic (client-side : viewer)

The server would have 2 types of clients : streamer & viewers

Recording the screen becomes easier if you run the game client from a browser.

Then you can add extra logic to it : RecordRTC

RecordRTC: WebRTC JavaScript Library for Audio+Video+Screen Recording

查看更多
登录 后发表回答