Jamcast Server is a powerful content delivery platform that interoperates seamlessly with thousands of network-connected devices. Using the new Jamcast API, programmers can bring new content to Jamcast Server by building and deploying plugins. With the information below, you'll discover that building plugins for Jamcast is easy and the possible applications are endless.
The Jamcast API was built against the Microsoft .NET Framework version 2.0. Jamcast plugins can be authored in any language with a compiler that targets the Microsoft .NET Framework (C#, C++, VB, Java, LOLCODE
The Jamcast API documentation is available online here
Creating Server Objects
The Jamcast Content Directory is a hierarchal representation of containers and objects. A Jamcast plugin defines classes that inherit from ObjectRenderer to provide the Content Directory with server object metadata whenever a user makes a browse request. A special type of ObjectRenderer called ContainerRenderer emits child objects in addition to metadata about itself.
All Jamcast plugins must define at least one ContainerRender that will be called for the plugin root container. The plugin root is inserted as a child of the top node of the Jamcast Content Directory. The plugin's root ContainerRenderer should emit one or more child objects handled by other ContainerRenderers, or by instances of ObjectRenderer that will emit track metadata. This is how your plugin's server object hierarchy is defined.
It is trivial for an ObjectRenderer to provide a URL as its source, but for more complicated streaming scenarios the Jamcast API offers unlimited extensibility. MediaRequestHandler is provided to allow developers to retrieve media streams from any location -- internet, hardware device, etc. -- and serve to network clients when requested.
To provide the ability to craft and present UI, the Jamcast API provides the ConfigurationPanel base class. If your plugin provides UI, it will be available from Jamcast Server Manager as a new tab beneath the Content tab.
The Jamcast API also includes other facilities of convenience as well, including an object persistence data store (for saving plugin configuration, etc.), logging, and more!
We highly recommend you have a look at the open source sample projects listed below. Together, they demonstrate every aspect of the Jamcast API in both simple and complex form.
We've published several projects to Codeplex
to serve as practical, fully-functional examples as to what types of plugins can be built using the Jamcast API:
- Spotify - browse and stream from the Spotify music service, including support for album art, inbox, top lists, starred tracks, and hierarchal playlist containers. This is a great example of 2 powerful API's merging to create a compelling result.
- Pearl Jam Radio - a very simple plugin implementation that exposes a single static audio stream. Also demonstrates building a basic media server handler to retrieve album art from an embedded resource.
- CD Audio - plays audio tracks from a CD inserted into a drive on your PC. This example demonstrates interaction with a hardware API via custom handlers.
Packaging and Deployment
Jamcast plugins are packaged into the Jamcast Plugin file format (JPL). JPL files are simply ZIP archives that contain your plugin assembly, a manifest (plugin.xml), and any optional payload files as specified by the plugin manifest.
Here's a sample plugin.xml:
<?xml version="1.0" encoding="utf-8"?>
<publisherName>Software Development Solutions, Inc.</publisherName>
To install a JPL file, simply double-click the file or right-click from Windows Explorer and choose Install. To view and uninstall plugins, open Jamcast Server Manager and navigate to the Server/Plugins tab.
We welcome questions and open talk related to the Jamcast API in our SDK/Plugins support forum. Click here
to join in the discussion.