Permissions System
Permissions are set on a resource-by-resource (in resource.toml
) basis and have to be accepted by the user joining the server
Permission Types
Permission | Description |
---|---|
Screen Capture | This allows a screenshot to be taken of the alt:V process (just GTA) and any webview |
WebRTC | This allows peer-to-peer RTC inside JS |
Clipboard Access | This allows to copy content to users clipboard |
Extended Voice API | This allows to manually control voice, like activating of microphone, muting, etc. by the server |
Required vs Option Permissions
Permissions can be either be optional or required. When they are optional, this will still allow the player to join the server if they don't agree to it however you will no longer have access to the features for which the permission covers. Required permissions behave differently in the fact that if the user does not accept them then they will be unable to access the server.
resource.toml
required-permissions = [
"Screen Capture",
"WebRTC",
"Clipboard Access"
]
optional-permissions = [
"Screen Capture",
"WebRTC",
"Clipboard Access"
]
Tip
To check if a user has approved the respective permission the method alt.getPermissionState can be used.