justintv / Twitch-API

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

missing webkit-playsinline needed for inline video #521

Closed jasongornall closed 8 years ago

jasongornall commented 8 years ago

https://discuss.dev.twitch.tv/t/inline-param-for-new-embedded-player/3934

It seems the discussion got closed? I'm pretty sure this used to work and I am now seeing that it doesn't. This is huge for app developers showing a video that doesn't take up the entire app

image

from https://www.reddit.com/r/Twitch/comments/3n4q0s/embedding_html5_player_into_site/#cvku95c

I know this used to work (was something like)

<video autoplay="" height="100%" image-fit="contain" webkit-playsinline="" width="100%" poster="http://static-cdn.jtvnw.net/previews-ttv/live_user_cohhcarnage-640x400.jpg" src="http://usher.justin.tv/api/channel/hls/cohhcarnage.m3u8?token={&quot;user_id&quot;:null,&quot;channel&quot;:&quot;cohhcarnage&quot;,&quot;expires&quot;:1447454896,&quot;chansub&quot;:{&quot;view_until&quot;:1924905600,&quot;restricted_bitrates&quot;:[]},&quot;private&quot;:{&quot;allowed_to_view&quot;:true},&quot;privileged&quot;:false,&quot;source_restricted&quot;:false}&amp;sig=7e4d403a23a415a309404e37e4b943c23d0477b3" controls="controls"></video>

what I am seeing using this code

<div id="wakka"></div>
<script type="text/javascript">
    $.getScript('http://player.twitch.tv/js/embed/v1.js', function() {
      var options, player;
      options = {
        width: 854,
        height: 480,
        channel: "monstercat"
      };
      player = new Twitch.Player("wakka", options);
      return player.setVolume(0.5);
    });
</script>
<video autoplay="" src="//usher.ttvnw.net/api/channel/hls/monstercat.m3u8?allow_source=true&amp;token=%7B%22user_id%22%3A57224772%2C%22channel%22%3A%22monstercat%22%2C%22expires%22%3A1458684425%2C%22chansub%22%3A%7B%22view_until%22%3A1924905600%2C%22restricted_bitrates%22%3A%5B%5D%7D%2C%22private%22%3A%7B%22allowed_to_view%22%3Atrue%7D%2C%22privileged%22%3Afalse%2C%22source_restricted%22%3Afalse%7D&amp;sig=18bee8ee59d0892786426b6f527f312c8e575243"></video>
nbabanov commented 8 years ago

Please guys, the implementation of this simple option, should not be a big hassle.

jasongornall commented 8 years ago

bumping this feels like low hanging fruit

pinkfloyda commented 8 years ago

Hi, recently I want to embed twitch player into my ios app, but this issue seems not working in iPhone, can anyone take a look? Otherwise I have to switch to iPad, by the way.

DallasNChains commented 8 years ago

We added this capability! When using the interactive JS embed, you can add playsinline: true to the options object. :)

robin-backlund commented 5 years ago

Still cant get the playsinline to work. I tried with a simple iframe or the interactive twitch embed and neither works.

adeolaex commented 3 years ago

@DallasNChains This seems to be a regression. The playinline attribute neither works nor is it in the offical documentation. Any feedback would be appreciated.

DallasNChains commented 3 years ago

Hey, @adeolaex, I haven't worked at Twitch since 2018, so I can't help unfortunately. I would try tweeting to @TwitchDev to see if they can help.

adeolaex commented 3 years ago

Oh wow !

Sorry didn't know you stopped working there. Thanks for the reply, I was able to get it working by setting a flag allowsInlineMediaPlayback over the swift side of things.

Thank you.

3ventic commented 3 years ago

@adeolaex this repo isn't actively used or monitored anymore; for active API issues, please refer to https://github.com/twitchdev/issues instead.