Youtube Live Stream Chat Messages

Viewed 6897

I have been looking into getting messages from my live stream on youtube. I have a need to be able to process the chat in real time howver I have come to find a few issues.

For starter and the main issue really is that the order in which the chat comes through seems to be oldest first. This is rather a problem as if I am trying to handle new chat messages in real time, as the stream goes on the new messages go further and further down the list.

I must get next page keys which is a nightmare are the smallest page size i can requst from the api is 200 messages.

Its making the load a lot more that it needs to be.

Does anyone know how i might request the chat messages newest first or better handle the chat stream?

Im using PHP to read the API and I can read the messages into a database but i still have to go deeper and deeper as the chat goes on rather than just pull the new ones off the top.

1 Answers
Related