About the end event of live distribution in Azure Media Player

井上 翔太 21 Reputation points
2020-12-17T01:05:55.28+00:00

Hello

I want to see a live stream on my website.

So I want to start an event when the live is over.

What I think is
azure media service
If you get the streaming URL using the streaming endpoint and streaming locator using live events in
I think I can use the Azure media player on my website to view the live stream.

myPlayer.addEventListener ('ended', function () {

}

I know that you can get the end event with this code by the above method.

However, I do not know the end condition of live distribution.

How do I get the livestream end event called?

Azure Media Services
Azure Media Services
A group of Azure services that includes encoding, format conversion, on-demand streaming, content protection, and live streaming services.
316 questions
0 comments No comments
{count} votes

Accepted answer
  1. David Bristol 971 Reputation points Microsoft Employee
    2020-12-18T15:06:11.093+00:00

    The 'ended' event works with a Live Event as well as with VOD content. If you build a webpage based on the AMP sample dynamic_registerEvents.html you can substitute the URL with your live output URL and see what happens when you stop the live output. The 'ended' event should be thown. Note that if you simply stop or disconnect the encoder without stopping the Live Output the 'ended' event will not be throw.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 21,506 Reputation points
    2020-12-18T07:53:31.223+00:00

    Thanks for asking question question! To elaborate In Azure Media Services, Live Events are responsible for processing live streaming content. A Live Event provides an input endpoint (ingest URL) that you then provide to a live encoder. The Live Event receives live input streams from the live encoder and makes it available for streaming through one or more Streaming Endpoints.

    You may refer to this Tutorial: Stream live with Media Services

    To add once you have the stream flowing into the Live Event, you can begin the streaming event by creating an Asset, Live Output, and Streaming Locator. This will archive the stream and make it available to viewers through the Streaming Endpoint.

    If you wish to stop making your live event viewable, you need to stop streaming the event and delete the streaming locator.

    Check below official document on this might be helpful.

    Live events and live outputs in Media Services

    Live streaming with Azure Media Services v3

    Please Let us know you have further question on this.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.