Fetch stream (with JS api) in get method and receive a http 401 response

Hi Everybody,

I have a personal website and I wanna display my Lbry videos in html video tags. I set the src attribute (using javascript fetch api) with the stream link like this : https://player.odycdn.com/api/v4/streams/free/{name_of_the_stream}/{folder_id}/{stream_id}. But I receive a 401 http response. It’s an unauthorized response given by the server. I know that I have to set the authorization property of the headers but I don’t know how.

Thanks for the answer.