googlevr / gvr-ios-sdk

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

1.1.0 is not work HLS stream in iOS 10.2 or lower version #251

Closed younatics closed 7 years ago

younatics commented 7 years ago

Hello, I found HLS stream is not work well in iOS 10.2 or lower version.
This is test url (http://v.zigbang.com/360/14029/main/master.m3u8) If I rollbacked to 0.9.0 version, It works fine. please fix this issue.

Regards, younatics

sanjayc77 commented 7 years ago

This does not load in AVPlayer: "Failed to load video: Cannot Parse" GVRVideoView uses AVPlayer internally. Does this load in AVPlayer outside of GVRVideoView?

younatics commented 7 years ago

Hello @sanjayc77, In iOS 10.3 or higher version, I can play HLS stream. Is there any difference between this version?

Thanks,

younatics commented 7 years ago

https://github.com/younatics/avplayer-sample You can see that I can play in Avplayer without GVRVideoView

khanhlvg commented 7 years ago

Hi @sanjayc77

The issue we are seeing here is that this 360 video (http://v.zigbang.com/360/14029/main/master.m3u8) plays well on iOS 10.3, but not on iOS 10.0 to iOS 10.2. GVRSDK 1.60.0 (latest) is used.

Could you look into what caused the problem? You can reproduce using iOS Simulator.

Here is a code snippet I used to load the video:

NSURL *videoURL = [NSURL URLWithString:@"http://v.zigbang.com/360/14029/main/master.m3u8"];
    [_videoView loadFromUrl:videoURL
                     ofType:kGVRVideoTypeMono];

iOS 10.0 to 10.2 simulator screen shot may 25 2017 11 18 10 am

iOS 10.3 simulator screen shot may 25 2017 11 18 48 am

younatics commented 7 years ago

Thanks! @khanhlvg :)

sanjayc77 commented 7 years ago

I was able to playback the video on 10.3.1 on the VideoPlayer sample app after adding App Transport Security Key to Info.plist (since the Url begins with http). It also worked on the iPhone simulator (9.0 and 10.3), but not on 10.2. I think this might be a bug in iOS: https://forums.developer.apple.com/thread/67268

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">

NSAllowsArbitraryLoads
younatics commented 7 years ago

Hello, @sanjayc77 Thank you for your reply. However, I can play hls stream in iOS 10.2 when I use 0.9.0 GVR version. Is there any difference between 0.9.0 version and 1.1 or higher version?