Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Videos won't load when Wifi and Data are off #92

Closed
ktilcu opened this issue Oct 9, 2013 · 4 comments
Closed

Videos won't load when Wifi and Data are off #92

ktilcu opened this issue Oct 9, 2013 · 4 comments

Comments

@ktilcu
Copy link

ktilcu commented Oct 9, 2013

For some reason we no longer get responses for locally stored video requests when all data is turned off. This just started with a recent upgrade to iOS7. We were trying to troubleshoot but got a tad lost. We are using the HTTPFileResponse to open the files.

When logging out file reads while the device was offline, I saw that it would request 2 bytes and then never request anymore. A successful video load would request 2 bytes and then start grabbing chunks.

Our Setup

We have the CocoaHTTPServer serving files for the UIWebView inorder to serve HTML content.

To reproduce

Turn wifi and data off on an iOS7 device and try to play a local video through HTML in the UIWebview

Results

With data off the device acts as if it cannot load the video file while loading html, pdf and jpg files before and after. The HTML5 video container gives a networkState of 3 which is NETWORK_NO_SOURCE.

Expected Results

The local video would load the same whether online or offline.

I can provide logs or do additional troubleshooting if someone could help point me in the right direction.

@ekinsol
Copy link

ekinsol commented Nov 4, 2013

We are also experiencing this issue. But using MPMoviePlayerViewController instead of a html5 video container. Did you find any solution to this problem?

@SamQuest
Copy link

SamQuest commented Nov 4, 2013

if your URL is something like http://localhost:port/.... can you try http://127.0.0.1:port/... (try using loop back IP).

@ekinsol
Copy link

ekinsol commented Nov 4, 2013

Yep that fixed it, looks like iOS7 breaks the name resolving (using localhost) when not connected to any network.

@ktilcu
Copy link
Author

ktilcu commented Nov 4, 2013

Indeed that was the resolution for ours as well. 👍

@ktilcu ktilcu closed this as completed Nov 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants