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

Capability: Toggle whether default controls are displayed #16

Open
prushforth opened this issue Apr 25, 2019 · 5 comments
Open

Capability: Toggle whether default controls are displayed #16

prushforth opened this issue Apr 25, 2019 · 5 comments
Labels
discussion: capability a specific capability or feature: should it be included? what details? should it be a requirement? section: map viewer Capabilities & use cases for declarative map viewer widgets status: placeholder there's a matching section heading / some text in the report, but it's far from complete

Comments

@prushforth
Copy link
Member

prushforth commented Apr 25, 2019

This issue is for discussion of the map viewer capability "Toggle whether default controls are displayed".


Using the <video> element as an example, the browser renderer is capable of rendering video content on demand of the author using something as simple as

<video controls width="250">

    <source src="/media/examples/flower.webm"
            type="video/webm">

    <source src="/media/examples/flower.mp4"
            type="video/mp4">

    Sorry, your browser doesn't support embedded videos.
</video>

The video player rendered by that has default controls, styled according to the particular browser implementation. Yet, and I am not an expert, but I believe you can shut the controls off (by omitting the controls attribute) and provide your own controls (if you wish) which respond to events (handled by script).

Maps should follow a similar approach: if you don't want default controls, don't ask for them. Then, use events emitted by the map 'player' to bind your own self-created controls to the map, with script.

@prushforth prushforth added discussion: capability a specific capability or feature: should it be included? what details? should it be a requirement? status: suggestion this issue discusses a suggested addition to the report, that is not yet in the draft labels Apr 25, 2019
@AmeliaBR AmeliaBR added section: client-side API Capabilities & use cases for client-side APIs section: map viewer Capabilities & use cases for declarative map viewer widgets status: placeholder there's a matching section heading / some text in the report, but it's far from complete and removed section: client-side API Capabilities & use cases for client-side APIs status: suggestion this issue discusses a suggested addition to the report, that is not yet in the draft labels May 26, 2019
@Malvoz
Copy link
Member

Malvoz commented Jul 10, 2019

I believe you can shut the controls off (by omitting the controls attribute) and provide your own controls (if you wish)

Correct, https://html.spec.whatwg.org/multipage/media.html#attr-media-controls

In addition to controls, consider controlslist aswell.

@prushforth
Copy link
Member Author

In addition to controls, consider controlslist aswell.

Thanks I was not aware of that attribute. There will be a map-specific list of controls that we will need to define and specify.

@AmeliaBR
Copy link
Member

The controlslist proposal is also new to me, but definitely relevant to the discussion (& should be mentioned in the related web standards subsection). There's a PR under discussion for WHATWG HTML, and a matching issue, in addition to the WICG repository.

That said, the way it is currently defined (as a block list of noXXX keywords) is probably more narrow than what we want here.

@Malvoz
Copy link
Member

Malvoz commented Jul 26, 2019

@AmeliaBR

the way it is currently defined (as a block list of noXXX keywords) is probably more narrow than what we want here.

Help me understand why that is too narrow. controls enables default controls, controlslist="noXXX" then disables specific controls that aren't desired.

@AmeliaBR
Copy link
Member

Help me understand why that is too narrow.

The problem comes when you want to have both default and custom controls as part of the map widget layout (as discussed in #79 ). HTML video doesn't currently have this option: you can create buttons on your web page that affect the video, but you can't add buttons to the video control panel itself.

To match how the libraries currently do it, you'd need to be able to specify which default controls get shown in which corners of the map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion: capability a specific capability or feature: should it be included? what details? should it be a requirement? section: map viewer Capabilities & use cases for declarative map viewer widgets status: placeholder there's a matching section heading / some text in the report, but it's far from complete
Projects
None yet
Development

No branches or pull requests

3 participants