googlevr / gvr-ios-sdk

Google VR SDK for iOS
http://developers.google.com/vr/ios/
Other
647 stars 191 forks source link

Failed to load video: The operation could not be completed #101

Closed Abhishek-Shukla1989 closed 7 years ago

Abhishek-Shukla1989 commented 8 years ago

Hello EveryOne,

I am using the code as mentioned in the given sample project. I have latest version of sdk i.e 0.9.0

_videoView.delegate = self; _videoView.enableFullscreenButton = YES; _videoView.enableCardboardButton = YES; _videoView.enableTouchTracking = YES; _isPaused = NO; // Load the sample 360 video, which is of type stereo-over-under.

[_videoView loadFromUrl:[[NSURL alloc] initWithString:@"http://event.aliveonescan.com/store/congo.mp4"] ofType:kGVRVideoTypeMono];

I am making changes in the same sample app for now. EveryVideo is working fine as local video but not able to play any remote video. You can see that this http://event.aliveonescan.com/store/congo.mp4 URL is working fine on browser. Your help would be really helpful. Eagerly waiting for your response.

Thanks

arumani commented 8 years ago

Same problem with your URL. But it's ok when I downloaded your mp4 and then uploaded it onto my AWS S3.

I guess the HTTP response(Content-Type) header's difference cause this results.

$ curl -I http://event.aliveonescan.com/store/congo.mp4 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Accept-Ranges: bytes ETag: W/"10080498-1470381993000" Last-Modified: Fri, 05 Aug 2016 07:26:33 GMT Content-Type: video/mp4 Content-Length: 10080498 Date: Tue, 09 Aug 2016 02:23:36 GMT

$ curl -I https://s3.amazonaws.com/my_path/congo.mp4 HTTP/1.1 200 OK x-amz-id-2: rkT2MAGcgqFxAphYpacUcC4J/KJxWCsRWwiZsY87S7DU+O06UD9zPmifnTUy1XFf9z7wcEbzEzA= x-amz-request-id: BCD1F8F890D243DA Date: Tue, 09 Aug 2016 02:21:55 GMT Last-Modified: Tue, 09 Aug 2016 02:18:00 GMT ETag: "393bcf57f16f929eb528c76300ff74d8" Accept-Ranges: bytes Content-Type: application/octet-stream Content-Length: 10080498 Server: AmazonS3

Abhishek-Shukla1989 commented 8 years ago

Hi ,

Can you tell me what changes we need to implement for making this video work on our server as well? Waiting for your response.

arumani commented 8 years ago

First of all, it's my guess that Content-Type cause your result. And even if it is correct, I don't know your server environment and configuration. So I can't guarantee my comment below.

If you use Tomcat ( from "Server: Apache-Coyote/1.1") or any general web server, you can set MIME mappings as far as I know.

"mp4" -> "video/mp4" to "mp4" -> "application/octet-stream"

Abhishek-Shukla1989 commented 8 years ago

Can anyone please give me a working video URL for testing for some time? because i am facing issue that our video url is not working. That will be very helpful.

Thanks

yuanyouli commented 8 years ago

I change the Content-Type to application/octet-stream ,but same problem .

sanjayc77 commented 8 years ago

https://raw.githubusercontent.com/googlevr/gvr-ios-sdk/master/Samples/VideoWidgetDemo/resources/congo.mp4

Is this issue resolved?

Gail9527 commented 8 years ago

I meet the same issue. How to fix it? Can anyone give me some guide,thanks

update: I found a way to fix this issue for my case. I set

NSAppTransportSecurity
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

in my info.plist and then the video loading successful.

MrZeeee commented 7 years ago

@dancingalone you set that to YES?

tibewww commented 7 years ago

Did anybody manage to make run a stereo video on swift ??

I've mtrying the following:

// videoVRView.load(from: URL(string: "myvideo.mp4"), ofType: kGVRVideoTypeStereoOverUnder)

but I'm getting the error "Use of unresolve identitifer kGVRVideoTypeStereoOverUnder" what can we do ???

Thanks a lot guys :):)

maclacerda commented 6 years ago

Any Solution for this problem? I have a same issue