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

Issue/3862 cmcd hls live multiple #3875

Conversation

littlespex
Copy link
Collaborator

@littlespex littlespex commented Jan 18, 2022

Description

Use goog.Uri to append CMCD query data to avoid duplicate query params

Fixes #3862

Screenshots (optional)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)
  • This change requires a documentation update

Checklist:

  • I have signed the Google CLA https://cla.developers.google.com
  • My code follows the style guidelines of this project
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have verified my change on multiple browsers on different platforms
  • I have run ./build/all.py and the build passes
  • I have run ./build/test.py and all tests pass

Comment on lines 811 to 832
/**
* Sets a key value pair and removes all other keys with the same value.
*
* @param {string} key Name.
* @param {string} value Value.
* @return {!goog.Uri.QueryData} Instance of this object.
*/
goog.Uri.QueryData.prototype.set = function(key, value) {
this.ensureKeyMapInitialized_();
// Invalidate the cache.
this.encodedQuery_ = null;

if (!this.keyMap_.hasOwnProperty(key)) {
this.add(key, value);
}
else {
this.keyMap_[key] = [value];
}

return this;
};

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copying the exact implementation of this function required pulling in too many closure dependencies, so function was ported to match the spirit of the original.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have done the same. Thanks for taking care of this!

third_party/closure-uri/uri.js Outdated Show resolved Hide resolved
@littlespex
Copy link
Collaborator Author

@joeyparrish I'm not sure why the CI test are failing. They are DRM and UI related, and I don't think the CMCD changes would have caused them. Maybe they just need to be re-run?

@avelad
Copy link
Collaborator

avelad commented Jan 25, 2022

@joeyparrish can you review it? Thanks!

@joeyparrish
Copy link
Member

We are still working on some flaky tests in the GitHub Actions environment. For now, please ignore those failures, which do not seem to be related to your work.

@joeyparrish joeyparrish merged commit f27401c into shaka-project:master Jan 25, 2022
joeyparrish pushed a commit that referenced this pull request Jan 28, 2022
Use goog.Uri to append CMCD query data to avoid duplicate query params

Fixes #3862

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
@avelad avelad added this to the v4.0 milestone May 4, 2022
@littlespex littlespex deleted the issue/3862-CMCD-hls-live-multiple branch November 17, 2022 17:27
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CMCD data is being appended multiple times when playing HLS live streams
4 participants