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

Support passing customData to media load request #137

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

simon816
Copy link

There are two issues here:

  • ChromeCast.load did not allow passing a customData parameter
  • The customData serialiser assumed an object with property payload containing an object with only string values.

From the documentation (https://developers.google.com/cast/docs/media/messages#Load):

Name Type Description
customData object optional Application-specific blob of data defined by the sender application

There shouldn't be any assumptions about how this is serialised, so providing an Object gives the caller the greatest flexibility.

Given that the functions to construct the StandardRequest.Load object are package-private and that no public method exists to set customData, I believe it's unlikely anyone is relying on the existing serialisation (i.e. wrapped in an object property payload).

Use case: When reverse engineering the Soundcloud client controller in Chrome, I found it required a customData object on the LOAD event, which I could not set with this library without resorting to reflection.

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.

None yet

1 participant