Skip to content

Commit

Permalink
Update README licenseXhrSetup example
Browse files Browse the repository at this point in the history
  • Loading branch information
robwalch committed Oct 27, 2022
1 parent f80be4c commit d50bb13
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/API.md
Original file line number Diff line number Diff line change
Expand Up @@ -1234,9 +1234,12 @@ var config = {
xhr.setRequestHeader('Content-Type', 'application/octet-stream');
}

// Return the desired payload or a Promise<Uint8Array|void>
// return Promise.resolve(payload);
return payload;
// Return the desired payload or a Promise<Uint8Array>.
// Not returning a value, or returning `undefined` or` Promise<void>` will result in the `licenseChallenge` being used.
return fetchDRMToken(this.authData).then((result) => {
xhr.setRequestHeader('token', token);
return payload;
});
},
};
```
Expand Down

0 comments on commit d50bb13

Please sign in to comment.