0
Friends I have an image recorded on Sqlite, read the image and put in a Nsdata variable
Now I need to play this Nsdata but the component expects a URL
NSURL *urlVideoFile = [NSURL fileURLWithPath:stringVideoPath];
//NSAssert(urlVideoFile, @"Expected not nil video url");
_playerViewController = [[AVPlayerViewController alloc] init];
_playerViewController.player = [AVPlayer playerWithURL:**urlVideoFile**];
_playerViewController.view.frame = self.view.bounds;
_playerViewController.showsPlaybackControls = YES;
[self.view addSubview:_playerViewController.view];
self.view.autoresizesSubviews = YES;
Thank you,
You are trying to show an image on a video player?
– Rafael Leão
Simply save Nsdata to disk using the Nsfilemanager writeToURL method and use this url
– Leo Dabus