Problem is appeared when I try get video stream from camera in `mac` on `safari`.  

For get stream I use function `navigator.mediaDevices.getUserMedia({video: true})`  

On `chrome` it works nice, but in `safari` it sometimes throw error: 

> 
> NotReadableError: The I/O read operation failed.
> 
> 
> 

[![console error screen](https://i.stack.imgur.com/obtTX.png)](https://i.stack.imgur.com/obtTX.png)

The most strange that **it's not stable, it error can appear and after sometime it will be work fine (without changing a code)**...I checked it a lot of times and didn't find dependency why it or work or no.

Another one strange thing that **error shows only in angular**, so I thought that problem could be with `zone.js` but I didn't find solution when trying take out call of function for getting stream from `zone` (for take out from `zone` I used `runOutsideAngular` and `run`).

I tried to use some `npm` libraries like `ngx-webcam`, `ack-angular-webcam` but that didn't help too, when error shows in my code it appears in plugins code too (I guess it cause they use same func to get stream).

So, my long research in internet didn't give appropriate result and I have to ask about advice, solution or at least idea. 

**My question**  

How to avoid appearing of this error, why it shows not constantly and what is the reason for this error?

Thanks for your help.