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

Control capabilities #12

Open
Sinono3 opened this issue Jul 6, 2021 · 0 comments
Open

Control capabilities #12

Sinono3 opened this issue Jul 6, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Sinono3
Copy link
Owner

Sinono3 commented Jul 6, 2021

Right now the MediaControls struct assumes all the events can be handled. This should be under the control of the user, and dynamically, over the course of the program. I think the solution would be to create a struct like this:

// Capability? Ability? 
// I can't think of something else
// It needs a shorter name that's still intuitive.
enum MediaControlCapability {
	Play,
	Pause,
	Toggle,
	Seek,
	// etc...
}

This enum would be used to control the capabilities of the controls, like controls.set_enabled(MediaControlCapability::Play, true);. The implementation would probably vary in each platform.

If a capability is disabled, should we, still delegate it to the user handler? We probably shouldn't since in moost cases behaviour the specs say it should be ignored. Besides, it would be annoying having to check capabilities in the handler again.

Another feature I would like to implement with this issue is allowing players without controls, such as a player only showing metadata, handling no events.

@Sinono3 Sinono3 changed the title Player capabilities Control capabilities Jul 6, 2021
@Sinono3 Sinono3 added the enhancement New feature or request label Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant