This is a sample project to do following functionalities:
- Start Camera
- Recording Stream
- Play Recorded Stream
- Download
You can use this repo and extend it further as per your requirement. Like:
- Sending live streams
- Upload stream to server or other platforms
- Add filters, and a lot more
- Copy the file in "src/assets/" folder
- Import the "initMR()" method in component from file
- Declare the required variables
import { initMR } from "../../assets/js/mediarecorder";
declare var MediaRecorder: any;
declare global {
interface Window {
stream: any;
}
}
window.stream = window.stream || {};
- Call the "initMR()" method
ngOnInit() {
initMR();
}
If you encounter a bug or problem with this sample code, please submit a new issue so we know about it and can fix it.
Code is adapted from WebRTC : https://github.com/webrtc/
Please see https://webrtc.org/bugs for general issues.