Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for angular2 #186

Closed
amarewgs opened this issue Oct 31, 2016 · 4 comments
Closed

support for angular2 #186

amarewgs opened this issue Oct 31, 2016 · 4 comments

Comments

@amarewgs
Copy link

amarewgs commented Oct 31, 2016

does this support angular2?

@amarewgs amarewgs changed the title angular2 usage support for angular2 Oct 31, 2016
@ShankarSumanth
Copy link

Hi @amarewgs ,
I know this is kinda pretty late. But I was searching for the same and have created a working repo for this.
https://github.com/ShankarSumanth/Angular2-RecordRTC

@ShankarSumanth
Copy link

Also Here is an article for the same. Integrate RecordRTC With Angular 2

@maneeshrao66
Copy link

How I will send the the file to server. I am using below code to send the recorded file but not working.
FormData is showing null after appending in Angular 2.

public uploadToServer() {
let blob = this.recordRTC instanceof Blob ? this.recordRTC : this.recordRTC.blob;
let fileType = blob.type.split('/')[0] || 'audio';
let fileName = (Math.random() * 1000).toString().replace('.', '');
if (fileType === 'audio') {
fileName += '.' + (!!navigator.mozGetUserMedia ? 'ogg' : 'wav');
} else {
fileName += '.webm';
}
// create FormData
var formData: FormData = new FormData();
formData.append(fileType + '-filename', fileName);
formData.append(fileType + '-blob', blob);
this.dashboard.saveRecording(formData).subscribe(
data => this.saveRecordingSuccess(data),
error => this.saveRecordingFail(error)
);
}

@amity5020
Copy link

Hii @ShankarSumanth does recordRTC works on angular4 i have some issue on importing recordRTC in ts file using angular 4. Pls help me .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants