Video returned as type "photo" in extended_entities


#1

With the latest update, those on the API appear to be again behind.
Here is the json back from the Neil Patrick Harris tweet today https://snap.apigee.com/1y3heLo
As you can see extended_entities shows “type”: “photo”

"extended_entities":  {
"media":  [
   {
    "id": 560049056895209500,
    "id_str": "560049056895209473",
    "indices":  [
      64,
      86
    ],
    "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/560049056895209473/pu/img/apUFQOR0KnjekwfP.jpg",
    "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/560049056895209473/pu/img/apUFQOR0KnjekwfP.jpg",
    "url": "http://t.co/SGQ3oJHDqZ",
    "display_url": "pic.twitter.com/SGQ3oJHDqZ",
    "expanded_url": "http://twitter.com/ActuallyNPH/status/560049149836808192/video/1",
    "type": "photo",

#2

That’s right. Internally they already do it right, so I hope they roll this out to the public together with the GIF changes next week:

"extended_entities": { 
        "media": [ 
            { 
                "id": 560049056895209500, 
                "id_str": "560049056895209473", 
                "indices": [ 
                    64, 
                    86 
                ], 
                "media_url": "http://pbs.twimg.com/ext_tw_video_thumb/560049056895209473/pu/img/apUFQOR0KnjekwfP.jpg", 
                "media_url_https": "https://pbs.twimg.com/ext_tw_video_thumb/560049056895209473/pu/img/apUFQOR0KnjekwfP.jpg", 
                "url": "http://t.co/SGQ3oJHDqZ", 
                "display_url": "pic.twitter.com/SGQ3oJHDqZ", 
                "expanded_url": "http://twitter.com/ActuallyNPH/status/560049149836808192/video/1", 
                "type": "video", 
                "sizes": { 
                    "small": { 
                        "w": 340, 
                        "h": 340, 
                        "resize": "fit" 
                    }, 
                    "thumb": { 
                        "w": 150, 
                        "h": 150, 
                        "resize": "crop" 
                    }, 
                    "medium": { 
                        "w": 600, 
                        "h": 600, 
                        "resize": "fit" 
                    }, 
                    "large": { 
                        "w": 720, 
                        "h": 720, 
                        "resize": "fit" 
                    } 
                }, 
                "video_info": { 
                    "aspect_ratio": [ 
                        1, 
                        1 
                    ], 
                    "duration_millis": 30008, 
                    "variants": [ 
                        { 
                            "bitrate": 832000, 
                            "content_type": "video/webm", 
                            "url": "https://video.twimg.com/ext_tw_video/560049056895209473/pu/vid/480x480/gj_fzyk29R9dMPBY.webm" 
                        }, 
                        { 
                            "bitrate": 832000, 
                            "content_type": "video/mp4", 
                            "url": "https://video.twimg.com/ext_tw_video/560049056895209473/pu/vid/480x480/gj_fzyk29R9dMPBY.mp4" 
                        }, 
                        { 
                            "bitrate": 1280000, 
                            "content_type": "video/mp4", 
                            "url": "https://video.twimg.com/ext_tw_video/560049056895209473/pu/vid/720x720/S7F4BF2wKR2txCpA.mp4" 
                        }, 
                        { 
                            "bitrate": 320000, 
                            "content_type": "video/mp4", 
                            "url": "https://video.twimg.com/ext_tw_video/560049056895209473/pu/vid/240x240/v5jqpUNnkaeuVZbx.mp4" 
                        }, 
                        { 
                            "content_type": "application/x-mpegURL", 
                            "url": "https://video.twimg.com/ext_tw_video/560049056895209473/pu/pl/udxtIM8FytsAE4HQ.m3u8" 
                        } 
                    ] 
                }, 
                "features": {} 
            } 
        ] 
    }

#3

Good news is that it looks like we will get this shortly Twitter Video support in REST and Streaming API


#4

Yup - I just needed to wait for that official announcement post to hit before pointing it out - glad you’ve seen it :slight_smile: