-
Notifications
You must be signed in to change notification settings - Fork 466
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
Add checking for optional support of track control commands #397
Conversation
Invitation URL: |
I left some TODO comments in the code just related how to handle the supported capabilities event for the media track control now. Also note that I changed some of the profile names so that I they would all follow a pattern that I could use for the profile switching logic (based on #370). Let me know if there is a preferred method for doing that or if changing profile names once in production is problematic. |
With the completion of HCS-3895, this seems to be working for me now. I added the event for the supportedTrackControlCommands to the infoChanged event because in my testing, that seemed to be directly tied to the profile update. |
The next/prev track control commands are optional in the MediaPlayback cluster. This will check for the commands using the AcceptedCommandList attribute in the MediaPlayback cluster and then switch to an appropriate profile if these commands are supported.
No duplicate profiles detected. |
Whenever a profile is updated to a profile with mediaTrackControl support, emit an event for the supportedTrackControlCommands.
@@ -15,7 +15,7 @@ | |||
local capabilities = require "st.capabilities" | |||
local clusters = require "st.matter.clusters" | |||
local MatterDriver = require "st.matter.driver" | |||
local utils = require "st.utils" | |||
local MediaPlaybackClusterAcceptedCommandList = clusters.MediaPlayback.attributes.AcceptedCommandList |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be somewhat safe to merge at this point since 0.46.x has been distributed all the way to external beta populations and they are the only ones that would really be running the driver. But this will cause errors on any hub running 0.45.x because the attribute does not exist yet.
Closing this PR due to time lapsed. If we need to reopen we can. |
The next/prev track control commands are optional in the MediaPlayback cluster. This will check for the commands using the AcceptedCommandList attribute in the MediaPlayback cluster and then switch to an appropriate profile if these commands are supported.
https://smartthings.atlassian.net/browse/CHAD-9933