@pexip/media 20.3.3 → 20.3.5
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/CHANGELOG.md +20 -0
- package/api-docs/README.mdx +404 -0
- package/api-docs/enumerations/DeniedDevices.mdx +7 -0
- package/api-docs/enumerations/UserMediaStatus.mdx +49 -0
- package/api-docs/functions/applyContentHint.mdx +33 -0
- package/api-docs/functions/createAudioMixingProcess.mdx +20 -0
- package/api-docs/functions/createAudioStreamProcess.mdx +15 -0
- package/api-docs/functions/createGetDisplayMedia.mdx +26 -0
- package/api-docs/functions/createMedia.mdx +20 -0
- package/api-docs/functions/createMediaSignal.mdx +42 -0
- package/api-docs/functions/createMediaSignals.mdx +33 -0
- package/api-docs/functions/createPreviewStreamController.mdx +13 -0
- package/api-docs/functions/createVideoStreamProcess.mdx +13 -0
- package/api-docs/functions/deriveInitialPermissionStatus.mdx +14 -0
- package/api-docs/functions/getPermissionStatus.mdx +34 -0
- package/api-docs/functions/isAnalyzerNodeInitProp.mdx +13 -0
- package/api-docs/functions/isAudioContentHint.mdx +13 -0
- package/api-docs/functions/isMedia.mdx +13 -0
- package/api-docs/functions/isNonNullObject.mdx +13 -0
- package/api-docs/functions/isUserMediaStatus.mdx +13 -0
- package/api-docs/functions/isVideoContentHint.mdx +13 -0
- package/api-docs/functions/isVideoStreamTrackProcessorAPIs.mdx +13 -0
- package/api-docs/functions/setLogger.mdx +13 -0
- package/api-docs/functions/toDeniedDevices.mdx +13 -0
- package/api-docs/interfaces/AudioDetectionSignals.mdx +6 -0
- package/api-docs/interfaces/AudioSignalDetectionOptions.mdx +6 -0
- package/api-docs/interfaces/DenoiseParams.mdx +9 -0
- package/api-docs/interfaces/ExtendedMediaTrackSettings.mdx +38 -0
- package/api-docs/interfaces/Media.mdx +316 -0
- package/api-docs/interfaces/MediaAttributes.mdx +19 -0
- package/api-docs/interfaces/MediaChangesSignals.mdx +15 -0
- package/api-docs/interfaces/MediaController.mdx +11 -0
- package/api-docs/interfaces/MediaInit.mdx +14 -0
- package/api-docs/interfaces/MediaOptions.mdx +10 -0
- package/api-docs/interfaces/MediaProps.mdx +9 -0
- package/api-docs/interfaces/MediaSettings.mdx +6 -0
- package/api-docs/interfaces/MediaTrack.mdx +121 -0
- package/api-docs/interfaces/MediaTrackInit.mdx +29 -0
- package/api-docs/interfaces/PreviewControllerProps.mdx +14 -0
- package/api-docs/interfaces/PreviewEventHandler.mdx +19 -0
- package/api-docs/interfaces/PreviewStreamController.mdx +350 -0
- package/api-docs/interfaces/PreviewStreamParams.mdx +15 -0
- package/api-docs/interfaces/VoiceActivityDetectionOptions.mdx +6 -0
- package/api-docs/type-aliases/AudioContentHint.mdx +3 -0
- package/api-docs/type-aliases/CreatePreviewStreamController.mdx +3 -0
- package/api-docs/type-aliases/ExtendedMediaTrackSettingsKey.mdx +3 -0
- package/api-docs/type-aliases/GeneratedMediaSignals.mdx +9 -0
- package/api-docs/type-aliases/GetDisplayMedia.mdx +3 -0
- package/api-docs/type-aliases/GetUserMediaProcess.mdx +19 -0
- package/api-docs/type-aliases/MediaSignals.mdx +3 -0
- package/api-docs/type-aliases/MediaSignalsOptional.mdx +3 -0
- package/api-docs/type-aliases/MediaSignalsRequired.mdx +3 -0
- package/api-docs/type-aliases/PreviewInput.mdx +3 -0
- package/api-docs/type-aliases/Process.mdx +19 -0
- package/api-docs/type-aliases/Segmenters.mdx +3 -0
- package/api-docs/type-aliases/TrackProcessor.mdx +3 -0
- package/api-docs/type-aliases/Unsubscribe.mdx +7 -0
- package/api-docs/type-aliases/UserMediaValidator.mdx +13 -0
- package/api-docs/type-aliases/VideoContentHint.mdx +3 -0
- package/api-docs/type-aliases/VideoRenderParams.mdx +15 -0
- package/api-docs/type-aliases/VideoStreamTrackProcessorAPIs.mdx +7 -0
- package/api-docs/variables/AUDIO_CONTENT_HINTS.mdx +17 -0
- package/api-docs/variables/REQUIRED_SIGNAL_KEYS.mdx +3 -0
- package/api-docs/variables/VIDEO_CONTENT_HINTS.mdx +17 -0
- package/api-docs/variables/areBothGranted.mdx +3 -0
- package/api-docs/variables/hasNoAudioDevices.mdx +3 -0
- package/api-docs/variables/hasNoDevice.mdx +3 -0
- package/api-docs/variables/hasNoVideoDevices.mdx +3 -0
- package/api-docs/variables/internalSignals.mdx +13 -0
- package/api-docs/variables/isAudioDeviceInUse.mdx +3 -0
- package/api-docs/variables/isDeviceInUse.mdx +3 -0
- package/api-docs/variables/isDevicesInUse.mdx +3 -0
- package/api-docs/variables/isFallback.mdx +3 -0
- package/api-docs/variables/isFallbackAudio.mdx +3 -0
- package/api-docs/variables/isFallbackVideo.mdx +3 -0
- package/api-docs/variables/isGranted.mdx +3 -0
- package/api-docs/variables/isGrantedAudio.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyAudio.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyAudioNoVideoDevices.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyVideo.mdx +3 -0
- package/api-docs/variables/isGrantedOnlyVideoNoAudioDevices.mdx +3 -0
- package/api-docs/variables/isGrantedVideo.mdx +3 -0
- package/api-docs/variables/isInitial.mdx +3 -0
- package/api-docs/variables/isInitialPermissions.mdx +3 -0
- package/api-docs/variables/isInitialPermissionsGranted.mdx +3 -0
- package/api-docs/variables/isInitialPermissionsNotGranted.mdx +3 -0
- package/api-docs/variables/isOnlyAudioError.mdx +3 -0
- package/api-docs/variables/isOnlyVideoError.mdx +3 -0
- package/api-docs/variables/isOverConstrained.mdx +3 -0
- package/api-docs/variables/isPromptAudio.mdx +3 -0
- package/api-docs/variables/isPromptVideo.mdx +3 -0
- package/api-docs/variables/isRejected.mdx +3 -0
- package/api-docs/variables/isRejectedOnlyAudio.mdx +3 -0
- package/api-docs/variables/isRejectedOnlyVideo.mdx +3 -0
- package/api-docs/variables/isRequestPermissionNeeded.mdx +3 -0
- package/api-docs/variables/isUnknownError.mdx +3 -0
- package/api-docs/variables/isVideoDeviceInUse.mdx +3 -0
- package/package.json +17 -12
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
type Process<T> = (a) => Promise<MediaTrack>;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
## Type Parameters
|
|
6
|
+
|
|
7
|
+
| Type Parameter |
|
|
8
|
+
| ------ |
|
|
9
|
+
| `T` |
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| `a` | `T` |
|
|
16
|
+
|
|
17
|
+
## Returns
|
|
18
|
+
|
|
19
|
+
`Promise`\<[`MediaTrack`](../interfaces/MediaTrack.mdx)\>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
type VideoRenderParams = Omit<RendererOptions, "effects"> & object;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
## Type Declaration
|
|
6
|
+
|
|
7
|
+
| Name | Type | Description |
|
|
8
|
+
| ------ | ------ | ------ |
|
|
9
|
+
| `frameRate` | `number` | Target frame rate for the video segmentation |
|
|
10
|
+
| `width` | `number` | Render Effects |
|
|
11
|
+
| `height` | `number` | - |
|
|
12
|
+
| `videoSegmentation` | `RenderEffects` | - |
|
|
13
|
+
| `pan?` | `boolean` | - |
|
|
14
|
+
| `tilt?` | `boolean` | - |
|
|
15
|
+
| `zoom?` | `boolean` | - |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
const AUDIO_CONTENT_HINTS: object;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
Audio content hints are only applicable when the MediaStreamTrack contains an
|
|
6
|
+
audio track
|
|
7
|
+
|
|
8
|
+
[https://www.w3.org/TR/mst-content-hint/#audio-content-hints](https://www.w3.org/TR/mst-content-hint/#audio-content-hints)
|
|
9
|
+
|
|
10
|
+
## Type Declaration
|
|
11
|
+
|
|
12
|
+
| Name | Type | Default value | Description |
|
|
13
|
+
| ------ | ------ | ------ | ------ |
|
|
14
|
+
| <a id="nohint"></a> `NoHint` | `""` | `''` | No hint has been provided, the implementation should make its best-informed guess on how to handle contained audio data. This may be inferred from how the track was opened or by doing content analysis |
|
|
15
|
+
| <a id="speech"></a> `Speech` | `"speech"` | `'speech'` | The track should be treated as if it contains speech data. Consuming this signal it may be appropriate to apply noise suppression or boost intelligibility of the incoming signal. |
|
|
16
|
+
| <a id="speechrecognition"></a> `SpeechRecognition` | `"speech-recognition"` | `'speech-recognition'` | The track should be treated as if it contains data for the purpose of speech recognition by a machine. Consuming this signal it may be appropriate to boost intelligibility of the incoming signal for transcription and turn off audio-processing components that are used for human consumption. |
|
|
17
|
+
| <a id="music"></a> `Music` | `"music"` | `'music'` | The track should be treated as if it contains music data. Generally this might imply tuning or turning off audio-processing components that are used to process speech data to prevent the audio from being distorted. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
const VIDEO_CONTENT_HINTS: object;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
Video content hints are only applicable when the MediaStreamTrack contains a
|
|
6
|
+
video track.
|
|
7
|
+
|
|
8
|
+
[https://www.w3.org/TR/mst-content-hint/#video-content-hints](https://www.w3.org/TR/mst-content-hint/#video-content-hints)
|
|
9
|
+
|
|
10
|
+
## Type Declaration
|
|
11
|
+
|
|
12
|
+
| Name | Type | Default value | Description |
|
|
13
|
+
| ------ | ------ | ------ | ------ |
|
|
14
|
+
| <a id="nohint"></a> `NoHint` | `""` | `''` | No hint has been provided, the implementation should make its best-informed guess on how contained video content should be treated. This can for example be inferred from how the track was opened or by doing content analysis. |
|
|
15
|
+
| <a id="motion"></a> `Motion` | `"motion"` | `'motion'` | The track should be treated as if it contains video where motion is important. This is normally webcam video, movies or video games. Quantization artefacts and downscaling are acceptable in order to preserve motion as well as possible while still retaining target bitrates. During low bitrates when compromises have to be made, more effort is spent on preserving frame rate than edge quality and details. |
|
|
16
|
+
| <a id="detail"></a> `Detail` | `"detail"` | `'detail'` | The track should be treated as if video details are extra important. This is generally applicable to presentations or web pages with text content, painting or line art. This setting would normally optimize for detail in the resulting individual frames rather than smooth playback. Artefacts from quantization or downscaling that make small text or line art unintelligible should be avoided. |
|
|
17
|
+
| <a id="text"></a> `Text` | `"text"` | `'text'` | The track should be treated as if video details are extra important, and that significant sharp edges and areas of consistent color can occur frequently. This is generally applicable to presentations or web pages with text content. This setting would normally optimize for detail in the resulting individual frames rather than smooth playback, and may take advantage of encoder tools that optimize for text rendering. Artefacts from quantization or downscaling that make small text or line art unintelligible should be avoided. |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
```ts
|
|
2
|
+
const internalSignals: object;
|
|
3
|
+
```
|
|
4
|
+
|
|
5
|
+
**`Internal`**
|
|
6
|
+
|
|
7
|
+
Internal signals
|
|
8
|
+
|
|
9
|
+
## Type Declaration
|
|
10
|
+
|
|
11
|
+
| Name | Type |
|
|
12
|
+
| ------ | ------ |
|
|
13
|
+
| <a id="ondeviceschanged"></a> `onDevicesChanged` | `Signal`\<`IndexedDevices`, `IndexedDevices`\> |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pexip/media",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.5",
|
|
4
4
|
"description": "Home for media related stuff",
|
|
5
5
|
"homepage": "https://gitlab.com/pexip/zoo",
|
|
6
6
|
"bugs": "https://gitlab.com/pexip/zoo/issues",
|
|
@@ -26,37 +26,42 @@
|
|
|
26
26
|
},
|
|
27
27
|
"directories": {
|
|
28
28
|
"lib": "lib",
|
|
29
|
-
"test": "__tests__"
|
|
29
|
+
"test": "__tests__",
|
|
30
|
+
"doc": "api-docs"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
|
-
"dist"
|
|
33
|
+
"dist",
|
|
34
|
+
"api-docs"
|
|
33
35
|
],
|
|
34
36
|
"scripts": {
|
|
35
|
-
"build": "pexip-bundler build",
|
|
36
|
-
"build:sourcemap": "pexip-bundler build --sourcemap",
|
|
37
|
-
"clean": "rm -fr dist",
|
|
37
|
+
"build": "pexip-bundler build && yarn docs",
|
|
38
|
+
"build:sourcemap": "pexip-bundler build --sourcemap && yarn docs",
|
|
39
|
+
"clean": "rm -fr dist api-docs",
|
|
38
40
|
"dev": "pexip-bundler dev",
|
|
39
41
|
"prepack": "yarn clean && yarn build",
|
|
40
42
|
"test": "jest",
|
|
41
43
|
"check-format": "prettier --ignore-path=../../.prettierignore --check .",
|
|
42
44
|
"format": "prettier --ignore-path=../../.prettierignore --write .",
|
|
43
45
|
"lint": "yarn run -T biome lint",
|
|
44
|
-
"typecheck": "yarn tsc --noEmit -p ."
|
|
46
|
+
"typecheck": "yarn tsc --noEmit -p .",
|
|
47
|
+
"docs": "typedoc"
|
|
45
48
|
},
|
|
46
49
|
"dependencies": {
|
|
47
|
-
"@pexip/media-control": "20.3.
|
|
48
|
-
"@pexip/media-processor": "20.3.
|
|
49
|
-
"@pexip/signal": "16.9.
|
|
50
|
-
"@pexip/utils": "17.1.
|
|
50
|
+
"@pexip/media-control": "20.3.5",
|
|
51
|
+
"@pexip/media-processor": "20.3.5",
|
|
52
|
+
"@pexip/signal": "16.9.3",
|
|
53
|
+
"@pexip/utils": "17.1.3"
|
|
51
54
|
},
|
|
52
55
|
"devDependencies": {
|
|
53
56
|
"@jest/globals": "^30.2.0",
|
|
54
|
-
"@pexip/bundler": "18.
|
|
57
|
+
"@pexip/bundler": "18.2.0",
|
|
55
58
|
"@swc/core": "^1.10.12",
|
|
56
59
|
"@swc/jest": "^0.2.39",
|
|
57
60
|
"jest": "^29.5.12",
|
|
58
61
|
"jest-junit": "^16.0.0",
|
|
59
62
|
"prettier": "^3.2.5",
|
|
63
|
+
"typedoc": "^0.28.15",
|
|
64
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
60
65
|
"typescript": "~5.7.3"
|
|
61
66
|
},
|
|
62
67
|
"publishConfig": {
|