How can I use a MediaRecorder object in an Angular application?


MediaRecorder is javascript element comes with native javascript, if your angular application does not show MediaRecorder then you can try any step from below


Step1. Install type using this command this will install type for MediaRecorder but at compile time it will show error

    npm install -D @types/dom-mediacapture-record



before compile use this syntax to get rid from above error;

    declare var MediaRecorderany;








If you get error after declaring  declare var MediaRecorderany;
that is "global is not defined" , then add this line to polyfills.js file
(window as any).global = window;



Icon credit

http://www.myiconfinder.com/icon/commands-media-record-recording-sound-music-voice-song-media-player-button-buttons-android-default-color-music-iphone/726

Angular

Comments