Media Server API to discover and manage images, videos, and music.
Interface | Method |
---|---|
MediaContainer | Promise upload (DOMString title, DOMString path); Promise creatFolder ( title); |
Navigator | |
MediaServerManager | void scanNetwork ( ); |
MediaServerEvent | |
MediaServerIdEvent | |
MediaServer | Promise upload (DOMString title); Promise createFolder (DOMString title); Promise browse (DOMString containerId, DOMString? sortMode, unsigned long? count, unsignedlong? offset); Promise find (DOMString containerId, DOMString? searchFilter, DOMString? sortMode, unsigned long? count, unsigned long? offset); Promise cancel (); |
MediaContainerIdEvent |
TheEventHandler interface represents a callback used for event handlers as defined in.
The concepts queue a task and fire a simple event are defined.
The terms event handler and event handler event types are defined.
The Event interface and the Promiseinterface as well as the concept of a resolver are defined.
[NoInterfaceObject] interface MediaContainer : MediaObject { readonly attribute unsigned long? childCount; readonly attribute boolean canCreateContainer; readonly attribute boolean canDelete; readonly attribute boolean canUpload; readonly attribute boolean canRename; Promise upload (DOMString title, DOMString path); Promise createFolder (DOMString title); };
partial interface Navigator { readonly attribute MediaServerManager mediaServer; };
Navigator implements MediaServerManagerObject;
[NoInterfaceObject] interface MediaServerManager { void scanNetwork (); attribute EventHandler onserverfound; attribute EventHandler onserverlost; };
event handler | event name | event type | short description |
---|---|---|---|
onserverfound | serverfound | MediaServerEvent with server property set to the new MediaServer object. | Fired when a MediaServer appears on the local network. |
onserverlost | serverfound | MediaServerIdEvent with id property set to a DOMString with the id of the lost MediaServer. | Fired when a MediaServer disappears from the local network. |
interface MediaServerEvent : Event { readonly attribute MediaServer server; };
interface MediaServerIdEvent : Event { readonly attribute DOMString id; };
[NoInterfaceObject] interface MediaServer { readonly attribute DOMString id; readonly attribute DOMString friendlyName; readonly attribute DOMString? manufacturer; readonly attribute DOMString? manufacturerURL; readonly attribute DOMString? modelDescription; readonly attribute DOMString? modelName; readonly attribute DOMString? modelNumber; readonly attribute DOMString? serialNumber; readonly attribute DOMString? UDN; readonly attribute DOMString? presentationURL; readonly attribute DOMString? iconURL; readonly attribute DOMString? deviceType; readonly attribute MediaContainer? root; readonly attribute boolean canCreateContainer; readonly attribute boolean canUpload; readonly attribute DOMString[] searchAttrs; readonly attribute DOMString[] sortAttrs; Promise upload (DOMString path); Promise browse(DOMString containerId, DOMString? sortMode, unsigned long? count, unsigned long? offset); Promise find(DOMString containerId, DOMString searchFilter, DOMString? sortMode, unsigned long? count, unsigned long? offset); Promise cancel (); attribute EventHandler oncontainerchanged; };
void browse(DOMString containerId, DOMString sortMode, unsigned long count, unsigned long offset);
Parameters:
Exceptions:
with error type UnknownError, if an error occurs.
Promise cancel (); attribute EventHandler oncontainerchanged;
Promise createFolder (DOMString title);
void find(DOMString containerId, DOMString searchFilter, DOMString sortMode, unsigned long count, unsigned long offset);
Parameters:
Exceptions:
with error type UnknownError, if an error occurs.
Promise upload (DOMString path);
event handler | event name | event type | short description |
---|---|---|---|
oncontainerchanged | containerchanged | MediaContainerIdEvent with id property set to a DOMString with the id of a MediaContainer. | Fired when content was added, removed or modified in a given MediaContainer on the MediaServer. |
interface MediaContainerIdEvent : Event { readonly attribute DOMString id; };
module MediaServer { [NoInterfaceObject] interface MediaContainer : MediaObject { readonly attribute unsigned long? childCount; readonly attribute boolean canCreateContainer; readonly attribute boolean canDelete; readonly attribute boolean canUpload; readonly attribute boolean canRename; Promise upload (DOMString title, DOMString path); Promise createFolder (DOMString title); }; Navigator implements MediaServerManagerObject; [NoInterfaceObject] interface Navigator { readonly attribute MediaServerManager mediaServer; }; [NoInterfaceObject] interface MediaServerManager { void scanNetwork(); attribute EventHandleronserverfound; attribute EventHandleronserverlost; }; interface MediaServerEvent : Event { readonly attribute MediaServer server; }; interface MediaServerIdEvent : Event { readonly attribute DOMString id; }; [NoInterfaceObject] interface MediaServer { readonly attribute DOMString id; readonly attribute DOMString friendlyName; readonly attribute DOMString? manufacturer; readonly attribute DOMString? manufacturerURL; readonly attribute DOMString? modelDescription; readonly attribute DOMString? modelName; readonly attribute DOMString? modelNumber; readonly attribute DOMString? serialNumber; readonly attribute DOMString? UDN; readonly attribute DOMString? presentationURL; readonly attribute DOMString? iconURL; readonly attribute DOMString? deviceType; readonly attribute MediaContainer? root; readonly attribute boolean canCreateContainer; readonly attribute boolean canUpload; readonly attribute DOMString[] searchAttrs; readonly attribute DOMString[] sortAttrs; Promise upload (DOMString path); Promise browse(DOMString containerId, DOMString? sortMode, unsigned long? count, unsigned long? offset); Promise find(DOMString containerId, DOMString searchFilter, DOMString? sortMode, unsigned long? count, unsigned long? offset); Promise cancel (); attribute EventHandler oncontainerchanged; }; interface MediaContainerIdEvent : Event { readonly attribute DOMString id; }; };