I know that using the youtube API I can check when a video ends. But what about a stream? Is the code the same?
This is an example of the code I use
<iframe width="100%" style="height: 200px !important;" src="https://www.youtube.com/embed/live_stream?channel=CHANNEL_ID&modestbranding=1&autoplay=1&controls=0"frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>