ENG-74: Add getConfiguration() to airconsole-api#108
Open
marc-n-dream wants to merge 9 commits intomasterfrom
Open
ENG-74: Add getConfiguration() to airconsole-api#108marc-n-dream wants to merge 9 commits intomasterfrom
marc-n-dream wants to merge 9 commits intomasterfrom
Conversation
Signed-off-by: marc-n-dream <marc@n-dream.com>
r: restructure the event flow to use a distinct flow
r: externalize the decision on hard vs soft fail
Store configuration from the ready event and expose it via
getConfiguration(). Returns {supportedVideoFormats, transparentVideoSupported,
unityVideoSupported, graphicsQualityTier} or undefined before onReady.
Adds Jasmine tests for both present and absent configuration.
ENG-74 Task 3
…Task 6) Clarify that getConfiguration() is only available on the screen device, returns undefined on controllers, and is delivered via the ready event.
Jasmine test verifying getConfiguration() returns undefined before the onReady READY message is received — closes review finding M2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
getConfiguration()to airconsole-api (both 1.10.0 and beta/1.11.0). The method returns the platform capability configuration injected into the READY event by the appengine.Changes
airconsole-1.10.0.jsandbeta/airconsole-1.11.0.js:onReadystoresconfigurationfrom the READY event messageResetCachesclearsconfigurationgetConfiguration()method with JSDoc (screen-only note included)tests/spec/methods/spec-connectivity.js: 3 Jasmine tests:getConfiguration()returns the configuration object when READY firesgetConfiguration()returnsundefinedwhenconfigurationkey is absentgetConfiguration()returnsundefinedbeforeonReadyfires (pre-READY guard)Dependencies
Depends on
airconsole-appenginePR #3488 being merged first — that PR injects theconfigurationpayload into the READY event.Testing
All existing Jasmine specs continue to pass. 3 new specs added.
Jira
ENG-74