apache / apache/cordova-plugin-media
Get frame(s) from Video stream
- Dominant language
- JavaScript
- Stars
- 391
- Forks
- 762
- PR merge metrics
- No merged PRs in 30d
Description
This is driving me nuts. Can someone please show me how to get the frames from a video stream? I get the stream using the example, see below, and that works well. But how do I go about getting each frame from that stream? Any help or tip is very very very welcome!
```
navigator.mediaDevices.getUserMedia(constraints)
.then((stream) => {
console.log('getUserMedia.stream', stream);
console.log('getUserMedia.stream.getTracks', stream.getTracks());
console.log("Im streaming!!", stream);
var video = document.querySelector('video');
console.log("video element", video);
video.srcObject = stream;
video.onloadedmetadata = (e) => {
console.log("stream start");
video.play();
};
}).catch((err) => {
console.log('getUserMedia.error', err, err.stack);
});
}
```
Contributor guide
Research direction
Start with the navigator.mediaDevices.getUserMedia entry point and the video element shown in the issue. First determine whether the requested frame access belongs in the plugin or needs usage documentation; the issue is complete only once the supported way to obtain individual frames is explicitly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- audio-video-rtc, mobile-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100