Skip to content

Commit c6d7b52

Browse files
committed
Update README licenseXhrSetup example
1 parent 6623ec2 commit c6d7b52

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/API.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,9 +1234,12 @@ var config = {
12341234
xhr.setRequestHeader('Content-Type', 'application/octet-stream');
12351235
}
12361236

1237-
// Return the desired payload or a Promise<Uint8Array|void>
1238-
// return Promise.resolve(payload);
1239-
return payload;
1237+
// Return the desired payload or a Promise<Uint8Array>.
1238+
// Not returning a value, or returning `undefined` or` Promise<void>` will result in the `licenseChallenge` being used.
1239+
return fetchDRMToken(this.authData).then((result) => {
1240+
xhr.setRequestHeader('token', token);
1241+
return payload;
1242+
});
12401243
},
12411244
};
12421245
```

0 commit comments

Comments
 (0)