[This is preliminary documentation and subject to change.]
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The PlayOn Plugin API is included in the Util.dll assembly included with the PlayOn installation, located in the main application installation directory (usually C:\Program Files\MediaMall).
To create a plugin for PlayOn, you must compile a .NET 2.0 assembly that implements both IPlayOnProvider and IPlayOnProviderSettings. These two interfaces define the metadata and stream source logic for a given content provider, as well as descriptive information used in the Plugin tab of PlayOn Settings.
The main classes of interest for creating a PlayOn plugin are listed as follows:
- IPlayOnProvider
- IPlayOnProviderSettings
- IPlayOnHost
- Payload
- AbstractSharedMediaInfo
- SharedMediaFileInfo
- VideoResource
- AudioResource
- ImageResource
- SharedMediaFolderInfo
After compiling a PlayOn plugin, simply rename the DLL assembly to have a .plugin extension, and place it in the plugin subdirectory of the main PlayOn application installation directory. The PlayOn server will automatically detect and attempt to load all .plugin assemblies found in this folder, as well as all dependent DLL's in this folder.
The main entry point for a plugin is through IPlayOnProvider.GetSharedMedia. This method will be invoked by the PlayOn server (IPlayOnHost) in order to query the plugin for metadata for folders and video streams. The GetSharedMedia method returns a Payload object, which is basically just a List of SharedMediaFileInfo and SharedMediaFolderInfo instances, which are then converted into DLNA XML to be sent to the client for display. Whenever media is requested, the IPlayOnProvider.Resolve() method is first invoked, which gives the plugin an opportunity to do any custom processing of the media URL, if necessary.
Classes
| Class | Description | |
|---|---|---|
![]() | AbstractSharedMediaInfo | Abstract superclass for metadata for ContentDirectory items. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated. |
![]() | AudioResource | Contains metadata information suitable for a ContentDirectory service based on a local or online audio file. |
![]() | ImageResource | Contains metadata information suitable for a ContentDirectory service based on a local or online image file. |
![]() | Payload | Contains arbitrary items in a list that can be sent between applications. |
![]() | SharedMediaFileInfo | Contains metadata information suitable for a ContentDirectory service based on a physical media file or online media stream. This class is abstract (MustInherit in Visual Basic)abstractMustInherit and so cannot be instantiated. |
![]() | SharedMediaFolderInfo | Contains metadata information suitable for a ContentDirectory service based on a physical or virtual folder. |
![]() | VideoResource | Contains metadata information suitable for a ContentDirectory service based on a local or online video file. |
Interfaces
| Interface | Description | |
|---|---|---|
![]() | IPlayOnHost | Main interface that hosts a content provider plugin. |
![]() | IPlayOnProvider | Main interface for content provider plugins. |
![]() | IPlayOnProviderSettings | Main interface for content provider plugins to specify PlayOn Settings components and logic. |

