"Animated gifs are currently supported in Twitter Cards via the Player Card" – but how?


#1

Hi, the Photo Card docs currently say that "Animated gifs are currently supported in Twitter Cards via the Player Card."
https://dev.twitter.com/docs/cards/types/photo-card

However, there’s no mention of gifs on the Player Card page at all – it’s all written from the perspective of submitting an mp4:
https://dev.twitter.com/docs/cards/types/player-card

Does anyone know how to submit a Player Card that supports animated gifs?


#2

Thanks for the question. Developers have been using the Player Card for animated gifs; you can likely look at Giphy or Gifboom to see how they do it. Basically, it’s converting a GIF to a video, so it supports the start/stop controls approprlately.


#3

Just to clarify: You’re saying the developers are converting the GIF to a video, or Twitter is doing that when you hand a gif to the player card?


#4

Yes, that is how they’re doing it. This allows the play/pause buttons (and no autoplay) that our rules of the road require.

Thanks!


#5

Sorry, I’m not sure what “that” is referring to when you say “that is how they’re doing it.” I mentioned two possibilities:

  1. Developers are converting the GIF to a video
  2. Twitter is [converting the GIF to a video] when you hand a gif to the player card

Which of those were you referring to?

Thanks!
Adam


#6

Looking at the src of http://gifboom.com/x/771600be you can find the following:

<meta name="twitter:card"       content="player">
<meta name="twitter:player"     content="https://gifboom.com/p/771600be">
<meta name="twitter:player:width" content="480">
<meta name="twitter:player:height" content="270">
<meta name="twitter:player:stream" content="https://medias.gifboom.com/medias/0928a540746501330b2e723c91561e03.mp4">
<meta name="twitter:player:stream:content_type" content="video/mp4; codecs=&quot;avc1.42E01E1, mp4a.40.2&quot;">

So it appears that Twitter does not in fact support Animated GIF rather sites are converting the animated GIFs to MP4 and then referencing them. I think the reference to Animated GIFs on the photo page could refer to the ability of Twitter.com to convert uploaded GIFs to MP4 though this does not apply to the Player Card


#7

Is there a way to autoplay a short GIF using the Player Card?


#8

Player cards do not autoplay content.


#9

Is it possible to make the mp4 loop instead of just play one time through?


#10

Videos < 6 seconds have recently been enabled to loop as part of the Vine transition. I cannot comment on GIFs. I do not know if this applies to cards.