viliusle / miniPaint

online image editor
http://viliusle.github.io/miniPaint/
Other
2.6k stars 607 forks source link

[Docs] Update iframe examples to add feature policy for camera access #251

Closed Giwayume closed 3 years ago

Giwayume commented 3 years ago

This is one of many files that show how to instantiate minpaint on another page using an iframe: https://github.com/viliusle/miniPaint/blob/master/examples/add-edit-imgData.html#L4 I don't know the list of all files that show iframe usage examples.

When the user does File -> Open -> Open from Webcam, this feature has usage limiations. By default access to the webcam from iframes is not allowed.

For iframes that need this access, need to add allow="camera" to the iframe declaration.

<iframe allow="camera"></iframe>
viliusle commented 3 years ago

I will update examples.