How to fix NotAllowedError error when I try to play video in Safari browser?

Stevica Knezevic 0 Reputation points
2023-01-31T16:26:04.2633333+00:00

I have created an application that uses Azure Media Player and Angular framework. I have a problem with playing the video in the Safari browser (OSX). If I try to play a video that is NOT muted, I got the following error in the Safari console:

Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.

I assumed that this error occurs when the app is trying to access the user's microphone, so I tried to prompt for microphone permission using the following code:

navigator.mediaDevices.getUserMedia({ audio: true })

But it doesn't work, I am getting the same error. Please, do you what could be a potential solution for this problem?

Thank you.

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.
303 questions
{count} votes