How would I go about creating an event listener that listens for when a stream goes offline? Could some one point me in the right direction to get started?
You can use Webhooks to be notified when a stream goes offline.
That is documented here:
Stream-Change will send a empty payload