SebastianRask / Pocket-Plays-for-Twitch

Open source Twitch client for Android
GNU General Public License v3.0
62 stars 14 forks source link

Ads now autoplay before streams #20

Open jeffjack00 opened 5 years ago

jeffjack00 commented 5 years ago

Ads now play before a stream when previously (in all past versions of Pocket Plays) ads were bypassed. Restoring this feature would be greatly appreciated.

SebastianRask commented 5 years ago

Twitch changed how ads are shown. Can't do much to bypass them.

If you download previous versions of Pocket Plays, which were previously ad free, you'll now see ads.

jeffjack00 commented 5 years ago

alright. thank you for your quick reply.

alexzorin commented 5 years ago

Can't do much to bypass them.

The stream segments for the ads are clearly marked in the m3u8, so you can "pretend" to stream the preroll ads and just refresh the playlist until you start getting real stream segments.

Not as good as true circumvention, but at least you can save your eyes and ears until the stream is available.

Streamlink currently has a PR open on its Twitch plugin that does this - worked great for me when I tried it.

It seems like it's still possible to entirely skip the non-prerolls as well.

I'm going to try the same strategy in my Pocket Plays fork when I get some time ...

SebastianRask commented 5 years ago

The stream segments for the ads are clearly marked in the m3u8, so you can "pretend" to stream the preroll ads and just refresh the playlist until you start getting real stream segments.

@alexzorin Have you gotten this to work? I am working on a complete rewrite of Pocket Plays and wondering how to best implement this.

alexzorin commented 5 years ago

Have you gotten this to work?

Kinda. I replaced the video player in Pocket Plays with ExoPlayer, and then applied a lot of hacks to ExoPlayer to track SCTE35 segments and mute the audio while they play. Extending ExoPlayer to do what I wanted was really painful and I just left it at muted ad audio (and frustratingly, I stopped getting ads while I was working on it).

https://github.com/streamlink/streamlink/pull/2372/files was the PR I worked off to get things going

SebastianRask commented 5 years ago

Thanks! I'll see if I can get something working