Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Twitch Ads showing through Brave Shields #135

Open
Miyayes opened this issue Sep 15, 2018 · 4 comments
Open

Twitch Ads showing through Brave Shields #135

Miyayes opened this issue Sep 15, 2018 · 4 comments

Comments

@Miyayes
Copy link

Miyayes commented Sep 15, 2018

Description: Ads can occasionally be seen on Twitch even with shields enabled. For instance, a Galaxy Note 9 pre-roll advertisement can be seen before loading Ninja's Twitch stream.

image

Ease of Reproducibility: Medium (inconsistent)

Brave:

  • Brave-muon: Yes

  • Brave-core: TBD

Initial Investigation:

(Luke Mulks' work below.)

This is the request for the playlist containing the ad manifest that the player's ad SDK is using:

Request URL: https://video-weaver.sjc02.hls.ttvnw.net/v1/playlist/CscDL_f6--R9uzeupTm50po90-X8enQkdjcevLyX2uJmVIKjLHYZopebcPISIDYGDMt2QPGZIxOOrtOUO4zD1mukpE0GQ2_OKPkikPRGXlOgFejejVm1ab9eU8SSZcOslhXQYDD6poz6F5adXw6t5kfpYf-PWKMcQwhTOB81j0uAxGPtrtqLKZ1henjkT4PspBpScxSj2SPxr6pcSF_xLrQRywDrEo5KHP8LNfroejTqSfnfC75GtYnbP2rQc89FpPgho4Y5keg8TIKnEwxisAKIbIjbQzSLdsOCEJv9d5fUNxlFs-0Q2h7TUKcAh29S7PO3i58yQsrCg_z4vOL5GDTNrk9XAAHm97OqrOztkDMLEzPesJ_z_ktKUhhw-M0SqOndBi1DBU5sIIz_DJYBCtyZnV40TINpHljxQt2lOxbTTXRNLCZCHT6bUIohRvUQsbNe7D1I8lyRcobwumnxzSBXasTwcx5I2tHu27Cfh0hvPMGiL5k-My8i-YOv1dd2-gzxsPCLH_lm5fg1QBl-b4XwqpYhWU91cd7cvIBqhvlF3ezYWCxFBAZkSJo8YBaUu6KeStHNlSdC2E66ViJPQAEk-fnbF3EmpH4SEPnbGr4nLpXmtgSW4kcXy8waDHO3W1DD87Wm9Qt79A.m3u8

This is the response:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:5
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TWITCH-ELAPSED-SECS:12916.667
#EXT-X-TWITCH-TOTAL-SECS:12931.831
#EXT-X-DATERANGE:ID="stitched-ad-1535430302-15163999993",CLASS="twitch-stitched-ad",START-DATE="2018-08-28T04:25:02.006Z",DURATION=15.164,X-TV-TWITCH-AD-URL="https://www.samsung.com/us/mobile/galaxy-note9/?cid=dis-mktg-stc-mob-08212018-14107"
#EXT-X-DISCONTINUITY
#EXT-X-SCTE35-OUT:URL="https://www.samsung.com/us/mobile/galaxy-note9/?cid=dis-mktg-stc-mob-08212018-14107"
#EXT-X-PROGRAM-DATE-TIME:2018-08-28T04:25:02.006Z
#EXTINF:2.002,b831d344be5bf2916f4ecb8e1b769e33-08-24-2018-21.53.08
https://video-edge-7e9704.sjc02.abs.hls.ttvnw.net/v1/segment/CuMEIMqDzGK9Ky3lnB86QpMK7TPxg_vB5Gex2NCHfnpuM-HgcIoPRIVEtknLi6GnUSeODDK3ZMfqkIDL6XfpSP92OVvJQKRtww7e3DRLiREH2jMbz3K6SbKwAtLeDD6tahyJ5Z4HEHm2MI8QHTv2TbBo1-lvYBKS7fpHNQponW_g5-eg6hCA4BuaMf9ViT8z3r96wRnh9O8V0f2MWLpk83sM8j2iWf5L63cK158mbAT7VP5bzkQSN5-KBXRbwx9mdN9yGTRzrnauoOXRQyApfo9twbKfjHj_DmmcFqVJiFGSbcwRZ1bKc8_e-3I-DOM8j2xT1JYzM5o3BrH3M7Gf5yZxaIT1DwjKnTa0qX_v3gbwP-2U9tm6LAKBf59WVuB-8-XrXKKqkjzkxf7EtzTcngKb5iBPXhUQhxzqM8ps2lFlo-v5gQL5weHigaQXMPRw9i6XiHTgEGXHv_kfvCPYVRH675IfZVfE0SLwOZxpLcFDPsHILiImGNtp6ktJMBXYHWIaFB7xY1j75jVMTvpPFU95h0k88ro0K9My2GndLDe7vnXVuVSKcgXiIucWx0atz4_JcniXUE5NzPCL5235UhyO0gsA5PyJY4NuOCXQEVsVMvLnJJ4AoGkIWOLbCbX63Wrm1DDJcejYlKa5E4mBydCR8QO6U63HQCKZQKR-3Ok9qY3FwUtP6tSfkU4bUEW91-dEd_fFwAa0AELceHN-lCO69YfvogTRlXTOtilwtiGV419EA1iY5WCJd7-qtuT2Rg7Od7mofiUdL1myIQENtOSLCrcHtPGZB4WNyt5fAGvHKgWafYYSEBRAZMILDqRlzAAS502t3QAaDAtdUJPGQrVZbWWTXw.ts
#EXT-X-PROGRAM-DATE-TIME:2018-08-28T04:25:04.007999999Z
#EXTINF:2.002,b831d344be5bf2916f4ecb8e1b769e33-08-24-2018-21.53.08
https://video-edge-7e9704.sjc02.abs.hls.ttvnw.net/v1/segment/CuME7rqfUpW5TcWanCD5-v_kdKieJOlPQ_SOLV5k76zxWesPSnIHNxmAtdfiee9sCFJn8zNqt0tig31tRdxWnnhifn3-V0W2n5_hImeqj9qT6pA9rjzJcMSaryUa1H1VYho6CBREq3pKuClkQZOdUZgHSgMMViRT8pq9AOKVxZimq0TclaXeYGKzfEpBWvKrfrD59DNVsNsulREiu4XnPbahGa4dVSczFTwKM1MEidjtORyOg2qHrXD7izw4kem3y1TrvWDr5aTXdxr9-9lXzViQ9W3gAoTZ413_WVc3STTBUh5Dp6rtAxVZCoKo_Y6VzJAz02pGtPvedRLjJ-RJwC0wvJkqQqrBfIoTG708sSq8-uGtJDqf8jFL6CZKwE2uMSHAGZi-_h7OOBv3HvXckthLryzjjvQuhtxBFgq6aloBq7dJV2MKnBok_slWxand-uGvn5GpN68Z-cfoV2a4hBRNgCf_1DSNgEr73oHO-NCZAKV_O9cnfLPzmMUYhVdDCzavw7PwNJ0bvuJ-FiGpT6AveHck7EJ8_fZSd4AUO5uN_0znzVE2CsV-WJ4V6iUKUvFBzJCB0WUym-R13mUM7d_ATXjrpFyG198wNsFQAOJZemsSxK18jA8DtWxXKwbRpUcGSuPFcvzb9A9WJzCz532W5TLgatEzcWW1VfKxWx5H-cWjkW64eEoUNu-eKnRBvNU4tTuMAK4TndjBqtK-y7qI_tDtnMRs8h7cS2jhddiKEqWpQKFDD0GcYvqxmAIiY8M6pndpWH44bnjmDN_9H8xCt3Stp_KP76yEyTTRsLBiCnWWC74SEEhFnT0LFsvvT5yPYMqcLK0aDFhWfvCf8ejQzwPz7g.ts
#EXT-X-PROGRAM-DATE-TIME:2018-08-28T04:25:06.009999998Z
#EXTINF:2.002,b831d344be5bf2916f4ecb8e1b769e33-08-24-2018-21.53.08
https://video-edge-7e9704.sjc02.abs.hls.ttvnw.net/v1/segment/Ct0D40SL3OXhh_c8bM36IiX59ib1hxMmZyHKZatD93Qm5Wb0CoprvltO0KRC0lw36qYUEYXMQD_XcRc_L5TxIMfoZwwBLUoO5vYcx6KjENVX6vGJBymGCT6ohfaTlscrirbUcqwv5UkJ21A8ADanCtRZBIuMbogyUDX9XSOwLpLY0JcETHf2DN1LN2oPr2laOOG0R4THQuTy6YQAIVbdLkW8anEpl2gWbKsftyiGzwaSGdOpwKosQJGBmgjEwn6sX22phOj4A5vWqaKXkkt1ef1eLynn5feI3GI5geTUuT8U_KVhuUCSdEx_CswyLTIc9jyWFAsuqFRejStstT-K7fNQf-bSOrD0sveL5zZzXd0m_gcM3z93kbFR-bBeFtP76H-PmY0_YU6AeL5lovSyAPyRiyv2s6jYVuW3N-zI5QUHIrAzRL8tT09JOxGFROCkdTfoBdf_hIY97UxbnRAhDNsoF-tFARF6kxigWdRa0R8oRMxl6YSQgGeOWV2h4eGrsCjVJAxYL4jFvhtKvmYDh0X4jMM0p1Bpi4czmxXDHbfFlGcqYdQN7wC5Ib2b1FuUgA9GPG-OgVHhgq1dSO3_REz8RkuyFkLtp5KP7gCadSkFr4dRq1ugsG_St7fdVKF0EhB7YZe2Lu4XBcMgZJo_5DYrGgyzbwAPVRk_IY0h2xA.ts
#EXT-X-PROGRAM-DATE-TIME:2018-08-28T04:25:08.011999997Z
#EXTINF:2.002,b831d344be5bf2916f4ecb8e1b769e33-08-24-2018-21.53.08
https://video-edge-7e9704.sjc02.abs.hls.ttvnw.net/v1/segment/CuMEROTrbzxsoZXceR2DAyIortRw_JmvFSyxYl8_iFwM4GBv7lXGi4ALAx8qSQViAagoZi9AbZP513jLH30nQDtxfMEyClbNgK8yivjsjecMCnthHkXzq76ERWtY9D8pTy89HMvx84pvdbNiwx5FKBk7H7JblhGkCPOZlyORFlcsXi9xtnxMeddnKH9sM4nsjef03IPES5oSp0dg0-K1I9ASv-peg5DpAfJKvB3AYJK37fQe-P2RsZLqUfa87EGP9fhSYd8jDqm5eeo4pgKNMikqsORekCUAqO1wqv0g1QFffNs7YRsN5ieufB3JwpkFpuSS942KfrbOJb2O8kWXB7OFizQg-Uk7jo4aIEn5BuIxTPOYBYVQsUd0Xca5SgFANmxJUwVDwkuEEdT8OlzXIY-QGzEJcY-RS3DsgVYFbtH18ORJnxHPQS5tw46cJsMWEzmmCjHUviKmigjbh5SuJJJ8TYWaUzqkZ9B05W8lpJ7VVgcOU18lukzW4VVrVaZTgCCyJ7YOqjQQXsGfUotSlXipB1ofhPmnFqrq8m5vv_NiizaOkSwx6jWZdO6UvtxIKSALksAKHg4mq6KBwsNpJ1cTDd1u_i229ldbzcKEvn2mFwYzvDuHpUSS5cH6Hy-TBjIrY_AAM4bDZs5Fq93cfL0cTTWHBCX7M1PaZldTgzUBJynPzfvdXffxGBt1pNS_g1OE8z6WU3ebl_8lfI7-UXU2546YcciDxrRxA5BGcHNhgCs7y2Jz0Nlhd1UzlimLgS3ysWD5mkqkyJdIk9MtOX3z7zyWoYqQHXE-opMKvigMcyKJMUUSEN4b5mD5LT6OACqnwgsq3uMaDDr5h7O1lM4aPeKH-g.ts
#EXT-X-PROGRAM-DATE-TIME:2018-08-28T04:25:10.013999996Z
#EXTINF:2.002,b831d344be5bf2916f4ecb8e1b769e33-08-24-2018-21.53.08
https://video-edge-7e9704.sjc02.abs.hls.ttvnw.net/v1/segment/Ct0DqWYvbqt2EKxAf4rBW52ORTtSYFiERpIX0HTR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SqdOXETKPwTFVxOy5FsSXPk9mWBs5huMjkD-M5rOIvqg7ZFLKAYVZQMBigUTffvCgLAbFB-1NNTHQu-EFIK8flmZyz74oG5_2sBtH6UD3PEyDeZO2NIVw35T1ZaUCWs8mmqqWFzSv8YVw3h4lYjTxu8D0_NI5ZQs3i88bX6DYwcyOZns9-rIunTDheoecKZEftlZeG7eleClV5KdBDct0FnDwKjrfhgCq6As9rojdye-XdMLxsrnZGola6P589UuqWk6-z7LL1AQ0iccXfyVCBEhDJCpQn4zu7uslIBRUuZ4kMGgyL9Mkr_1xN1rnhajM.ts
#EXT-X-PROGRAM-DATE-TIME:2018-08-28T04:25:16.019999993Z
#EXTINF:1.150,b831d344be5bf2916f4ecb8e1b769e33-08-24-2018-21.53.08
https://video-edge-7e9704.sjc02.abs.hls.ttvnw.net/v1/segment/CuMEeiIQfuAtw-q6S8ci5G_uD1tnwREzHdq4fBFiWAydLFVTnUgYY6y7IRNMJCI_PQqP6sjSmOUHCHVLy7VnPTP_U-2XPRCnvv_vPw8ELddRirrQfwPgAh-g2xLzvAMAR9-Wqyo46NJCEDyoufWqnD2G1jhKMQCBrlxNqLjfGjqrAAFmE2fifZEbxryHB11dDa0LJn04LGVg9_wVhrhkJvZInCPvrCUlOoZB5df0OYSv1_IInpNidg6eaTWK0PtLu4hYez9qYAJ-Jv9wyciu3nUxyThNI-Cijkijp62LWnw4fEWNGyuhjSEGd8u2yUlBowW-Djc0yKYfnp3ZLW2SVAEIYDZAoOfGfBVcZt70Rac7VTNaDNp3O1toF7hmuUCH1DlZ1jklhA4B-UmpkWxATZUO-vcxZcLfEICCL_BgKRlk2AORuosir4Hfi_ATwGJ3F1ietXVgsgnjlQc8XDN5uXGxGsbaiH_42I9zhFzclh08J1SoC_4LC5R8wer8TprijRz2iNaeA5nRdLRjvkpDZQEK7A4VdNSw6YsP_HQK5dnC-OrXLdXvXYOojhedVWDjCrb6CQ6-TRqCtnGPQjRAvYfyoVPX8ykh03hvnVcUWRd_lzpCQXqlzFd-vewSoelWEmhUXjZxV3BNmiVAmFBxrZ9uq_qol9K3c_opuKw-peDA3snehkkv4iufKR3b26zylCN-20HcRDiiheAlbIhofI_KI6j9ya8P_W7eYKXlOavZhXzGbQdoPYTH0zQfBXjorJoLcZvZpeKcue2FCp33Yxhta1PzY36sE2alDPws9AzgpK2W03oSEHm0jR0WNRU0cJg1HgkvnYEaDJ5XE88kHklKG1XHGg.ts

We likely need to look a couple requests behind this one to make sure. For what we block. An aside - adding here to reference later. Below is the experiments.json request, which responds with mappings containing experiment IDs that twitch is running. Noting so we can put this on file for debugging.

Call that twitch makes for the experiments: Request URL: https://www.twitch.tv/experiments.json

Note: Import for human-readability: Response_with_the_experiment_mapping_ids.txt

Here's what I think we're seeing here:

  1. The video player SDK makes an ad request to the video ad server.
  2. The video player appears to block Amazon ad requests. I'm seeing something google-related which may or may not be a factor here.
  3. Most of these live/longform vod player configs will have a hard coded backup asset, which basically serves as a 1st party ad from the CDN that hosts the video content. Given that we observe Samsung ads, and that I see Samsung has sponsored takeovers across Twitch with ads disabled, it could be that Twitch has a Samsung video ad hard coded as the failover for the ad.
  4. The other possibility is that Twitch has a set of ad vendors in the player config, and we block some but not all of them.

Regardless of 3 and 4, both would result in inconsistent repro.

Corroborated by user(s): https://www.reddit.com/r/BATProject/comments/9avra0/twitch_ads_showing_while_using_brave_with_shields/

@Phistr90
Copy link

Apparently it should be possible, because with youtube-dl with mpv I can view twitch streams without ads...

@shadowhand
Copy link

uBlock Origin prevents ads from playing on Twitch. I'm not sure how, but I have never seen an ad on Chrome with uBlock Origin enabled. Started using Brave today and started seeing ads.

@Phistr90
Copy link

Phistr90 commented Jun 4, 2019

@shadowhand I am currently running ublock alongside brave shield. Works fine, no ads on twitch.

@jbenitosantoni
Copy link

Still having this same probem

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants