This PR fixes player observability in response to media accessibility updates. Event though we were observing such changes internally we were filtering identical values resulting from changes, preventing core property changes from being correctly published by the player in response to media accessibilty updates.
Changes made
Player properties (and associated objects) need to stay equatable so that duplicates can be easily removed and associated value streams can be easily sliced with slice(at:). Since we cannot grab media accessibility settings as a whole when a kMACaptionAppearanceSettingsChangedNotification is received, I propose to publish the last update date instead (another option would have been a UUID but it felt less natural IMHO).
MediaSelectionProperties now store the date of the most recent change, which is taken into account when checking for equality. As a result changes made to media accessibility changes now result in an externally observable core property change.
Circumspect has been updated so that value output and observable change mutation can be observed with a nice formalism.
Remove testFailingUnauthorizedItemBetweenPlayableItems flaky test. We had a lot of troubles with it recently and it was making this PR difficult to check for no good reason. I tried other approaches which seemed promising (e.g. increasing the length of the 1st stream involved) but in the end the test remained flaky.
Checklist
[x] APIs have been properly documented (if relevant).
[x] The documentation has been updated (if relevant).
[x] New unit tests have been written (if relevant).
Description
This PR fixes player observability in response to media accessibility updates. Event though we were observing such changes internally we were filtering identical values resulting from changes, preventing core property changes from being correctly published by the player in response to media accessibilty updates.
Changes made
slice(at:)
. Since we cannot grab media accessibility settings as a whole when akMACaptionAppearanceSettingsChangedNotification
is received, I propose to publish the last update date instead (another option would have been aUUID
but it felt less natural IMHO).MediaSelectionProperties
now store the date of the most recent change, which is taken into account when checking for equality. As a result changes made to media accessibility changes now result in an externally observable core property change.testFailingUnauthorizedItemBetweenPlayableItems
flaky test. We had a lot of troubles with it recently and it was making this PR difficult to check for no good reason. I tried other approaches which seemed promising (e.g. increasing the length of the 1st stream involved) but in the end the test remained flaky.Checklist