Skip to content

Commit

Permalink
Bump version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Corentin Mors committed Jan 28, 2023
1 parent a323845 commit 15445d2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 42 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/release.yml

This file was deleted.

17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A modern UPNP client made in Typescript. Compatible with both ESM and CommonJS.
## Install

```bash
$ npm install <TODO: insert name here when published>
$ npm install upnp-client-ts
```

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

await client.subscribe('AVTransport');
const listener = (event: UpnpEvent) => {
console.log(event);
};

await client.subscribe('AVTransport', listener);
// Will receive events like { InstanceID: 0, TransportState: 'PLAYING' } when playing media

// await client.unsubscribe('AVTransport', listener);
await client.unsubscribe('AVTransport', listener);
```

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

## Usage of dlnaHelpers

You can generate DLNA flags and features thanks to the provided helpers, for instance:

```ts
// TODO: To be written
const dlnaContentFeatures =
`${upnp.dlnaHelpers.getDlnaSeekModeFeature('range')};` +
`${upnp.dlnaHelpers.getDlnaTranscodeFeature(false)};` +
`${upnp.dlnaHelpers.defaultFlags.DLNA_STREAMING_TIME_BASED_FLAGS}`;
```

## Debugging
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "upnp-client-ts",
"version": "1.0.0",
"version": "1.0.1",
"description": "A modern UPNP client made in Typescript.",
"source": "src/index.ts",
"main": "dist/main.js",
Expand Down

0 comments on commit 15445d2

Please sign in to comment.