Closed uchigawa closed 11 years ago
The problem with that is getting the metadata for syncing. Because JWPlayer supports so many formats, both live and static, I have no way of knowing (1) Whether or not I need to synchronize clients at all or (2) if it's a static media type, how long the video is.
Right now you can technically add whatever you want by prefixing it with jw:
(I don't restrict the URLs you pass to it), but it won't synchronize. I can probably make it function when someone is leader, but I don't think I can make it work with server lead because of the lack of metadata.
I can look into it, but for now you might as well stream the files over RTMP (I recommend crtmpserver if you want to host it yourself, or you can trivially set up a script to stream to Twitch/other stream service).
Oh, I didn't thought about that. So it's harder than I imagined.
I think we could add duration time manually, something like
~/videos/file001.flv?time=4:08
So if you could look into it and check is synchronizing possible at all... I care most about FLV files, other formats we can convert, it's not a problem for me.
I looked at JWPlayer's API, and they support all the synchronization controls I need clientside. With leader synchronization would definitely work.
I generally try to avoid trusting the client with metadata, but I might have to make an exception for JWPlayer.
https://github.com/calzoneman/sync/commit/3ebf4a100950a0cca79b698c462f95aff9507451
Adding serverside support for non-live JW content would require nontrivial changes, so I won't do that for now. There's a popup box when you queue a jw link to remind you that non-livestreams will only synch if there's a leader.
I see JW Player is implemented, so why don't let watching media files (flv/ogg/mp4) from any direct URL? I have many files on my own servers and it would be very convenient to me adding just a simple link instead of uploading files to YT/Vimeo etc., no to mention some files I can't upload because of copyright policies.