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

CMCD fields names are being mangled #3839

Closed
littlespex opened this issue Jan 10, 2022 · 3 comments · Fixed by #3842 or #4009
Closed

CMCD fields names are being mangled #3839

littlespex opened this issue Jan 10, 2022 · 3 comments · Fixed by #3842 or #4009
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@littlespex
Copy link
Collaborator

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
3.3.0

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?

If custom app, can you reproduce the issue using our demo app?

What browser and OS are you using?
Safari, Chrome, Firefox

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

What configuration are you using? What is the output of player.getConfiguration()?

What did you do?

Load any stream with the player configured for cmcd.

What did you expect to happen?
The CMCD data appears in the manifest/segment requests with the correct field names.

What actually happened?

The CMCD field names are mangled:

http://dash.edgesuite.net/akamai/bbb_30fps/bbb_30fps.mpd?CMCD=Ea%3D%22m%22%2CZc%3D1%2CZf%3D1%2Cdf%3D%22CONTENT_ID%22%2Cqg%3D%22d%22%2Crg%3D%227af3be4f-0bfa-4029-80b2-59d0b57e8328%22%2Cvb

Decoded:
CMCD: Ea="m",Zc=1,Zf=1,df="CONTENT_ID",qg="d",rg="7af3be4f-0bfa-4029-80b2-59d0b57e8328",vb

@littlespex littlespex added the type: bug Something isn't working correctly label Jan 10, 2022
@shaka-bot shaka-bot added this to the v3.3 milestone Jan 10, 2022
@littlespex
Copy link
Collaborator Author

@joeyparrish It looks like the property names are being mangled when closure compiler's optimization mode is ADVANCED. What is the best way to signal the compiler not to minify certain objects or properties?

@joeyparrish
Copy link
Member

Property names either need to be quoted or defined in externs to avoid renaming. In this case, I think externs would be appropriate, as the field names are part of an externally-defined interface.

@joeyparrish joeyparrish added the priority: P1 Big impact or workaround impractical; resolve before feature release label Jan 10, 2022
@joeyparrish
Copy link
Member

Looks to me like shaka.util.CmcdManager.Data just needs to be moved to the externs (and taken out of the shaka.util namespace). Since this is purely external and not part of a plugin or other interface defined by Shaka, I would suggest moving it to externs/cmcd.js and naming it CmcdData (no namespace).

joeyparrish pushed a commit that referenced this issue Jan 10, 2022
Move CMCD type definition to externs to avoid minifying property names

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>

Fixes #3839
joeyparrish pushed a commit that referenced this issue Jan 11, 2022
Move CMCD type definition to externs to avoid minifying property names

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>

Fixes #3839
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Mar 12, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 12, 2022
@avelad avelad modified the milestones: v3.3, v4.0 May 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
4 participants