@Claude31 thanks for your response! My main problem is that XCode does not allow me to do the step in your "Create a UIView": "Define the constraints with respect to the scrollView (Superview)" .
I.e. I am able to set constraints for the scroll view, but cannot set any constraints for the image view inside the scroll view.
Please see attached screen shot of my current constraints list of the scroll view.
Post
Replies
Boosts
Views
Activity
To clarify 2 things, (1) I was able to set constraints between the scroll view and its superview, i.e. the Content View of the cell. (2) Xcode was not able to fix the "missing constraints" automatically, I tried that.
Sorry about my late response. I am trying to use iPhone to communicate with other devices in the same WiFi LAN, and wondering if can use TDLS to reduce the load on the WiFi router. If not TDLS, is there any other thing I can use for iPhone to achieve the goal? Thanks.
The third-party framework (Cronet from chromium) I am using was not provided as xcframeworks. Its source code is available but has its own build script (not Xcode). I will look into it but not having high hope per my understanding.
I found the problem. The reason is that AVPlayerItem (and AVAsset) cannot handle a URL for video if there is no known file extension, e.g. something like ".mp4".By observing the "status" key of AVPlayerItem, I found the error reason is "This media format is not supported" even though I have already set the content-type as "video/mp4" in ContentInformationRequest.Anyway, after manually adding ".mp4" in the URL, I was able to get additional loading requests after the 2nd request was cancelled. And the video playback works now 🙂 .Btw, this bug / behavior was reported on 2012, but it seems still not fixed. http://openradar.appspot.com/radar?id=1516408
I compared the sequence of requests with a regular case when AVPlayer is created with a http URL without using delegate. I have two observations:1. In both cases, AVPlayer has first request asking for ContentInfo and range 0-1 (2 bytes) and 2nd request asking for the whole range (full length) of the video asset.2. In regular case, AVPlayer seems to "cancel" / "stop" the 2nd request as well, after receiving some (around 100k bytes) data.3. In regular caes, AVPlayer will continue to send 3rd request with requested offset following the 2nd request data received. But in the problematic delegate case, there was not 3rd request. So, now the question is, why didn't the delegate get a 3rd request from AVPlayer?
I did not get further requests after the cancel.The cancel is still confusing to me as I'm testing locally using iOS simulator and local server, which has very low latency for the response. And it seems it was cancelled after 3 times of dataRequest respondWithData().
Just to follow up, from my research elsewhere, looks like only if AVAsset has a custom URL scheme, AVAssetResourceLoaderDelegate will be called. In other words, known schemes like "http" or "https" will not trigger AVAssetResourceLoaderDelegate.
Thank you eskimo! I will look into more with AVAssetResourceLoaderDelegate. I'm curious why [NSURLProtocol registerClass] worked for AVPlayer in iOS simulator ?
I found this old thread when looking into a similar problem. We're trying to use a third-party network stack (Cronet) which uses [NSURLProtocol registerClass] to handle the URL loading. And we wanted to use it with AVPlayer.It's interesting that when we test it in Xcode with iOS simulator, it works, i.e. able to catch the network calls of AVPlayer into registered class. But when we run the same code on actual iPhone, it did not work, and debugging showing the registered class not called at all.Is it still true with the iOS 13 that AVPlayer won't see registered protocol class? If yes, why the iOS simulator works? Thanks!
Any details about the item 1. i.e. using pods to solve this issue?