I was using VlcKit 2.2.2 and it works, but as Apple will not aprouve as it have support for AC3. Because of that I am trying to make VlcKit 3 works.
I downloaded the master from https://code.videolan.org/videolan/VLCKit and compiled it.
I have added the resulting framework to my project but now it doesn't play anymore the streams.
It starts and stops even before having any image on screen.
I instantiate the vlc as:
Code: Select all
var mediaPlayer = VLCMediaPlayer(options: ["--verbose=9", "network-caching=20000", "--drop-late-frames", "--skip-frames", "--file-caching=10000"])
.
.
.
/******************************************************************
/ The state of vlc media player was changed
*******************************************************************/
func mediaPlayerStateChanged(_ aNotification: Notification!) {
let mediaState = mediaPlayer!.state
switch(mediaState) {
case .buffering: //< Stream is buffering
print("buffering...")
toggleActivityIndicator(true)
break
case .error: //< Player has generated an error
print("error...")
utils.Vibrate()
toggleActivityIndicator(false)
break
case .playing: //< Stream is playing
print("playing...")
toggleActivityIndicator(false)
break
case .ended: //< Stream has ended
print("ended...")
break
case .stopped: //< Player has stopped
print("stopped...")
break
case .opening: //< Stream is opening
print("opening...")
break
case .paused: //< Stream is paused
print("paused...")
break
}
if (mediaPlayer?.isPlaying)! {
toggleActivityIndicator(false)
}
}
Code: Select all
self.url = URL(string: urlvideo!)
let media = VLCMedia(url: self.url!)
self.mediaPlayer?.media = media
self.mediaPlayer?.delegate = self
self.mediaPlayer?.drawable = self.MovieView
self.mediaPlayer?.play()
All I get is:
buffering...
playing...
stopped...
I also tested downloading the version 3, wich I got from nighties (http://nightlies.videolan.org/build/iOS/) and it also does the same.
I tested with my links and links from https://bitmovin.com/mpeg-dash-hls-exam ... e-streams/
I also tested the links using the example app wich cames with the vlckit (SimplePlayback).
Any help would be apreciated.
Thanks