Video from local storage not playing in WebView (Xamarin.Forms) after latest iOS update (12.2)

I have an existing Xamarin Forms application, for Android and iOS, which shows some HTML content from local storage (the purpose is to view this content while offline) in WebView.

After the latest iOS update (12.2), the videos in that HTML stopped working. White background is shown on the place of the video, with the symbol "Play" but no action is possible.

I have tried changing the video tag to include autoplay, mute, but no success.

<video width="560" height="315" controls>
<source src="Absolute-3D.mp4" type="video/mp4">
</video>

I expect it to continue working as it was before the update, but something is blocking it.

It is a UIWebView bug , I add the below code, it works now.

self.webView.mediaPlaybackRequiresUserAction = NO;
self.webView.allowsPictureInPictureMediaPlayback = YES;

uiwebview Video cannot be played in IOS 12.2, Could be similar to this issue. Video from local storage not playing in WebView ( Xamarin.Forms) after latest iOS update (12.2). I have an existing Xamarin Forms application, for Android and iOS, which shows some HTML content from local storage (the purpose is to view this content while offline) in WebView. After the latest iOS update (12.2), the videos in that HTML stopped working.

Try setting mediaPlaybackRequiresUserAction to NO for the webview. I'm seeing the same issue (UIWebView and WKWebView both) in iOS 12.2. Works fine in iOS 12.1 and earlier.

When debugging, you see this error in safari console:

Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission

https://developer.apple.com/documentation/uikit/uiwebview/1617954-mediaplaybackrequiresuseraction?language=objc

https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614727-mediaplaybackrequiresuseraction?language=objc

[Bug] Video from local storage not playing in WebView (Xamarin , After the latest iOS update (12.2), the videos in that HTML stopped working. White background is shown on the place of the video, with the� Prior to Xamarin.Forms 4.4, the Xamarin.Forms WebView was implemented on iOS by the UIWebView class. However, many of these technologies were unavailable in this implementation. Therefore, since Xamarin.Forms 4.4, the Xamarin.Forms WebView is implemented on iOS by the WkWebView class, which supports faster browsing.

I replaced the UIWebView (Which is now deprecated) by the WKWebView and it seems to works again without changing anything in the html code.

There is a message in the console that say fullscreen is not authorized in the current context. For me too it only happens on real device.

Xamarin Doctor, not playing in WebView (Xamarin.Forms, iOS) after latest iOS update (12.2) # 5920. Closed. anakochevska opened this issue on Apr 11, 2019 � 8 comments. The iOS video picker. The iOS VideoPicker uses the iOS UIImagePickerController to access the image library, specifying that it should be restricted to videos (referred to as "movies") in the iOS MediaType property. Notice that VideoPicker explicitly implements the IVideoPicker interface.

Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. It's not solved yet.

Video from local storage not playing in WebView , After the latest iOS update (12.2), the videos in that HTML stopped working. White background is shown on the place of the video, with the symbol "Play" but no� Latest posts in the category. Azure Video not playing in Chromium Browser; newbee info for on-demand streaming of SS and HLS. How to manage assets, storage usage counts, streaming usage counts by tenant wise in windows azure media services? Please tell me about default playready license service policy.

You need to add this to your plist

NSIncludesSubdomains and NSTemporaryExceptionAllowsInsecureHTTPLoads

Like this:

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

UIWebView, Video from local storage not playing in WebView (Xamarin.Forms) after latest iOS update (12.2). Question. I have an existing Xamarin Forms application,� For internal use by the Xamarin.Forms platform. EvaluateJavaScriptRequested: For internal use by the Xamarin.Forms platform. FocusChangeRequested: For internal use by the Xamarin.Forms platform. (Inherited from VisualElement) Focused: Occurs when the element receives focus. (Inherited from VisualElement) GoBackRequested

Page 3087, Chan , Video from local storage not playing in WebView (Xamarin.Forms) after latest iOS update (12.2) Fixed an issue with players viewing their Last Mission Results after changing their gear displaying incorrect information on the latest equipped gear, not the gear that was actually used in mission. Fixed an issue with the end-of-match screen in the Liset showing PvE gear even after completing PvP missions and using different gear.

Video from local storage not playing in WebView (Xamarin.Forms) after latest iOS update (12.2). I have an existing Xamarin Forms application, for Android and�

An iOS app linked on or after iOS 10.0 must include in its Info.plist file the Use the loadHTMLString:baseURL: method to begin loading local HTML files or By default, a web view automatically converts telephone numbers that appear You should not embed UIWebView or UITableView objects in UIScrollView objects.

Comments
  • Can you share the web url which contains the video?
  • Hi @JackHua-MSFT, unfortunately the video is private.. I can't share it. What would you like to see?
  • I need a webUrl that can reproduce this problem. Then I can test it on my side.
  • Same problem here using JWplayer embbed in a webview. I sended a bugreport. It works in the safari browser but not inapp !
  • Yes, the bug is only shown on real device, with iOS 12.2 .
  • Yes! "webView.mediaPlaybackRequiresUserAction = NO;" solved it for me. If you don't want auto-play, make sure you don't have "autoplay" in your HTML. I should point out that I'm not using Xamarin though.
  • Submitted bug report to apple, we'll see openradar.appspot.com/radar?id=4947640680710144
  • I haven't gotten WKWebView to work yet using a local video file on an actual device. I'm using loadHTMLString. Maybe a security issue.