Closed ctle-vn closed 2 years ago
You didn't connect the client. Only a connected client may sub to GQL.
Here you can see how to connect with GQL topics.
Hey @Nerixyz ,
Thanks for the quick response. I've connected the client now, although I'm not entirely familiar with MQTT. I don't see anything being logged when trying to catch new comments on a live video broadcast.
Is there a way for me to pass a callback function whenever the subscribed topic has a new event triggered? Specifically, trigger a callback function when a live broadcast receives a new comment.
You should listen to the liveRealtimeComments
event (.on('liveRealtimeComments', ...)
).
I also have the same problems
Using the code from the realtime example, here's my adapted code:
Startaing realtime with broadcast id:
Startaing realtime2.
Startaing realtime3.
Startaing realtime4.
Startaing realtime5, "1/graphqlsubscriptions//{\"input_data\":{\"client_subscription_id\":\,\"broadcast_id\":\"\"}}", string
fucked up TypeError: Cannot read property 'updateSubscriptions' of undefined
Am I doing something wrong here?
-- Also was wondering if there was a way for me to get the real time view count for a live video broadcast?