Azure Media Services Customize Error Message?

56 Views Asked by At

I am trying to find additional configuration (or equivalent coding or HTML instruction) to have a custom GIF when an error happens from an AMS live event stream viewed in Azure Media Player. Currently when the stream "breaks" the display shows "A network error cause the video download to fail part-way. Please check your network connection or try again later (0x2020019c)" from Azure. I need to customize that and ensure it is logged with the JavaScript Application Insights that is already setup. What is the right way to code/configure this?

Thanks.

 var myAmpOptions = {
    "nativeControlsForTouch": false,
    "logo": { "enabled": false },
    autoplay: true,
    controls: true,
    fluid: false,
    "plugins": {},
    poster: "/mygif.gif"
};

AMP Error

1

There are 1 best solutions below

3
johndeu On

I'd start first by writing an event handler for onError and just hiding the player and showing the animation using CSS classes depending on the error condition.

https://amp.azure.net/libs/amp/latest/docs/index.html#amp.xmlhttprequestwrapper.onerror