Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify pan/tilt/zoom capabilities and settings (#245) #248

Closed
wants to merge 1 commit into from

Conversation

eehakkin
Copy link
Contributor

This CL mandates PTZ capabilities and settings must be sanitized based on permission.
I hope that this clarifies the issue.

<dd>This reflects the current <a>pan</a> setting of the camera.</dd>
<dd>This reflects the current <a>pan</a> setting of the camera.

If the track has been created without <a>requesting permission to use</a> (as defined in [[!permissions]]) a PermissionDescriptor with its name member set to {{PermissionName/camera}} and its {{CameraDevicePermissionDescriptor/panTiltZoom}} member set to true or if that permission request is denied, the track does not support <a>pan</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems checking the permission value at the time getSettings is called is sufficient.
Why adding a check for the permission at the time the track was created?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR does not add a check for the permission at the time the track was created. That check already exists in the spec. So reusing the result of that check (or the fact that the check was skipped because PTZ was not requested) seems sufficient.

Checking the permission value at the time getCapabilities or getSettings is called breaks the developer assumptions that availability of capabilities and settings do not change during track life time (like it is common to create UI components and their event listeners based on capabilities when the track starts).

I also think that PTZ capabilities and settings should not suddenly appear to non-PTZ tracks just because the origin gains PTZ permission through another getUserMedia call during the life time of the non-PTZ track.

What happens if the PTZ permission is revoked is more interesting. One option is that the track could be ended (in which case getCapabilities and getSettings do not have to check permissions). The second option is that the settings would not be updated after the revocation (in which case getCapabilities and getSettings again do not have to check permissions). The third option is that PTZ capabilities and settings would be removed (but would that require some kind of event so that the web page could listen for that event?).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's continue this discussion at #249

<dd>This reflects the <a>pan</a> value range supported by the UA and by the track.

If the track has been created without <a>requesting permission to use</a> (as defined in [[!permissions]]) a PermissionDescriptor with its name member set to {{PermissionName/camera}} and its {{CameraDevicePermissionDescriptor/panTiltZoom}} member set to true or if that permission request is denied, the track does not support <a>pan</a>.
In that case the UA MUST NOT expose the <a>pan</a> value range.</dd>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split this PR in two, one for getSettings and one for getCapabilities.
This change would disallow some step-by-step permission flow (first request camera permission, then request PTZ permission if PTZ support)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will two separate PRs.

The idea (and way it is currently implemented in Chrome) is that capabilities are guarded by the PTZ permission so that PTZ ranges cannot be used for fingerprinting without explicit permission grant.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's continue at #250

@riju riju added the PTZ Pan-Tilt-Zoom label Aug 19, 2020
@eehakkin
Copy link
Contributor Author

Abandoned for #249 and #250.

@eehakkin eehakkin closed this Aug 19, 2020
@eehakkin eehakkin deleted the feature/clarify-pan-tilt-zoom branch August 19, 2020 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PTZ Pan-Tilt-Zoom
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants