.ogg file doesn't play
Hi, I am trying to play an .ogg file, which comes from server side like an urlString, on iOS device, so I used your SwiftSimplePlayback project(found here - https://github.com/videolan/vlckit/tree/master/Examples/iOS/SwiftSimplePlayback), and replaced your mediaURL with mine - let mediaURL = "http://xxxxx.xxxx:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg", but mediaPlayer doesn't want to play it, there is no sound at all, it works when i save file to the project directory and open it from there, here is an ogg file example, please help mesampleOggFile
here is my code:
let mediaURL = "http://sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg"
let mediaPlayer: VLCMediaPlayer = VLCMediaPlayer()
mediaPlayer.libraryInstance.debugLogging = true
mediaPlayer.libraryInstance.debugLoggingLevel = 4
mediaPlayer.delegate = self
mediaPlayer.drawable = movieView
let media = VLCMedia(url: URL(string: mediaURL)!)
media.delegate = self
mediaPlayer.media = media
mediaPlayer.play()
here are some logs from Console:
2020-08-07 13:26:55.326169+0300 SwiftSimplePlayback[44397:712534] creating player instance using shared library
2020-08-07 13:26:55.350535+0300 SwiftSimplePlayback[44397:712534] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x600003761260> F8BB1C28-BAE8-11D6-9C31-00039315CD46
2020-08-07 13:26:55.366358+0300 SwiftSimplePlayback[44397:712679] [DBG] Creating an input for '5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg'
2020-08-07 13:26:55.369256+0300 SwiftSimplePlayback[44397:712739] [DBG] using timeshift granularity of 50 MiB
2020-08-07 13:26:55.369544+0300 SwiftSimplePlayback[44397:712739] [DBG] using default timeshift path
2020-08-07 13:26:55.370347+0300 SwiftSimplePlayback[44397:712739] [DBG] `http://sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg' gives access `http' demux `any' path `sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg'
2020-08-07 13:26:55.370675+0300 SwiftSimplePlayback[44397:712739] [DBG] creating demux: access='http' demux='any' location='sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg' file='(null)'
2020-08-07 13:26:55.371101+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for access_demux module matching "http": 4 candidates
2020-08-07 13:26:55.371528+0300 SwiftSimplePlayback[44397:712739] [DBG] no access_demux modules matched
2020-08-07 13:26:55.371883+0300 SwiftSimplePlayback[44397:712739] [DBG] creating access: http://sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg
2020-08-07 13:26:55.372384+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for access module matching "http": 21 candidates
2020-08-07 13:26:55.374999+0300 SwiftSimplePlayback[44397:712739] [DBG] resolving sparkappae.tech ...
2020-08-07 13:26:55.393026+0300 SwiftSimplePlayback[44397:712739] [DBG] outgoing request:
GET /audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg HTTP/1.1
Host: sparkappae.tech:3000
Accept: */*
Accept-Language: en_US
User-Agent: VLC/3.0.11 LibVLC/3.0.11
Range: bytes=0-
mediaPlayerStateChanged
2020-08-07 13:26:55.754125+0300 SwiftSimplePlayback[44397:712739] [DBG] incoming response:
HTTP/1.1 206 Partial Content
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Tue, 04 Aug 2020 12:35:46 GMT
ETag: W/"d601-173b978764e"
Content-Type: audio/ogg
Content-Range: bytes 0-54784/54785
Content-Length: 54785
Date: Fri, 07 Aug 2020 10:26:56 GMT
Connection: keep-alive
2020-08-07 13:26:55.755085+0300 SwiftSimplePlayback[44397:712739] [DBG] using access module "access"
2020-08-07 13:26:55.755728+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for stream_filter module matching "prefetch,cache_block": 25 candidates
2020-08-07 13:26:55.756635+0300 SwiftSimplePlayback[44397:712739] [DBG] using 54785 bytes buffer, 54785 bytes read
2020-08-07 13:26:55.757099+0300 SwiftSimplePlayback[44397:712739] [DBG] using stream_filter module "prefetch"
2020-08-07 13:26:55.757429+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for stream_filter module matching "any": 25 candidates
2020-08-07 13:26:55.758169+0300 SwiftSimplePlayback[44397:712739] [DBG] no stream_filter modules matched
2020-08-07 13:26:55.758299+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for stream_directory module matching "any": 1 candidates
2020-08-07 13:26:55.758428+0300 SwiftSimplePlayback[44397:712739] [DBG] no stream_directory modules matched
2020-08-07 13:26:55.758559+0300 SwiftSimplePlayback[44397:712739] [DBG] attachment of directory-extractor failed for http://sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg
2020-08-07 13:26:55.764055+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for stream_filter module matching "record": 25 candidates
2020-08-07 13:26:55.764196+0300 SwiftSimplePlayback[44397:712739] [DBG] using stream_filter module "record"
2020-08-07 13:26:55.764372+0300 SwiftSimplePlayback[44397:712739] [DBG] creating demux: access='http' demux='any' location='sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg' file='(null)'
2020-08-07 13:26:55.764704+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for demux module matching "any": 47 candidates
2020-08-07 13:26:55.766681+0300 SwiftSimplePlayback[44397:712739] [DBG] File length is 54785 bytes
2020-08-07 13:26:56.113588+0300 SwiftSimplePlayback[44397:712746] [DBG] end of stream
2020-08-07 13:26:56.113966+0300 SwiftSimplePlayback[44397:712739] [WAR] couldn't find any ogg logical stream
2020-08-07 13:26:56.114161+0300 SwiftSimplePlayback[44397:712739] [DBG] using demux module "ogg"
2020-08-07 13:26:56.115188+0300 SwiftSimplePlayback[44397:712739] [DBG] looking for meta reader module matching "any": 1 candidates
2020-08-07 13:26:56.115573+0300 SwiftSimplePlayback[44397:712739] [DBG] no meta reader modules matched
2020-08-07 13:26:56.115736+0300 SwiftSimplePlayback[44397:712739] [DBG] `http://sparkappae.tech:3000/audio/chat/5524f5af-6cf4-4d3d-9cdc-ad6c19b55a95.ogg' successfully opened
2020-08-07 13:26:56.116029+0300 SwiftSimplePlayback[44397:712739] [DBG] File length is 54785 bytes
2020-08-07 13:26:56.116147+0300 SwiftSimplePlayback[44397:712739] [WAR] couldn't find any ogg logical stream
2020-08-07 13:26:56.116247+0300 SwiftSimplePlayback[44397:712739] [DBG] EOF reached
2020-08-07 13:26:56.116613+0300 SwiftSimplePlayback[44397:712739] [DBG] removing module "ogg"
2020-08-07 13:26:56.116744+0300 SwiftSimplePlayback[44397:712739] [DBG] removing module "record"
2020-08-07 13:26:56.116895+0300 SwiftSimplePlayback[44397:712739] [DBG] removing module "prefetch"
2020-08-07 13:26:56.118409+0300 SmediaPlayerStateChanged
wiftSimplePlayback[44397:712739] [DBG] removing module "access"
mediaPlayerStateChanged
2020-08-07 13:26:56.628355+0300 SwiftSimplePlayback[44397:712534] [DBG] removing module "audiounit_ios"
So, why is it not playing from the server url? only from project directory? Can some one help me, please?