Skip to content

Commit 15445d2

Browse files
author
Corentin Mors
committed
Bump version to 1.0.1
1 parent a323845 commit 15445d2

4 files changed

Lines changed: 17 additions & 42 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ A modern UPNP client made in Typescript. Compatible with both ESM and CommonJS.
1515
## Install
1616

1717
```bash
18-
$ npm install <TODO: insert name here when published>
18+
$ npm install upnp-client-ts
1919
```
2020

2121
## Usage of UpnpDeviceClient
@@ -38,10 +38,14 @@ console.log(serviceDescription);
3838
const callActionResponse = await client.callAction('AVTransport', 'GetMediaInfo', { InstanceID: 0 });
3939
console.log(callActionResponse);
4040

41-
await client.subscribe('AVTransport');
41+
const listener = (event: UpnpEvent) => {
42+
console.log(event);
43+
};
44+
45+
await client.subscribe('AVTransport', listener);
4246
// Will receive events like { InstanceID: 0, TransportState: 'PLAYING' } when playing media
4347

44-
// await client.unsubscribe('AVTransport', listener);
48+
await client.unsubscribe('AVTransport', listener);
4549
```
4650

4751
## Usage of UpnpMediaRendererClient
@@ -64,8 +68,13 @@ await client.seek(60);
6468

6569
## Usage of dlnaHelpers
6670

71+
You can generate DLNA flags and features thanks to the provided helpers, for instance:
72+
6773
```ts
68-
// TODO: To be written
74+
const dlnaContentFeatures =
75+
`${upnp.dlnaHelpers.getDlnaSeekModeFeature('range')};` +
76+
`${upnp.dlnaHelpers.getDlnaTranscodeFeature(false)};` +
77+
`${upnp.dlnaHelpers.defaultFlags.DLNA_STREAMING_TIME_BASED_FLAGS}`;
6978
```
7079

7180
## Debugging

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "upnp-client-ts",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A modern UPNP client made in Typescript.",
55
"source": "src/index.ts",
66
"main": "dist/main.js",

0 commit comments

Comments
 (0)