Jump to content
  • 0

Start recording a Stream


giuseppe madonna
 Share

Question

  • Answers 3
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Posted Images

3 answers to this question

Recommended Posts

  • 0

Thank you,

but i am not trying to enable recording but to start/stop it at will,

i have understand that i need to use the https://antmedia.io/rest/#/BroadcastRestService/enableRecording API to do that,
but i don't know how can i call it from back-end. Can u give me some example? I think i might use node.js but every example is userfull

 

Link to comment
Share on other sites

  • 0

Hi,

Have a good day.

Can u give me some example?

Sure, I'm glad to help with your issue. Yes, you need to use https://antmedia.io/rest/#/BroadcastRestService/enableRecording REST API for recording status.
Here is the sample Javascript XHR request:
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});

xhr.open("PUT", "http://localhost:5080/LiveApp/rest/v2/broadcasts/308588021341642039818703/recording/true?recordType=mp4");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send();

PS: Please make sure you are already added your IP Address to application REST IP filter settings.
Also please check below guides:

I hope, I could help you.

Best Regards,
Selim

Link to comment
Share on other sites

 Share


×
×
  • Create New...