I implemented a Tiktok Live integration into my project, using the GitHub - zerodytrash/TikTok-Live-Connector: Node.js library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE. library.
It was very simple, I just set it up to run in the backend and then send the chat messages to the frontend.
All I need to do is add the url param tiktok=streamerUsername
and any time w
, a
,s
, or d
is typed in that streamer’s chat, it changes the player’s direction. Any chat or any gift can be used to trigger any action, but I just used walking for this demo.