Start a new topic

Play a video inline in iOS JS sdk webview


We'd like to play an inline video (just using html / js, not related to wikitude directly) inside of the Wikitude webview . I have found a way to enable inline playback in the webview, but its not the cleanest :)

   for (UIView* subview in self.architectView.subviews) {

        if ([subview isKindOfClass: UIWebView.class]) {

            UIWebView* webview = (UIWebView*) subview;

            webview.allowsInlineMediaPlayback = true;



I expect this is the same issue raised here:

Is there a better supported way to allow for this or is my workaround the way to go for now ?

Hi Amaury,

I created a Wikitude internal ticket to either provide the setting in the Cordova API or to change the default value.

Best regards,

Hello ! First, let me bring an update to this question. For iOS, you can simply do the following now when starting your architect view :

        private void StartAR()
                architectView.Start((conf) =>
                    conf.WebViewAllowsInlineMediaPlayback = true;
                    conf.WebViewMediaPlaybackRequiresUserAction = false;
                }, (isRunning, error) =>


I'd like to know where I can do the same for Android (using Xamarin here) ? Can the ArchitectView be casted as an android WebView or something ? Because WTArchitectStartupConfiguration doesn't offer any relevant parameter on android.

Many thanks

Hi David,

Thx for pointing out this situation. I just added some new options to the WTArchitectStartupConfiguration that are then forwarded to the underlying web view. These new properties will be available with our 7.1 release (scheduled to go live as soon as the Xcode 9 GM is available).

Best regards,


Thanks for this solution David Hakim !


- why don't you make this setting true by default ?
- why don't you make this setting available from within the startupConfiguration parameter used to load an ARchitectWorld (in the cordova plugin : app.wikitudePlugin.loadARchitectWorld(...) ) ?

It took me half a day to figure that the problem was wikitude related, and to find a workaround...


Login or Signup to post a comment