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

Add checking for optional support of track control commands #397

Closed
wants to merge 2 commits into from

Conversation

ctowns
Copy link
Contributor

@ctowns ctowns commented Nov 23, 2022

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

@ctowns ctowns requested review from tpmanley and cjswedes November 23, 2022 16:36
@github-actions
Copy link

@github-actions
Copy link

Unit Test Results

       1 files  ±0     305 suites  ±0   0s ⏱️ ±0s
1 379 tests +1  1 364 ✔️  - 14  0 💤 ±0  0 ±0  15 🔥 +15 
2 437 runs  +1  2 422 ✔️  - 14  0 💤 ±0  0 ±0  15 🔥 +15 

For more details on these errors, see this check.

Results for commit 455b1c6. ± Comparison against base commit 71bb158.

@ctowns
Copy link
Contributor Author

ctowns commented Nov 23, 2022

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.

@github-actions
Copy link

github-actions bot commented Dec 16, 2022

Test Results

       1 files     307 suites   0s ⏱️
1 385 tests 1 385 ✔️ 0 💤 0
2 447 runs  2 447 ✔️ 0 💤 0

Results for commit 6fa8111.

♻️ This comment has been updated with latest results.

@ctowns
Copy link
Contributor Author

ctowns commented Dec 16, 2022

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.
@github-actions
Copy link

github-actions bot commented Dec 16, 2022

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
Copy link
Contributor

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.

@CLAassistant
Copy link

CLAassistant commented May 31, 2023

CLA assistant check
All committers have signed the CLA.

@lelandblue lelandblue closed this Jul 16, 2024
@lelandblue
Copy link
Contributor

Closing this PR due to time lapsed. If we need to reopen we can.

@lelandblue lelandblue reopened this Jul 16, 2024
@lelandblue lelandblue closed this Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants