Skip to content

Commit

Permalink
docs: fix use of encodeURIComponent() in fairplay tutorial (#6018)
Browse files Browse the repository at this point in the history
  • Loading branch information
pseidemann committed Jan 8, 2024
1 parent 8649e7e commit 7bda349
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/fairplay.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ player.getNetworkingEngine().registerRequestFilter((type, request, context) => {
const originalPayload = new Uint8Array(request.body);
const base64Payload =
shaka.util.Uint8ArrayUtils.toStandardBase64(originalPayload);
const params = 'spc=' + base64Payload;
const params = 'spc=' + encodeURIComponent(base64Payload);
request.headers['Content-Type'] = 'application/x-www-form-urlencoded';
request.body = shaka.util.StringUtils.toUTF8(encodeURIComponent(params));
request.body = shaka.util.StringUtils.toUTF8(params);
});

player.getNetworkingEngine().registerResponseFilter((type, response, context) => {
Expand Down

0 comments on commit 7bda349

Please sign in to comment.