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

Bug 1933266 - Add support for mirror URLs for GMP plugins. #3251

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

aosmond
Copy link
Contributor

@aosmond aosmond commented Nov 26, 2024

This patch adds support for alternative URLs from which the GMP plugin can be downloaded. This is useful for GMP plugins, particularly Widevine, because there are many different mirrors from Google. Some users have trouble accessing the preferred mirror due to networking issues, so it would be ideal to supply alternative domains that are more likely to resolve/be reachable as a backup.

@aosmond
Copy link
Contributor Author

aosmond commented Nov 26, 2024

See https://bugzilla.mozilla.org/show_bug.cgi?id=1932482 for the Gecko piece.

@aosmond
Copy link
Contributor Author

aosmond commented Nov 26, 2024

Sorry, I repushed to add another test because I realized I was missing one for the mirror XML (not just the mirror JSON).

Copy link
Contributor

@bhearsum bhearsum left a comment

Choose a reason for hiding this comment

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

This looks fine to me; there's a few minor comments below.

I also tested this in a local env with this in a widevine release blob:

        "WINNT_x86_64-msvc": {
          "fileUrl": "https://redirector.gvt1.com/edgedl/widevine-cdm/4.10.1582.2-win-x64.zip",
          "filesize": 5097580,
          "hashValue": "8054294ad328f0b32e7474448e77fb4c56dbe4e7100920461508dd18cab94f69b13dbc1e9776800f49993d478827b4a65732a9bc39a3940251d9cb96ffffddd9",
          "mirrorUrls": [
            "https://redirector.gvt1.com/edgedl/widevine-cdm/4.10.1582.2-win-x64.zip.bhearsum1",
            "https://redirector.gvt1.com/edgedl/widevine-cdm/4.10.1582.2-win-x64.zip.bhearsum2"
          ]
        },

I ended up with what appears to be expected:

<?xml version="1.0"?>
<updates>
    <addons>
        <addon id="gmp-widevinecdm" URL="https://redirector.gvt1.com/edgedl/widevine-cdm/4.10.1582.2-win-x64.zip" hashFunction="sha512" hashValue="8054294ad328f0b32e7474448e77fb4c56dbe4e7100920461508dd18cab94f69b13dbc1e9776800f49993d478827b4a65732a9bc39a3940251d9cb96ffffddd9" size="5097580" version="4.10.1582.2">
            <mirror URL="https://redirector.gvt1.com/edgedl/widevine-cdm/4.10.1582.2-win-x64.zip.bhearsum1"/>
            <mirror URL="https://redirector.gvt1.com/edgedl/widevine-cdm/4.10.1582.2-win-x64.zip.bhearsum2"/>
        </addon>
    </addons>
</updates>

Copy link
Contributor

@bhearsum bhearsum left a comment

Choose a reason for hiding this comment

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

oops, requesting changes for the comment request, but this is otherwise fine.

@bhearsum bhearsum removed the request for review from gabrielBusta November 26, 2024 19:17
This patch adds support for alternative URLs from which the GMP plugin
can be downloaded. This is useful for GMP plugins, particularly
Widevine, because there are many different mirrors from Google. Some
users have trouble accessing the preferred mirror due to networking
issues, so it would be ideal to supply alternative domains that are more
likely to resolve/be reachable as a backup.
@aosmond aosmond changed the title Add support for mirror URLs for GMP plugins. Bug 1933266 - Add support for mirror URLs for GMP plugins. Nov 26, 2024
@aosmond aosmond requested a review from bhearsum November 26, 2024 23:46
Copy link
Contributor

@jcristau jcristau left a comment

Choose a reason for hiding this comment

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

Looks great to me, thanks!

@bhearsum bhearsum merged commit 82efa71 into mozilla-releng:main Nov 27, 2024
9 checks passed
@aosmond aosmond deleted the ao_gmp_mirror_urls branch November 27, 2024 15:08
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.

3 participants