I found a similar report here: https://forums.opera.com/topic/69795
Checked a bit further:
- These permissions are stored in the portable apps dir profile/data/Default/Preferences file.
- When I grant permissions, either via settings, or from the prompt when the site asks, it appears in the media_stream_camera and media_stream_mic keys for camera and microphone access.
- These entries persist at first, also throughout Opera and system restarts. The whole profile is on the system drive, persistent. Right now I see still permissions granted yesterday during a video chat.
- But at some random point, those keys are emptied entirely, as said usually at least once in the middle of a video chat session, at once for all permissions of this site, probably all sites: notifications, camera, microphone, all at once.
I will monitor the file and those keys a little, to see at which point this happens again, whether the site needs to be open for this, or whether they are lost without any related tab open, and whether if really affects all permissions for all websites, or only all permissions for one website.
Write permissions or volatile storage or any such are hence not the issue. Probably there is a max in-memory Preferences size, after which certain keys are not processed anymore and practically handled and stored back as empty.
The file also contains a permission_actions key, which seems to store past permission prompts with timestamps and the action done. The number of actions stored in the camera and microphone subkeys is low, like 10-20, but it seems to contain timestamps of prompts from before the media_stream_* keys became empty yesterday. But I will monitor this as well.
Another explanation would be a hidden timeout for permissions, i.e. that this is an annoying and buggy feature, not a bug in general. Though I would expect more reports in this case, especially with the mid-usage permissions loss. But if timestamps wouldn't play a role, what for are those prompt actions with timestamps stored at all?