npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webantic-phonegap-plugin-media-stream

v1.2.1

Published

------------------------

Downloads

5

Readme

phonegap-plugin-media-stream Build Status


This plugin provides an implementation of the W3C Media Capture API which allows authorized web applications to access streams from the device's audio and video capturing interfaces, i.e. to use the data available from the camera and the microphone. The streams exposed by the API can be bound directly to the HTML or elements or read and manipulated in the code, including further more specific processing via Image Capture API, Media Recorder API or Real-Time Communication.

Installation

phonegap plugin add phonegap-plugin-media-stream

phonegap plugin add https://github.com/phonegap/phonegap-plugin-media-stream.git

The mediaDevices Object

The mediaDevices object has the following methods:

getUserMedia(optional MediaStreamConstraints constraints)

The getUserMedia method call prompts the user for permission to capture audio or video input. The method returns a promise that when resolved returns a MediaStream object. You can constrain what type of media streams are return by passing in an option MediaStreamConstraints object.

Example

navigator.mediaDevices.getUserMedia({
    'audio': true,
    'video': {
        facingMode: 'user'
    }
}).then(function(mediaStream) {
  // do something with the media stream
});

getSupportedConstraints()

The getSupportedConstraints method returns an object which describes which constraints the device supports. You can check the constraints before making a call to getUserMedia to make sure that the functionality you want is supported.

Example

var constraints = navigator.mediaDevices.getSupportedConstraints();
console.log(constraints);

Quirks

The iOS implementation that this plugin provides does not allow you to attach the returned MediaStream object to a audio or video tag. Rather you will use the MeidaStream object to get a MediaStreamTrack to pass to the Image (see phonegap-plugin-image-capture) or Audio capture API.

Contributing

LICENSE