parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

Cannot stream a video from PFFile URL iOS

Open ghost opened this issue 10 years ago • 20 comments

Hello,

First of all, the code I use to try stream a PFFile video with its URL works %100 fine using Parse, however when I switch to using heroku I cannot stream the PFFile video.

When using the AVPlayerViewController it comes up with a crossed out play button.

This is an example of what the url looks like from heroku - http://appname.herokuapp.com/parse/files/appname/a5886e0be65d6fe59cace6c12113572c_file.mp4

Everything else works fine, saving photos as PFFiles and retrieving them and saving normal PFObjects.

It seems it might be something to do with the PFFile url is not recognised by the parse server api because it expects a different formatted string to the one heroku gives?

This issue has been here for about 2 months and still no fix. Any help greatly appreciated!

ghost avatar Feb 26 '16 19:02 ghost

Can you access the URL in your browser?

http://stackoverflow.com/questions/tagged/parse-server is another place you can ask this question.

nathan-savvy avatar Feb 26 '16 21:02 nathan-savvy

Yes I can, I can watch the video using Google Chrome with the exact same link I try to use with heroku and parse server, yet on iOS it doesn't work?

ghost avatar Feb 26 '16 21:02 ghost

Hi,

I tried to access your video link in chrome it is not working. Also Can you try streaming your video with https link ? Does your iOS project accept http links ? You might need to add some settings in your ios project to accept non-ssl urls.

dhavalyours avatar Feb 27 '16 00:02 dhavalyours

Hi, First that is a fake link because the video was a bit of a personal one. Second I know it accepts https because when I use Parse (The one that is closing down, not a custom server) it streams perfectly and is a https link.

ghost avatar Feb 27 '16 00:02 ghost

Can you get us any video with a working link? I can test the streaming end of iOS e2e.

nlutsenko avatar Feb 27 '16 00:02 nlutsenko

Is that the correct link with appname ?

rosarioconti avatar Feb 27 '16 13:02 rosarioconti

Doesn't seem to be, that's why I asked for a full link.

nlutsenko avatar Feb 28 '16 22:02 nlutsenko

Closed for lack of activity.

gfosco avatar Mar 21 '16 12:03 gfosco

Hi,

Same problem here. Parse server on AWS ElasticBeanstalk cannot stream mp4 pffile saved on mongoDB on AWS EC2. Video plays on chrome but does not play on Safari or iOS app. Videos hosted on parse service play with no problem.

iOS error:

Error Domain=AVFoundationErrorDomain Code=-11850 "Operation Stopped" UserInfo={NSUnderlyingError=0x13fb86740 {Error Domain=NSOSStatusErrorDomain Code=-12939 "(null)"}, NSLocalizedFailureReason=The server is not correctly configured., NSLocalizedDescription=Operation Stopped}

Any help? Thanks in advance :)

dpaid avatar Jun 21 '16 11:06 dpaid

Using the S3 file adapter fixed it!

dpaid avatar Jul 03 '16 10:07 dpaid

I have the same issue as well :(

We currently are using the S3 adapter, setting the content-type, with no luck.... There is just a gray play button without anything playing. You can stream from a browser fine, but when trying to access it from iOS it's not working

ryanchan002 avatar Jul 08 '16 14:07 ryanchan002

So, heroku+mlab support doesn't work anymore ? Only choice is to use heroku+S3 ? Doesn't mlab internally uses s3 for storing files. I'm not even sure whether parse-server supports streaming anymore.

indiandragon avatar Jul 21 '16 02:07 indiandragon

Not even trying to stream. Our application is fine downloading the content and playing, but still no luck.

Anyone find any resolution yet?

ryanchan002 avatar Jul 21 '16 02:07 ryanchan002

We are having the same issue with iOS. We are using S3 adapter for file storage and are hosting parse server on amazon ec2 instance and using mlab as database service. the files get saved on s3 bucket and get downloaded but do not stream on iOS.

manishsangwan avatar Jul 21 '16 04:07 manishsangwan

@manishsangwan Doesn't stream on iOS app or in iOS safari ? Because it does stream inside iOS app using Parse sdk for us & not in Safari OX/iOS . It streams fine in Chrome & Firefox. If feasible, can you host a sample file in S3 itself and point to it from parse server instead of mLab; as mLab seems to be the common variable in all these issues.

indiandragon avatar Jul 21 '16 04:07 indiandragon

[Solved] The solution is given by @Bragegs here - https://github.com/ParsePlatform/parse-server/issues/1440#issuecomment-212815625 . In short, parse-server doesn't seem to be supporting streaming of audio/video and @Bragegs code enables it. I hope it get's PR and parse team looks into it.

indiandragon avatar Jul 22 '16 06:07 indiandragon

@indiandragon is there a solution for Google cloud storage?

otymartin avatar Aug 16 '16 08:08 otymartin

The solution is for gridstoreadapter. but its not working for S3Adapter.

manishsangwan avatar Dec 05 '16 03:12 manishsangwan

Use direct access and it should be ok.

flovilmart avatar Dec 05 '16 03:12 flovilmart

.

HackShitUp avatar Jan 03 '17 08:01 HackShitUp