timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
48 stars 12 forks source link

Native integration with vdo.ninja #89

Open timotheeg opened 3 years ago

timotheeg commented 3 years ago

nestrischamps has implemented built-in webcam support into the layouts with peerjs. With such a built-in integration, nestrischamps was able to display player video cam at specific locations and sizes in the layouts, for a professional-looking finish.

This has worked well in the majority of cases, but had some issues in some edge cases.

Additionally, the newly introduced nestrischamps connector, which allows game frames to be sent to nestrischamps straight from emulators (no OCR needed!), does not support webRTC at all, so webcam cannot be native with it.

On the other hand, folks have been using vdo.ninja (previous named obs.ninja), which is another webRTC system, dedicated to video sharing (unlike nestrischamps which has webcam support as a side feature).

vdo.ninja doesn't have a SDK, but it has an iframe API, which is demoed here

TODO: Integrate vdo.ninja natively, at least for competition layouts. An admin should be able to set a player's vdo url in the admin page, and the competition layouts should get the video stream from it.

One benefit of using vdo.ninja is that the player side video sharing page is much more comprehensive, allowing the player to verify his/her webcam is working properly and deciding exactly what to share.

Another benefit is that would allow player playing with the nestrischamps connector to also natively share their video stream

timotheeg commented 2 years ago

iframes and CSPs are annoying to deal with. It seems I need to get a proper domain for nestrischamps (e.g. nestrischamps.gg ?), rather than being hosted on heroku to set up a proper integration.