Socket
Socket
Sign inDemoInstall

stop-media-stream

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    stop-media-stream

Stops all tracks in a MediaStream


Version published
Weekly downloads
33
decreased by-38.89%
Maintainers
1
Install size
4.20 kB
Created
Weekly downloads
 

Readme

Source

stop-media-stream

npm build status downloads

Stops and removes all tracks in a MediaStream.

This will release the camera, if the MediaStream was obtained with getUserMedia.

Installation

Install with:

$ npm install stop-media-stream

Or:

$ yarn add stop-media-stream

Usage

import stopMediaStream from 'stop-media-stream';

// get a media stream somehow
navigator.mediaDevices.getUserMedia(constraints)
  .then(mediaStream => {
    // Use your media stream and when you're done with it:
    stopMediaStream(mediaStream);
  });

Contributing

Please feel free to submit any issues or pull requests.

License

MIT

Keywords

FAQs

Last updated on 05 Nov 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc