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

Improve 'google-ima3' — avoid conflict with the DAI SDK #331

Closed
AdamWr opened this issue Jun 16, 2023 · 0 comments
Closed

Improve 'google-ima3' — avoid conflict with the DAI SDK #331

AdamWr opened this issue Jun 16, 2023 · 0 comments

Comments

@AdamWr
Copy link
Member

AdamWr commented Jun 16, 2023

Related issue - AdguardTeam/AdguardFilters#153857
In this case rule like this:

||imasdk.googleapis.com/js/sdkloader/ima3.js$script,redirect=google-ima3,important,domain=mdstrm.com

doesn't work (it breaks video player), because (if I'm not wrong) it overrides some values set by imasdk.googleapis.com/js/sdkloader/ima3_dai.js (google.ima.dai.api).

Maybe we could change this line:


to check if window.google.ima is already declared and change it to for example something like this:

const ima = window.google?.ima ? window.google.ima : {};
@adguard-bot adguard-bot changed the title Improve google-ima3 Improve 'google-ima3' Jul 7, 2023
@adguard-bot adguard-bot assigned slavaleleka and unassigned maximtop Jul 7, 2023
adguard pushed a commit that referenced this issue Jul 18, 2023
Squashed commit of the following:

commit 9db6334
Merge: 766dfb4 cba1d0f
Author: scripthunter7 <[email protected]>
Date:   Tue Jul 18 19:41:58 2023 +0200

    Merge branch 'master' into fix/AG-23263

commit 766dfb4
Author: scripthunter7 <[email protected]>
Date:   Tue Jul 18 19:30:11 2023 +0200

    change IMA tests

commit d01672f
Author: scripthunter7 <[email protected]>
Date:   Tue Jul 18 19:29:48 2023 +0200

    add comments

commit 30999fc
Merge: ece2529 3ef74ba
Author: Adam Wróblewski <[email protected]>
Date:   Tue Jul 18 17:58:35 2023 +0200

    Merge branch 'master' into fix/AG-23263

commit ece2529
Author: Adam Wróblewski <[email protected]>
Date:   Tue Jul 18 17:56:18 2023 +0200

    Improve 'google-ima3'
    Move window.google.ima.dai check at the end of GoogleIma3 function

commit d9e49ed
Author: Adam Wróblewski <[email protected]>
Date:   Mon Jul 17 17:36:57 2023 +0200

    Fix indentations in the test

commit 6f3dce4
Author: Adam Wróblewski <[email protected]>
Date:   Mon Jul 17 17:10:37 2023 +0200

    Improve google-ima3
    Do not overwrite google.ima if it was already set
@adguard-bot adguard-bot changed the title Improve 'google-ima3' Improve 'google-ima3' — avoid conflict with the DAI SDK Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants