FFmpegMediaMetadataRetriever icon indicating copy to clipboard operation
FFmpegMediaMetadataRetriever copied to clipboard

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

Open kyriej opened this issue 3 years ago • 3 comments
trafficstars

kyriej avatar Oct 19 '22 15:10 kyriej

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!

wseemann avatar Oct 20 '22 16:10 wseemann

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;

kyriej avatar Oct 20 '22 16:10 kyriej

I'll take a look, thank you @kyriej

wseemann avatar Oct 20 '22 16:10 wseemann

This issue has been fixed in version 1.0.19.

wseemann avatar Jan 30 '23 01:01 wseemann