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

后端 未结 7 481
刺人心
刺人心 2021-01-03 21:15

I\'m building a small Angular2 app and I\'m trying to use a MediaRecorder object (https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder) like so:

va         


        
7条回答
  •  花落未央
    2021-01-03 22:08

    You can now add types for MediaRecorder even easier, just install them through npm.

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

    This will load the latest type definitions from DefinitelyTyped. They will automatically work, no extra steps. If you have any improvements for the typings feel free to contribute them to DefinitelyTyped.

提交回复
热议问题