Skip to content

httpheaders NOT Working for api authentication #137

@Wingsclub

Description

@Wingsclub

I have an M3U8 URL stored in a private AWS bucket, as our application's use case prevents us from using a public URL. To access this, we have an orchestration layer with an API that is used in JW Player within our React Native app. This API reads the private bucket URL and returns it. I want to secure this API by passing an authorization token in the httpHeaders within the configuration. Although the library provides httpHeaders, it is not working.

below is my config:
const config={
license: IsAndroid
?ANDROID_JW_API_KEY
:IOS_JW_API_KEY,
playlist: [
{
file: url,
title: "",
type: "hls",
httpheaders: {
"Authorization": Bearer ${token},
},
},

],
uiConfig: {
  hasControlbar: false,
},
pipIcon: false,
autostart: true,
controls: true,
displaytitle: false,
displaydescription: false,
floating: { mode: "never" },
interceptCast: false,
skin: {
  controlbar: { icons: false },
  menus: { display: false },
},
controls: true,
autostart: true,
stretching: "fill",

};

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-groomingHas not been reviewed by codeowners for scope/validationneeds-infoThere isn't enough information. Please add more context

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions