question

ZhanqianXu-7577 avatar image
1 Vote"
ZhanqianXu-7577 asked WenyanZhang-MSFT commented

iOS, Use webview to load url, the video keeps loading, Can't play

135865-microsoftteams-image-3.png



The native WKWebView of iOS was used to load the video, but it was loading all the time and could not be played

dotnet-ios
· 5
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I need the url you used in webview so that I can test, would you mind sharing it? You could check if it is a http request and it need be allowed in info.plist.

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

You could also check if your webview set allowsInlineMediaPlayback="true"

0 Votes 0 ·

I've added these configurations, but it is still loading all the time

webview config:
let config: WKWebViewConfiguration = WKWebViewConfiguration()
config.allowsInlineMediaPlayback = true
config.allowsPictureInPictureMediaPlayback = true

 Info.plist:
     <key>NSAppTransportSecurity</key>
     <dict>
         <key>NSAllowsArbitraryLoads</key>
         <true/>
     </dict>

0 Votes 0 ·

Would you mind sharing this url to me?

0 Votes 0 ·
Show more comments

0 Answers