Twitch.tv plugin (some help needed)



Hi all!

Tonight I tried to implement a twitch.tv plugin for grilo. This is as
far as I came: https://gist.github.com/moonlite/9ac0f454c0ca830aba1a

Some questions:

 – The twitch API uses the following flow to get the video stream URI's:
   1) GET https://api.twitch.tv/api/channels/:channel/access_token
   2) Unpack the JSON payload and extract the sig and token fields
   3) The stream is now:
http://199.9.251.155/api/channel/hls/:channel.m3u8?token=:token&sig=:sig

   Is it possible to let my lua-script return a function for 
   retrieving the sig and token values? I'm fairly sure I'm not supposed
   to find these values before I request the stream (running n HTTP-
   requests whenever I load a list of streams seems bad, plus I know
   from experience that the token can get outdated).

 – I would like to be able to browse Twitch like this:
   /Top Channels/{stream}
   /Games/{game}/{stream}

   That is with "sub-folders" at least three deep.
   Is this possible in a Lua-plugin? I see that the Rai.tv does it, but
   that's also implemented in C.

 – How do I ship an icon with my plugin?

Regards,
Mattias



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]