justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 381 forks source link

How to display Ads when using hls Stream #466

Closed Masegi closed 8 years ago

Masegi commented 8 years ago

Hi,

I've developed my own Twitch Chat Bot, it has a Point System, Giveaways, etc, but the Main Feature is the automatic Bet System. Everytime I start a Game, the Bot starts the Bet System, so Viewers can engage more in the Stream.

On the Web I made a special Theater Mode, so a Web 2.0 Menu is displayed besides Stream / Chat. But on Mobile this is not possible. I can load the Stream by hls but not connect to the chat, cause their is only a flash plugin afaik.

So I wrote my own Mobile App in Unity. It is able to connect to chat, show the stream and display the Bet Menu for the viewers, all working well, but now I would like to give this Bot away for free. I would also like to give the opportunity to use a special Version of my Mobile App. But I think their are no ads atm, and exacly that is the problem. Afaik I have to display the Ads, when the Streamer wants to (I can't even test it myself, cause I am no Twitch Partner).

Is their a solution so I can display the Twitch Ads in my App, or am I allowed to release this app like it is now? (their is a beta version on android store), apple is reviewing.

Thanks and Bye Masegi alias BlackmooreDD

Btw how can I contact Twitch Api Developers? I think only them can "allow" it.

Ribesg commented 8 years ago

I've got a similar request. I'm using HLS to display Twitch streams because the player doesn't really work, but using this I don't have ads. Is there a way to show ads while using HLS?

kayvink commented 8 years ago

Any updates on this?

Ribesg commented 8 years ago

I don't think Twitch wants to support this at all. I'm currently relying on their web player, and it sucks.

kayvink commented 8 years ago

You mean the iFrame? Looks good to me. https://github.com/justintv/Twitch-API/blob/master/embed-video.md

Ribesg commented 8 years ago

I'm not using the iframe because I need to modify the player. I'm using http://player.twitch.tv/ and I'm injecting CSS and JS in it. As anything on the web, it's highly unstable, especially on Android.

It's also unversioned and they keep "updating" it, breaking everything again and again.

It would be so nice if the ads were just inside the HLS stream... No Ad blocker possible (nice for them) and no problem using the HLS stream directly for us...

Masegi commented 8 years ago

I'm fine with the iframe on desktop with my ddbot.net theater mode, but I wasnt allowed to use the hls api, so I couldnt release my app for android/iphone.

after about two weeks they wrote:

"This is an undocumented private API for our own use.

Just because an api exists and is accessible does not mean you are automatically and freely allowed to use it. Yes, it’s open, but that doesn’t stop us from arbitrarily breaking applications that rely on it ( undocumented private APIs have no guarantees ) nor from taking legal action on unauthorized users ( due to violation of our API or Site ToS ).

It’s kind of like asking why you can’t just take food off the shelf at the supermarket without paying for it – Yes it’s there, yes you could technically do that; There would more than likely be repercussions for doing so."