Skip to content

Commit

Permalink
Add README.md and LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
instance01 committed Sep 17, 2018
1 parent fbef96c commit 9a823ed
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 InstanceLabs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Motivation

Twitch is playing a 15-30 second advertisement when one starts to watch a new channel. For people who jump around a bit this is pretty annoying.

Twitch staff has been fairly quick to fix low hanging fruits that disable advertisements from the client side. Since they're able to inject advertisementst into the HLS stream directly, I believe such fixes will not always be available.

This chromium extension monkey patches the web worker (among others) Twitch uses and edits the m3u8 playlist that gets requested every few seconds to simply remove segments that are marked as advertisments (using SCTE-35 flags).

Right now Twitch also makes the actual stream available in those playlist files after a few seconds, which means that just after around 5 seconds the real stream begins, instead of 30 seconds of advertisements.

# Installation

Currently this extension is not on the chrome webstore, but I might upload it eventually.

To install manually:

1. Check [releases](https://github.com/instance01/Twitch-HLS-AdBlock/releases) for the latest zip or download the source
2. Unzip into a directory and keep the directory in mind
3. Go to chrome://extensions/ and enable Developer Mode
4. Click on 'Load unpacked' and go to the directory with the extension (see if manifest.json is in the directory)


# Limitations

Generally it seems to work fine. Whenever one loads up a new channel, if there's an advertisment injected by Twitch, after a few seconds of loading the real stream begins without any indication of an advertisment. Additionally there is a few seconds of buffering after 30 seconds (or maybe that's my shitty connection).

However I've seen rare instances where the stream breaks, which requires a browser reload. This happened once when the advertisment loaded 2-3 seconds after the stream has started normally.

Currently this is only tested on the latest stable chromium browser, but Firefox support (if not already working) will definitely follow shortly.

# Contributing

I appreciate any contributions, be it pull requests or issues. Right now there's no tests however, so make sure to test extensively on Twitch before submitting a pull request.

0 comments on commit 9a823ed

Please sign in to comment.