Start a new topic

Play a video inline in iOS JS sdk webview

Hello


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:


https://support.wikitude.com/support/discussions/topics/5000080369


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


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,

Andreas

Thanks for this solution David Hakim !


@wikitude: 

- 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...

 

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,
Andreas

Login or Signup to post a comment