@xiboplayer/xmds 0.1.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -0
- package/package.json +2 -2
- package/src/index.js +2 -0
- package/docs/README.md +0 -60
package/README.md
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# @xiboplayer/xmds
|
|
2
|
+
|
|
3
|
+
**XMDS SOAP + REST client for Xibo CMS communication.**
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Dual-transport client supporting both Xibo communication protocols:
|
|
8
|
+
|
|
9
|
+
- **XMDS SOAP** (v3-v7) — standard Xibo player protocol with XML encoding
|
|
10
|
+
- **REST API** — lighter JSON transport (~30% smaller payloads) with ETag caching
|
|
11
|
+
|
|
12
|
+
Both transports expose the same API. The REST client is preferred when available.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @xiboplayer/xmds
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
import { RestClient } from '@xiboplayer/xmds';
|
|
24
|
+
|
|
25
|
+
const client = new RestClient({
|
|
26
|
+
cmsUrl: 'https://your-cms.example.com',
|
|
27
|
+
serverKey: 'your-key',
|
|
28
|
+
hardwareKey: 'display-id',
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const result = await client.registerDisplay();
|
|
32
|
+
const files = await client.requiredFiles();
|
|
33
|
+
const schedule = await client.schedule();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Methods
|
|
37
|
+
|
|
38
|
+
| Method | Description |
|
|
39
|
+
|--------|-------------|
|
|
40
|
+
| `registerDisplay()` | Register/authorize the display with the CMS |
|
|
41
|
+
| `requiredFiles()` | Get list of required media files and layouts |
|
|
42
|
+
| `schedule()` | Get the current schedule XML |
|
|
43
|
+
| `getResource(regionId, mediaId)` | Get rendered widget HTML |
|
|
44
|
+
| `notifyStatus(status)` | Report display status to CMS |
|
|
45
|
+
| `mediaInventory(inventory)` | Report cached media inventory |
|
|
46
|
+
| `submitStats(stats)` | Submit proof of play statistics |
|
|
47
|
+
| `submitScreenShot(base64)` | Upload a screenshot to the CMS |
|
|
48
|
+
| `submitLog(logs)` | Submit display logs |
|
|
49
|
+
|
|
50
|
+
## Dependencies
|
|
51
|
+
|
|
52
|
+
- `@xiboplayer/utils` — logger, events, fetchWithRetry
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
**Part of the [XiboPlayer SDK](https://github.com/linuxnow/xiboplayer)**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xiboplayer/xmds",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "XMDS SOAP client for Xibo CMS communication",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"./xmds": "./src/xmds.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@xiboplayer/utils": "0.
|
|
12
|
+
"@xiboplayer/utils": "0.3.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"vitest": "^2.0.0"
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
// @xiboplayer/xmds - XMDS clients (REST and SOAP)
|
|
2
|
+
import pkg from '../package.json' with { type: 'json' };
|
|
3
|
+
export const VERSION = pkg.version;
|
|
2
4
|
export { RestClient } from './rest-client.js';
|
|
3
5
|
export { XmdsClient } from './xmds-client.js';
|
|
4
6
|
export { parseScheduleResponse } from './schedule-parser.js';
|
package/docs/README.md
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# @xiboplayer/xmds Documentation
|
|
2
|
-
|
|
3
|
-
**XMDS (XML-based Media Distribution Service) SOAP client.**
|
|
4
|
-
|
|
5
|
-
## Overview
|
|
6
|
-
|
|
7
|
-
SOAP client for Xibo CMS communication:
|
|
8
|
-
|
|
9
|
-
- Display registration
|
|
10
|
-
- Content synchronization
|
|
11
|
-
- File downloads
|
|
12
|
-
- Proof of play submission
|
|
13
|
-
- Log reporting
|
|
14
|
-
|
|
15
|
-
## Installation
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm install @xiboplayer/xmds
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Usage
|
|
22
|
-
|
|
23
|
-
```javascript
|
|
24
|
-
import { XMDSClient } from '@xiboplayer/xmds';
|
|
25
|
-
|
|
26
|
-
const client = new XMDSClient({
|
|
27
|
-
cmsUrl: 'https://cms.example.com',
|
|
28
|
-
serverKey: 'abc123',
|
|
29
|
-
hardwareKey: 'def456'
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
// Register display
|
|
33
|
-
await client.registerDisplay();
|
|
34
|
-
|
|
35
|
-
// Get required files
|
|
36
|
-
const files = await client.requiredFiles();
|
|
37
|
-
|
|
38
|
-
// Download file
|
|
39
|
-
const blob = await client.getFile(fileId, fileType);
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## SOAP Methods
|
|
43
|
-
|
|
44
|
-
- `RegisterDisplay` - Register/verify display
|
|
45
|
-
- `RequiredFiles` - Get content to download
|
|
46
|
-
- `GetFile` - Download media file
|
|
47
|
-
- `SubmitStats` - Send proof of play
|
|
48
|
-
- `SubmitLog` - Report errors
|
|
49
|
-
|
|
50
|
-
## Dependencies
|
|
51
|
-
|
|
52
|
-
- `@xiboplayer/utils` - Logger
|
|
53
|
-
|
|
54
|
-
## Related Packages
|
|
55
|
-
|
|
56
|
-
- [@xiboplayer/core](../../core/docs/) - Player core
|
|
57
|
-
|
|
58
|
-
---
|
|
59
|
-
|
|
60
|
-
**Package Version**: 1.0.0
|