0

I try to load a m3u file with an user agent, I use the VLCMediaPlayer initWithLibrary but that not work there is my code

NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"tStream.m3u"];

VLCLibrary *myLib = [VLCLibrary sharedLibrary];

[myLib setHumanReadableName:@"Idontknow" withHTTPUserAgent:@"myUserAgent"];

_mediaPlayerOne = [[VLCMediaPlayer alloc] initWithLibrary:myLib];

_mediaOne = [VLCMedia mediaWithPath:filePath];

_mediaPlayerOne.media = _mediaOne;
    
[_mediaPlayerOne play];

Someone knows where my problem comes from ? Thank You

  • We can't help you debug without debug details. What's the actual problem? – EmilioPelaez Jun 19 '21 at 09:54
  • The problem is when I try to load a m3u file with an http-user-agent that not load the m3u file, that work perfectly without http-user-agent. In log file is just have this lines : creating player instance using shared library AND HTTP load failed, 0/0 bytes (error code: -999 – user1887842 Jun 19 '21 at 11:48
  • VLCLibrary log return this line : [ERR] Failed reading http:/ /theStreamURL:8080/XXXXX/XXXXX/140: HTTP/1.1 401 Unauthorized – user1887842 Jun 19 '21 at 16:16

0 Answers0