wseemann / FFmpegMediaMetadataRetriever

FFmpegMediaMetadataRetriever provides a unified interface for retrieving frame and meta data from an input media file.
1.72k stars 387 forks source link

it seems like the customer header not working by use method setDataSource ,please fix it ,thanks #264

Closed kyriej closed 1 year ago

wseemann commented 1 year ago

Hi @kyriej, can you post a code example outlining your issue. I'm not sure exactly what the issue is based on your description. Thanks!

kyriej commented 1 year ago

Hi , the code like this

var retriever = FFmpegMediaMetadataRetriever(); val header = HashMap<String , String>(); header.put("key1","val1"); var path = "https://example.com/test.mp4"; retriever.setDataSource(path , header);

it seems like the heder not include in the player request

===================================

public void setDataSource(String uri,  Map<String, String> headers)
        throws IllegalArgumentException {
    int i = 0;
    String[] keys = new String[headers.size()];
    String[] values = new String[headers.size()];
    for (Map.Entry<String, String> entry: headers.entrySet()) {
        keys[i] = entry.getKey();
        values[i] = entry.getValue();
        ++i;
    }
    _setDataSource(uri, keys, values);
}

private native void _setDataSource(
    String uri, String[] keys, String[] values)
    throws IllegalArgumentException;
wseemann commented 1 year ago

I'll take a look, thank you @kyriej

wseemann commented 1 year ago

This issue has been fixed in version 1.0.19.