Reputation: 119
i've been pulling my hair for a while because if this. i'm trying to implement the track face functionality of video api using the examples provided in the documentation link
using the code:
$.ajax({
url: "https://westus.api.cognitive.microsoft.com/video/v1.0/trackface",
beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Ocp-Apim-Subscription-Key","xxxxxx");
},
type: "POST",
data: base64data,
processData: false,
contentType: 'application/octet-stream'
})//end ajax
.done(function(data) {
console.log("GOT INTO .done !!!!");
console.log( data );
})//end done
.fail(function(data) {
alert(data['statusText']);
});//end fail
basically posing a blob object with the mp4 video. response code is 202 which means the request is accepted but processing time may be required. but i only get a null string as response.
if anyone has used this api. what is the response i should expect??
Thanks in advance
Upvotes: 0
Views: 91
Reputation: 21
In the response, there should be an "Operation-Location" header. You will use that URL to query the status with the Get Operation function
GET https://westus.api.cognitive.microsoft.com/video/v1.0/operations/{oid} HTTP/1.1
Upvotes: 2