When I try to pass the url through Video Player though, it says "Cannot read file." I even tried replacing. With just any video player, I can view each video file just fine. You need to re-request this file every few seconds as your buffer runs out, and request the new clips in it to keep your playback Bigham is there anyway to do this just using the default unity video player?Įverything you've said so far has worked great! With just chrome, I'm able to open the. The list is about 6 files long, so if you request them all you can get about a 6 second buffer.Įvery second or two, index-live.m3u8 is updated and older files roll off as new ones are added to the bottom. It will be an MPEG-4 stream about 1 second long. You then swap out index-live.m3u8 with the name of a file in the list and request it to get that clip. That file contains a list of files names for the last few seconds of the live stream (and some other meta data). In the end, the javascript will build an access token then use it to request a file called index-live.m3u8 from one of the twitch edge servers. You'll have to inspect a current twitch page while a stream is playing to see how the javascript builds the request (url and headers). There's a few steps to get the right URLs requested from twitch, and that can change over time. So if you can render that in Unity, then you can render twitch streams. Ultimately the stream coming from twitch is MPEG-4 (H264/M3U).
0 Comments
Leave a Reply. |