Afternoon
Does anyone have any advice on how to make Get calls to the start/stop recording functions with a JQuery Get call.
If I set LiveStreamRecord authentication to None - then this works:
var request = $.ajax({
method: “GET”,
url: “http://localhost:8086/livestreamrecord?app=videochat/definst&streamname=live_v2&action=startRecording”,
success: function (){ console.log(‘worked’); },
error: function( jqXHR, textStatus, errorThrown) { console.log(jqXHR); console.log(textStatus); console.log(errorThrown); }
});
If I set it to admin-digest then all attempts below fail:
var request = $.ajax({
method: “GET”,
url: “http://myuser:mypassword@localhost:8086/livestreamrecord?app=videochat/definst&streamname=live_v2&action=startRecording”,
success: function (){ console.log(‘worked’); },
error: function( jqXHR, textStatus, errorThrown) { console.log(jqXHR); console.log(textStatus); console.log(errorThrown); }
});
var request = $.ajax({
method: “GET”,
username: ‘myuser’,
password: ‘mypassword’,
url: “http://myuser:mypassword@localhost:8086/livestreamrecord?app=videochat/definst&streamname=live_v2&action=startRecording”,
success: function (){ console.log(‘worked’); },
error: function( jqXHR, textStatus, errorThrown) { console.log(jqXHR); console.log(textStatus); console.log(errorThrown); }
});
var request = $.ajax({
method: “GET”,
xhrFields: { withCredentials: true },
username: ‘myuser’,
password: ‘mypassword’,
url: “http://myuser:mypassword@localhost:8086/livestreamrecord?app=videochat/definst&streamname=live_v2&action=startRecording”,
success: function (){ console.log(‘worked’); },
error: function( jqXHR, textStatus, errorThrown) { console.log(jqXHR); console.log(textStatus); console.log(errorThrown); }
});
Seemed like such a simple thing when I started it 6 hours ago. But now I’m running out of hair to pull out?
Can anyone help?
Pip