I get sharing screen by using mediaDevices.getDisplayMedia() and it work well on Chrome and Safari < 15. But when I try it on Safari 15, I hit the bug: invalidAccessError: getdisplaymedia must be called from a user gesture handler
I have viewed the answer: Safari getDisplayMedia must be called from a user gesture handler. They said that the reason is:
This safari error occures due to the event (event that should trigger it) having isTrusted property false. This property is set automatically and is not possible to fake.
When I log event.isTrusted on Safari 15, its value is true. But I still hit the above error. Can you guys help me with this, thanks.