Left menu

X-DLNA Media Server

Developers

X-DLNA
Share your plugin or translate X-DLNA.
You will get a lifetime X-DLNA Pro license.
Share Your Plugin Translate X-DLNA
Plugin Development

X-DLNA includes a javascript plugin system to detect media information in web pages.

The plugin's structure is very simple, the implementation may be more complex.

								
/* 
description:	plugin description
author:		plugin author
domain_filter:	part of domain name
version:	plugin version
*/

var plugin_name = {
 
   init: function () {
      //runs before document creation
   }

   onmutation: function (mutation) {
      // runs on document changes
      console.log(mutation);  //to see what happens
   },

   onload: function () {
      // runs after page load
   }
}			
			

You can see the console log using a Chromium based browser (e.g. Google Chrome)
at http://localhost:24288 (You can change the port number in preferences).

When you find a media in web page you can easily send informations to X-DLNA
using the function:


xdlna_add_video({
   caller: 'name',			// e.g. plugin_name 
   text: 'Media #',			// tag on media container 
   progAdd: 1,				// 1-0 increment or not the media no. 
   tagObj: 'element_id',		// where the tag will be displayed
   mime: 'mime_type',			// e.g. mp4
   quality: 'media_quality',		// e.g. HD720
   title: 'media_tile',
   url: 'media_url'
});		
			
This site uses cookies to ensure you have the best browsing experience and to help us improve the site.
By continuing to browse the site you are agreeing to our use of cookies.Find out more