Tv4play

From Umeå Hackerspace
Jump to: navigation, search

Gah, found documentation here: http://mobapi.tv4play.se/apidoc/Play/Migration/VideoAssetsController.html


GET http://mobapi.tv4play.se/play/migration/mobile/program_formats/list.json?premium_filter=all&sorttype=alpha&name=pokemon&
GET http://mobapi.tv4play.se/play/migration/mobile/programs/search.json?includedrm=wvm&video_types=clips&text=pokemon&sorttype=date&start=0 HTTP/1.1

GET http://mobapi.tv4play.se/play/migration/mobile/programs/search.json?livepublished=false&text=pokemon&includedrm=wvm&video_types=programs&sorttype=date&start=0"

{"total_hits":511,"results":[{"allowembeded":true,"category":"Pokémon","categorypath":"Barn/Pokémon","categoryids":["barn","pokemon"],"drm_formats":[],"full_program":true,"hideads":true,"hideplayerlogo":false,"keywords":[],"largeimage":"VMan-P2207468.jpg","lead":"Del 50 av 51. Japansk tecknad serie från 2010. I 50 avsnitt. Ash Ketchum har en licens som ger honom rätt att fånga och träna pokémon för att vinna pokémonligan. Frågan är om Ash ska lyckas fånga alla, det finns nämligen andra som gör allt de kan för att hindra honom.","livepublished":false,"metaimage":"http://img.tv4.se/?resize=[width]&source=VMan-P2207468.jpg","mobilecoded":true,"name":"Pokémon del 50","offdate":202201010000,"ontime":201208050725,"originalimage":"VMan-P2207468.jpg","premium":false,"preview":false,"product_group_ids":[],"product_placement_info":null,"publishdate":201208050725,"requires_authorization":false,"tabletcoded":true,"vmancategoryid":null,"vmanprogid":"2207468","href":"2207468","thumbnail":"VMan-P2207468.jpg","channel":{"about":"I TV4 samsas Sveriges mest storslagna familjeunderhållning med nyskriven svensk dramatik, serier, spänning, initierad sportjournalistik och de senaste och bäst presenterade nyheterna. Nyhetsmorgon är dessutom Sveriges enda morgonmagasin som sänder 365 dagar om året. Tittarna väljer TV4. Se TV4 live här!","links":[{"link":"http://www.tv4.se/tablå","name":"Till tv-tablån"},{"link":"http://tv4gruppen.se","name":"Läs mer om TV4Gruppen"}],"logo":"tv4.png","name":"TV4","nid":"tv4","position":0,"video_asset_id":"2219145"},"availability":{"availability_group_free":"30+","availability_group_premium":"30+","geo_restricted":true,"live":false,"human":"Det här programmet är gratis i 30+ dagar efter sändning. Med TV4 Play Premium kan du se programmets hela säsong (-51 dagar till), utan avbrott.Programmet kan endast ses i Sverige.","groups":["7","21","30","30+"]},"nid":"pokemon","episode_id":131977}
GET http://premium.tv4play.se/api/mobil/asset/2206224/play?protocol=hls&videoFormat=MP4+WVM+SMI& HTTP/1.1

HTTP/1.1 200 OK
Date: Tue, 07 May 2013 11:40:59 GMT
Server: Apache/2.2.23
X-Powered-By: Servlet 2.4; JBoss-4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181417)/JBossWeb-2.0
Set-Cookie: sumoSession=deleteMe; Path=/; Max-Age=0; Expires=Mon, 06-May-2013 11:40:59 GMT
Set-Cookie: sumoSession=deleteMe; Domain=.tv4play.se; Path=/; Max-Age=0; Expires=Mon, 06-May-2013 11:40:59 GMT
Cache-Control: no-cache
Content-Encoding: utf-8
Content-Length: 1366
Access-Control-Allow-Origin: *
Keep-Alive: timeout=2, max=100
Connection: Keep-Alive
Content-Type: application/xml;charset=UTF-8

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<playback assetId="2206224">
.<title>Pok..mon del 49</title>
.<live>false</live>
.<aspect16x9>false</aspect16x9>
.<drmProtected>false</drmProtected>
.<playbackStatus>OK</playbackStatus>
.<hasItems>false</hasItems>
.<liveBroadcastTime>2012-07-29T07:00:00+02:00</liveBroadcastTime>
.<items>
..<item>
...<log uri="/api/mobil/asset/2206224/play/log/21524913/"/>
...<bitrate>2500</bitrate>
...<mediaFormat>mp4</mediaFormat>
...<base>http://tv4play-i.akamaihd.net/i/mp4root{path}/{filename}.csmil/master.m3u8</base>
...<url>http://tv4play-i.akamaihd.net/i/mp4root/2012-07-21/pid3358529(2206224_,T3MP43,T3MP48,T3MP415,T3MP425,).mp4.csmil/master.m3u8</url>
..</item>
.</items>
 .     <logData>7AA3B6DA32B721A4C76C3E9043893F26F1ED753CCEDEF273022D77F210C6A4E0DB90F73F2A2197F489FC7EFEE8ADAC402780274D7ED4995AC370BB702C65FD81343ADE8053605E783BBBD0FD39BF 59BB5AA90D322420E8A3E0B25A8C92540D27760EBD02566141B7E1203D9650948F843A28F6CE9D79367207F3B73A1357FAF72B3B68FD22C49106E253202BE8C6F9995966661CAF0779FEF0896DC89F54E35948D5D434D69D0B857E3372A38D92DB51380A2E28D3B4F7436A9D9DCED7CE14FDC379BE1695BCCD771161D3EDE8F2450D3EB920405A4CA12E702795EA1F06130EE353C8FD86ACC71AB8370A03752D4E04470E41B7550B8453E5DA3BF7FFC83E71B3754BBAB733B293CBDB884AB89C7A96DAECC4B2BB37C1CE5D0AE96E1870D24FF9992ABBD952FF6B42BE0F2ADDBCC480</logData>
</playback>