Learn how to add access control to a content with React, using webhooks
@livepeer/react
in a React
application.context
is defined by your application.
playback.accessControl
and specify the
URL of your access control endpoint.
You can then use the ID of the webhook in the next step.
accessKey
prop to provide your custom
access key, which is then passed to the webhook you created to verify that it is
valid.
Livepeer-Access-Key
,
to the backend, for WebRTC and HLS playback. For MP4 playback, it uses a query
parameter, accessKey
.Livepeer-Access-Key
, when you perform WebRTC SDP negotiation, or when you play
back from a m3u8 URL.
For WebRTC SDP negotiation, here is an example of the header being passed:
2XX
response. Otherwise, the playback will be disallowed.