Re: Re: playlist
Home › Forums › Third Party Enhancements › VLC Shares › playlist › Re: Re: playlist
@dynamitemedia wrote:
That is exactly what i am looking to do as well is add my Navi- X playlists…
I spoke about this via email but better here…
After looking at your plugins i am very confused about the style of PHP programming going on there. can we use basic PHP to do this?
also i think since they are using processors to get the actual URL to the video file that could be even more work, hmmm
VLC Shares plugins are a simple class… more basic than this?
Navi-x processors…. are implemented in vlc-shares as Hosters plugin. In vlc-shares Hoster Classes resolve resource url to playable stream url (for example resource url like http://www.youtube.com/watch?v=….. are resolved to the real stream url….)
If you want to use PLX Playlists (Navi-x playlist format) you have to write a plugin that read the Plx file and allow to browse through playlists chain too.
Online Library plugin can’t do this now, but if you want to extend it and add support for playlists you are welcome. All patches are welcome :). But the thing is: if you have to write your playlist manually, why just not add those inside online library directly? 🙂
I know, most of vlc-shares parts are not written in a simple form (there are a lot of __magic methods calls… etc etc), but you don’t have to know about how all vlc-shares is written. The only thing you need to know is how to create a plugin class:
plugin class have to extend the class X_VlcShares_Plugins_Abstract (https://code.google.com/p/vlc-shares/source/browse/trunk/core/library/X/VlcShares/Plugins/Abstract.php). For plugin that are created to parse contents it’s a good option to implement the X_VlcShares_Plugins_ResolverInterface (https://code.google.com/p/vlc-shares/source/browse/trunk/core/library/X/VlcShares/Plugins/ResolverInterface.php)
Then, in your plugin you only have to implement triggers you want to use (and give them priority in class constructor). For your case:
X_VlcShares_Plugins_Abstract::getCollectionsItems(): to add an item inside the collections index (http://localhost/vlc-shares/index/collections)
X_VlcShares_Plugins_Abstract::getShareItems(): this trigger is need to browse inside your contents (using the /l/ param value). (http://localhost/vlc-shares/browse/share/p/YOURCLASS/l/LOCATION_PARAM_VALUE)
X_VlcShares_Plugins_Abstract::preGetModeItems(): if you want to add a “Watch directly button” for playable items when selected
X_VlcShares_Plugins_ResolverInterface::resolveLocation(): to resolve a location param value (the /l/ param inside the query url) to a real stream url
X_VlcShares_Plugins_ResolverInterface::getParentLocation(): to give a parent location param value for a given location param
That’s it. You don’t need to do anything more for basic features.
A lot a optional apis are also available (for example configurations/i18l/acl/cache/….), but none of them are mandatory. You can use them if you want or you can ignore them completely.
The other mandatory thing you have to do (to make your plugin installable) is to create a manifest file, following examples like this one or documentation: https://code.google.com/p/vlc-shares/source/browse/trunk/plugins/hulu/manifest.xml
There is a complete tutorial for plugin creation (covering from how to setup a development env to develop plugin easly to how to package them), but i wrote it in italian and i’m still waiting for someone with better english-skill than mine to translate it…….. waiting for the messiah you can use google translate… 🙂 (https://code.google.com/p/vlc-shares/wiki/HowToNewPlugin054It). Some things about 0.5.5, StreamerEngine Api/Threads Api/PageParsers Api are not covered in the tutorial because they aren’t documented yet and 0.5.5 is not stable yet and it will not be stable for at least 6 month :), but last plugins created (for example Hulu or WeebTv) use them. You can see how to use some these stuff from the code.
