diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 1ee6bb6..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Create Automatic Release - -on: - push: - # Sequence of patterns matched against refs/tags - tags: - - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - -jobs: - build: - name: Prepare release - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Build project - run: | - npm ci - npm run build - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - draft: false - prerelease: false diff --git a/README.md b/README.md index 51335f8..9716a53 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A modern UPNP client made in Typescript. Compatible with both ESM and CommonJS. ## Install ```bash -$ npm install +$ npm install upnp-client-ts ``` ## Usage of UpnpDeviceClient @@ -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 @@ -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 diff --git a/package-lock.json b/package-lock.json index b1ab120..7b9dedb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "upnp-client-ts", - "version": "1.0.0", + "version": "1.0.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "upnp-client-ts", - "version": "1.0.0", - "license": "ISC", + "version": "1.0.1", + "license": "MIT", "dependencies": { "elementtree": "^0.1.7" }, diff --git a/package.json b/package.json index c8abf20..aadad86 100644 --- a/package.json +++ b/package.json @@ -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",