Skip to content

Http authorization header isn't working  #26

Description

@playtvgo

I am trying to create a receiver which can play hls / dash media with http authorization header
In the receiver.js I have done like this

    var header_now = {}
    if (customData.user_agent) {
        header_now['User-Agent'] = customData.user_agent
    }
    if (customData.origin) {
        header_now['Origin'] = customData.origin
    }
    if (customData.token) {
        header_now['Token'] = customData.token
    }
    if (customData.referer) {
        header_now['Referer'] = customData.referer
    }
    console.log("header " + header_now);

    playbackConfig.licenseRequestHandler = requestInfo => {
        if (header_now)
            requestInfo.headers = header_now;
        if (typeof customData.withCredentials === 'boolean') {
            requestInfo.withCredentials = customData.withCredentials;
        }
    };
    playbackConfig.manifestRequestHandler = requestInfo => {
        if (header_now)
            requestInfo.headers = header_now;
        if (typeof customData.withCredentials === 'boolean') {
            requestInfo.withCredentials = customData.withCredentials;
        }
    };
    playbackConfig.segmentRequestHandler = requestInfo => {
        if (header_now)
            requestInfo.headers = header_now;
        if (typeof customData.withCredentials === 'boolean') {
            requestInfo.withCredentials = customData.withCredentials;
        }
    };

but it's giving me 3116403 error , how to fix this

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions