2
votes

I am currently working with the 3rd party library SCRecorder to try and create an AVAsset with a URL and then create an AVPlayerItem -> AVPlayer to output a video.

I believe my problem arises because the video data I am trying to play is originally being saved to Parse as a raw data file. The reference URL to this file is in the format "http ://files.parsetfss.com/something-file". It does not appear that there is a way to create an AVAsset, and ultimately an AVPlayer, using this type of URL.

My question is whether or not there is a way to create an AVPlayerItem/AVPlayer using this URL which returns raw data, or create one using the raw data itself as an NSData? If this is not possible is there a way to save a PFFile to Parse in a different format, one that would be accepted by AVAsset/AVPlayer such as .mov/.mp4?

1

1 Answers

4
votes

I figured out the issue... I just needed to use PFFile(data: data, contentType: "video/mp4") :P