
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@ashetm/ng-mediastream
Advanced tools
``@ashetm/ng-mediastream`` is a library that simplify manipulation of API ``MediaStream``.
@ashetm/ng-mediastream
is a library that simplify manipulation of API MediaStream
.
Angular Version | @ashetm/ng-mediastream Version | Support |
---|---|---|
Angular 16 and + | @ashetm/ng-mediastream 2.0.0 | ✅ |
Angular >= 11.0.0 and < 16.0.0 | @ashetm/ng-mediastream 1.0.1 | ❌ |
Angular ~ 11.2.14 | @ashetm/ng-mediastream 1.0.0 | ❌ |
You can install it with npm:
npm install @ashetm/ng-mediastream
You only need to import provideMediaStream
.
...
import { provideMediaStream } from '@ashetm/ng-mediastream';
...
@NgModule({
...
providers: [
...
provideMediaStream(),
...
]
...
})
export class AppModule { }
@ashetm/ng-mediastream
exposes the following:
provideMediaStream
, that needs to import in order to use the libraryMediastreamService
is a service concern all about MediaStream
API.
And for methods, there is the following:
getCameraDevices()
returns Promise<MediaDeviceInfo[]>
with camera device list of type MediaDeviceInfo[]
.
getDevices()
returns Promise<MediaDeviceInfo[]>
with all device list of type MediaDeviceInfo[]
.
getMicrophoneDevices()
returns Promise<MediaDeviceInfo[]>
with microphone device list of type MediaDeviceInfo[]
.
hasCameraDevices()
returns Promise<boolean>
boolean
value if has at least 1 camera devise.
hasMicrophoneDevices()
returns Promise<boolean>
boolean
value if has at least 1 microphone devise.
requestCamera(constraints?: MediaTrackConstraints)
returns Promise<MediastreamCameraService>
that contain instance of MediastreamCameraService
(See below), it has 1 optional argument:
constraints
of type MediaTrackConstraints
a configuration for camera.requestCameraAndMicrophone(constraints?: Partial<Record<'audio' | 'video', MediaTrackConstraints>>)
returns Promise<MediastreamCameraService>
that contain instance of MediastreamCameraService
(See below), it has 1 optional argument:constraints
of type Partial<Record<'audio' | 'video', MediaTrackConstraints>>
a configuration for bot camera and microphone.requestMicrophone(constraints?: MediaTrackConstraints)
returns Promise<MediastreamMicrophoneService>
that contain instance of MediastreamMicrophoneService
(See below), it has 1 optional argument:constraints
of type MediaTrackConstraints
a configuration for microphone.MediastreamCameraService
is a service concern all about MediaStream
API of camera.
currentMediaDevice$
is Observable<MediaDeviceInfo>
, it emits MediaDeviceInfo
value of current media camera device information.
mediastream$
is Observable<MediaStream>
, it emits MediaStream
value of media stream information.
mediastreamConstraints
is boolean | MediaTrackConstraints
concerning camera configuration value.
For methods, there is the following:
disableCamera()
returns void
, it disables the current camera device.
enableCamera()
returns void
, it enables the current camera device.
toggleCamera()
returns void
, it disables/enables the current camera device.
updateCameraDevice(device: MediaDeviceInfo & Record<'kind', 'videoinput'>)
returns void
, it updates the current camera device with the first argument device: MediaDeviceInfo & Record<'kind', 'videoinput'>
.
MediastreamCameraMicrophoneService
is a service concern all about MediaStream
API of both camera and microphone at the same time.
currentCameraMediaDevice$
is Observable<MediaDeviceInfo>
, it emits MediaDeviceInfo
value of current media camera device information.
currentMicrophoneMediaDevice$
is Observable<MediaDeviceInfo>
, it emits MediaDeviceInfo
value of current media microphone device information.
mediastream$
is Observable<MediaStream>
, it emits MediaStream
value of media stream information.
mediastreamCameraConstraints
is boolean | MediaTrackConstraints
concerning camera configuration value.
mediastreamMicrophoneConstraints
is boolean | MediaTrackConstraints
concerning microphone configuration value.
For methods, there is the following:
disableCamera()
returns void
, it disables the current camera device.
disableMicrophone()
returns void
, it disables the current microphone device.
enableCamera()
returns void
, it enables the current camera device.
enableMicrophone()
returns void
, it enables the current microphone device.
toggleCamera()
returns void
, it disables/enables the current camera device.
toggleMicrophone()
returns void
, it disables/enables the current microphone device.
updateCameraDevice(device: MediaDeviceInfo & Record<'kind', 'videoinput'>)
returns void
, it updates the current camera device with the first argument device: MediaDeviceInfo & Record<'kind', 'videoinput'>
.
updateMicrophoneDevice(device: MediaDeviceInfo & Record<'kind', 'audioinput'>)
returns void
, it updates the current microphone device with the first argument device: MediaDeviceInfo & Record<'kind', 'audioinput'>
.
MediastreamMicrophoneService
is a service concern all about MediaStream
API of microphone.
currentMediaDevice$
is Observable<MediaDeviceInfo>
, it emits MediaDeviceInfo
value of current media microphone device information.
mediastream$
is Observable<MediaStream>
, it emits MediaStream
value of media stream information.
mediastreamConstraints
is boolean | MediaTrackConstraints
concerning microphone configuration value.
For methods, there is the following:
disableMicrophone()
returns void
, it disables the current microphone device.
enableMicrophone()
returns void
, it enables the current microphone device.
toggleMicrophone()
returns void
, it disables/enables the current microphone device.
updateMicrophoneDevice(device: MediaDeviceInfo & Record<'kind', 'audioinput'>)
returns void
, it updates the current microphone device with the first argument device: MediaDeviceInfo & Record<'kind', 'audioinput'>
.
LOOKING FOR MAINTAINER OR IF THERE IS AN ISSUE OR ANY IDEA TO ADD. PLEASE CREATE ISSUE IN GITHUB REPOSITORY.
FAQs
``@ashetm/ng-mediastream`` is a library that simplify manipulation of API ``MediaStream``.
The npm package @ashetm/ng-mediastream receives a total of 14 weekly downloads. As such, @ashetm/ng-mediastream popularity was classified as not popular.
We found that @ashetm/ng-mediastream demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.