Hi
Just read the post about SVT Play, and got curious to see if there was anything I could use in my plugin. So checking it out I noticed that it uses the plex flash player, which in turn uses SiteConfigurations.bundle/Contents/Resources/Plex.xml. But the contents is encoded somehow? Kind of looked like it could be base64 but that doesnt seem to work out at all… So how do I read these files (noticed that netflix and some others where encoded/encrypted like this too) so I can get inspiration and look around? Since the docs isnt the greatest yet (understandable), the available sources is the best way for me right now to get new ideas…
So, any solution?
Btw, the plugin is running against Headweb, a Swedish ondemand movie platform. If anyone (sorry, swedes only right now) is up for some beta testing, let me know! 
Best regards
Johan
Hello Johan,
I’m not sure why those two Site Config files are encrypted, but there’s not much inspiration to get from anyway. They look the same as any other Site Config xml (with play/pause and seekbar defined). The only difference is they work with players installed under the plexapp.com domain. Info on how to use those player can be found here: http://wiki.plexapp.com/index.php/Online_videoplayers
Using the Plex Flash or Silverlight players is only necessary in some specific situations.
Hi, thanks for your answer 
I’m pretty sure they are using the Javascript interface, which elan earlier told me about in another thread. Just wanted to take a look to see if there was anything new interesting there… 
I’m already using both Silverlight and Flash players with my own siteconfigs (Headweb uses both depending on content), so the basics are already solved.
The cool thing is that the new framework actually removes the need for a siteconfig if you use the Plex SWF =)
It’s like a universal site config. Handling RTMP streams are really simple now. Plex handles it all. Dont know what “your” site uses though. When we did “SVT Play”, we first started off with the v0 framework, and we had to make our own siteconfig xml, and the framework itself was really… clunky. But Elan and the rest of the team has worked hard on making the new version of the framework like a dream for us guys trying to create plugins.
If you are lucky Mattias will read this thread. He did most of the coding for SVT Play so he has a lot to share if there are any questions you need answering. If Mattias wont rear his ugly head, I think I can get some other help for ya if you want to.
If you need a beta tester for your app, Im always happy to help out btw. Good luck.
Cheers from a fellow Plex-Swede.
Not sure it will work flawlessly with the plex players, the flash version uses rtmpe (ie encrypted, altough I suppose the flash player should be able to run that too, however some commands are sent from FMIS that it might not handle “properly”). But for the Silverlight version it won’t work out of the box due to DRM (PlayReady) issues (ie it have to know the URL to license server etc).
Anyway, the basics is up and running fine, using v1 framework and JavaScript to interface with the players!
If you PM me your mail I’ll let you know when a beta is available, probably in a few days! 
Great work on SVT Play btw! 
Best Regards
Johan
Hi!
I worked on the Silverlight config for a bit, and this is how it looks like. Nothing out of the ordinary, but maybe a nice example of a javascript seekbar. The ply.sendEvent()'s are specific API calls for the Silverlight player used on the website (which is the JW WMV player).
The duration == 0 ? 0 : … check is to prevent errors when playing live streams.
<?xml version="1.0" encoding="UTF-8"?><br />
<site site="http://www.plexapp.com/player/silverlight.php"<br />
plugin="silverlight"<br />
initialState="playing"<br />
version="1.0"><br />
<br />
<crop x="0" y="0" width="0" height="0" /><br />
<br />
<seekbar type="javascript"><br />
<percentComplete equals="duration == 0 ? 0 : elapsed / duration * 100.0" /><br />
<bigStep minus="ply.sendEvent('scrub', position - (((position / duration * 100.0) - 10)/100.0) * duration)" <br />
plus="ply.sendEvent('scrub', position - (((position / duration * 100.0) + 10)/100.0) * duration)" /><br />
<smallStep minus="ply.sendEvent('scrub', position - 30)" plus="ply.sendEvent('scrub', position + 30)" /><br />
<end condition="isComplete == true" /><br />
</seekbar><br />
<br />
<!-- PLAYING --><br />
<state name="playing"><br />
<event><br />
<condition><br />
<command name="pause" /><br />
</condition><br />
<action><br />
<run script="ply.sendEvent('play')" /><br />
<goto state="paused" /><br />
</action><br />
</event><br />
</state><br />
<br />
<!-- PAUSED --><br />
<state name="paused"><br />
<event><br />
<condition><br />
<command name="play" /><br />
</condition><br />
<action><br />
<run script="ply.sendEvent('play')" /><br />
<goto state="playing" /><br />
</action><br />
</event><br />
</state><br />
</site>
Nice, thanks! But as you said, nothing fancy out of the ordinary (ie what I already got… :)). Interesting with the bigStep though! Maybe I should use something like that instead of 30sec “big” scan which I do now. Is 10% standard seek length for bigStep?
Another thing though… It seems I couldn’t get percentCompleted working for Silverlight streams last night… The scrub thumb just didn’t show. It works fine in my Flash player, but for the silverlight player it doesnt.
Both uses roughly the same siteconfig,
<?xml version="1.0" encoding="UTF-8"?><br />
<site site="http://api(.*)?.headweb.com(:[0-9]+)?/v2/player/plex/.*silverlight"<br />
plugin="silverlight"<br />
initialState="starting"<br />
version="1.0"><br />
<seekbar type="javascript"><br />
<percentComplete equals="hw.perc()" /><br />
<bigStep minus="hw.scan(-30)" plus="hw.scan(30)" /><br />
<smallStep minus="hw.scan(-10)" plus="hw.scan(10)" /><br />
<end condition="hw.atend() == true"/><br />
</seekbar><br />
...
hw.perc() returns an int between 0..100 in both cases, when testing the page with Firebug it works great (both SL and Flash), but in Plex it seems that it doesnt wanna play ball. Any known problems with this or shall I dig more?
Thanks!
Johan
I copied that part from the Site Config for the Flash player, not sure if Plex uses 10% steps with 'normal' videos though.
I use the Silverlight player mostly for live streams, so I haven't paid much attention to the seekbar. I'll look into it!
Hm, maybe Plex expects a float value for instead of an integer, (hence the 100**.0**).
Hm, disregard that “bug”… It seems to be working just fine now…
Although I have to seek a bit in to the stream to see it, I guess that was my problem (combined with tiredness or something:)).
Sorry to waste your time on that!
But does anyone have any ideas about the format? Just curous… but why is some encoded/encrypted?
Encryption is applied to certain files to make it more difficult for websites to find out how to single out Plex’s browser component and block it. It’s been quite effective in limiting how frequently certain providers break compatibility.
Ah, I see, well that makes sense…
Mystery solved, thanks! 
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.