I'm currently working on a plugin for a videosite, where I have control (as in code) over the player (or players, it is using both silverlight and flash depending on content).
All this siteconfig-working-with-pixel-locations and all is an innovative and impressive solution, but I'm thinking.. Both Flash and Silverlight allows communication with the host document, so if one have control over the player, I could let it call JS functions with status updates (seek position, playback status etc), and the other way around, let JS functions call the player (play/pause/seek).
What my question is, as you might guess, what would I need to do to utilize this in PMS? What changes would be required?
I haven't been able to find the source for the PMS (maybe I just need someone pointing me in the right direction, but I downloaded the Plex source from github and couldnt find it?) so I don't really have any clues about the inner workings of these parts. I'm not very familiar with webkit, but I guess it shouldn't be impossible to let the application using it interact with any javascripts on the rendered page?
You should be able to get this working with your player without much trouble. The $ is replaced with the player object.
The source for the Media Server is closed, at least for the moment. However, let me know if the above doesn't work for you, and I'd be happy to assist you more!
Cool, thanks Works great, implemented pause/play & seek now. Haven’t seen much more features in the other siteconfigs though… There is a few features (some more, some less, “realistic”) that I’m thinking about:
Extracting duration/position (instead of just percentComplete)
When aborting a movie prematurely (Esc), store position and when restarting it, pass it somehow; just like normal local video items (“Play from 05:22”)
Extract information about available subtitles, and sending back info about chosen subtitle (in plex GUI)
Also, is there any cookie sharing between the HTTP python class (HTTP.__cookieJar) that my plugin utilizes, and the WebVideo playback (webkit?)? Or will I have to pass any identification strings on the URL?
Otherwise, this looks great! Both Silverlight and Flash implemented here…
We'd like to definitely add this at some point. For some sites (e.g. Hulu) might not work great because bit skips force commercial breaks.
No plans to do this at the moment, I think I've only seen one or two sites that offer the subtitles, and synchronizing the Webkit video with subtitles doesn't seem very doable.
There is not any sharing at the moment.
The next version of Plex will allow plug-ins to set bitrate on individual video items.
Okay, just seemed like it would be pretty related to the percent function, this is probably on the top of my whishlist.. :)
Okay
Ah, the way I was thinking was when the Flash/Silverlight player plays the subtitle itself:
1. Player loads
2. PMS asks player for available subtitles (ie $.getSubs() which might return {1:English, 2:Swedish, 3:Danish})
3. The available subtitles are presented in the regular subtitle menu.
4. When a user selects a specific subtitle, PMS performs another call to the player, ie $.setSub(1) for English in the above example.
I realize that this probably won't be usable on that many sites though... So.. if you have no interest in implementing this, but feel that you could release (privately or publicly) the code, I'd be glad to take a look at it!