Trying to have a video not in fullscreen into webview

I’m trying to have a video shown into a webview and not in fullscreen when on iphone. I’ve read each post i’ve found on stack but i still have a problem. Everything is perfect in ipad but not in iphone. I think that this is not properly working:

webView:setNativeProperty( "allowsInlineMediaPlayback", true )

Here the documentation about:https://docs.coronalabs.com/api/type/NativeDisplayObject/setNativeProperty.html

My lua code:

local webView = native.newWebView( display.contentCenterX, display.contentCenterY, display.contentWidth, display.contentHeight ) webView:setNativeProperty( "allowsInlineMediaPlayback", true ) webView:setNativeProperty( "mediaPlaybackRequiresUserAction", false ) webView:request( "example\_full.html", system.ResourceDirectory ) local function webViewListener(event) if event.type then print( "The event.type is " .. event.type ) -- print the type of request if (event.type == "other") then if event.url == "js-call:myEvent" then print("ciao") webView:removeSelf() webView = nil end end end if event.errorCode then native.showAlert( "Error!", event.errorMessage, { "OK" } ) end end webView:addEventListener( "urlRequest", webViewListener )

And my html file:

\<!DOCTYPE html\> \<html\> \<head\> \<title\>HTML5 InStream Ad Framework - Simple Video Page\</title\> \<script type="text/javascript" src="instreamapi-2.1.2.min.js"\>\</script\> \</head\> \<body\> \<div style="position:relative"\> \<video id="vid1" width="100%" height="100%" style="background-color:black" poster="http://cdn.smartclip.net/html5framework/smartclip\_multisreen.png" controls url="" playsinline webkit-playsinline\> \<source src="media/bbb\_trailer\_iphone.mp4" type="video/mp4"/\> \<source src="media/bbb\_trailer\_iphone.ogv" type="video/ogg"/\> \<source src="media/bbb\_trailer\_iphone.webm" type="video/webm"/\> \</video\> \</div\> \<script type="text/javascript" language="javascript"\> window.onload = (function () { var myAdConfig = { preroll: 'http://des.smartclip.net/ads?t=de&p=9372&pl=testc&test=ms\_vast2\_socialmenu&sz=400x320&rnd=[random]', overlayDelay:3, overlayDuration:25, adCountdownText:'This ad remains [time] seconds', onFinish: function() { //console.log("ciao"); //window.location = "js-call:myObjectiveCFunction" window.location.href = "js-call:myEvent"; } } $ad('vid1', myAdConfig).start(); }); \</script\> \</body\> \</html\>

I’ve a working objective-c project, but i’m not able to let it work with corona neither using corona enterprise. I hope that someone can help me, or tell me something else than https://coronalabs.com/blog/2014/03/18/tutorial-corona-enterprise-quickstart-ios/ about using Corona Enterprise.

Maybe helping me to use it to let everything work properly.

Thanks a lot for your help and sorry for my english.

Federica

No One can help me? I think The problem could be a bug in The sdk.

One of the reasons you haven’t gotten answers is you’re probably doing things that no one else has attempted. I had to research all of the things you’re talking about.  A quick look at what you are trying to do makes me feel that you’re code is trying to do the right thing.

Perhaps the best thing is to have you go ahead and file a bug report on this.

To file a bug report, please create a simple demo project that shows the problem. The project needs a main.lua, config.lua, build.settings and all assets needed to build and run the project. Use the report a bug link at the top of the page and then when you get the confirmation email, please post the case ID# back here as a reference.

Just out of curiosity, what versions of iOS are the iPad and iPhone running? What models? Perhaps answering these before filing the bug might be useful.

Rob

i’ve sent everything on the bug report: #44164

Can someone see if the form is ok and if it’s possibile to solve the problem?
Thanks a lot!

The bug is still there.

Someone has seen the report?

Will the bug be solved.

It has been assigned to an engineer to investigate. I’ve asked for an update.

Rob

Hello!
 
Thanks for reporting this. For some mysterious reasons object:setNativeProperty and object:getNativeProperty is set up to work with dot syntax instead of object style calls.
Basically, if you try to do webView.setNativeProperty( “allowsInlineMediaPlayback”, true ), everything should work. (difference is “.” instead of “:” )

This would be fixed in one of upcoming releases, but, we’ll still support dot syntax for backwards compatibility reasons.

Vlad.

Thanks! Finally the problem is solved!!

:D  :D  :D  :smiley:

No One can help me? I think The problem could be a bug in The sdk.

One of the reasons you haven’t gotten answers is you’re probably doing things that no one else has attempted. I had to research all of the things you’re talking about.  A quick look at what you are trying to do makes me feel that you’re code is trying to do the right thing.

Perhaps the best thing is to have you go ahead and file a bug report on this.

To file a bug report, please create a simple demo project that shows the problem. The project needs a main.lua, config.lua, build.settings and all assets needed to build and run the project. Use the report a bug link at the top of the page and then when you get the confirmation email, please post the case ID# back here as a reference.

Just out of curiosity, what versions of iOS are the iPad and iPhone running? What models? Perhaps answering these before filing the bug might be useful.

Rob

i’ve sent everything on the bug report: #44164

Can someone see if the form is ok and if it’s possibile to solve the problem?
Thanks a lot!

The bug is still there.

Someone has seen the report?

Will the bug be solved.

It has been assigned to an engineer to investigate. I’ve asked for an update.

Rob

Hello!
 
Thanks for reporting this. For some mysterious reasons object:setNativeProperty and object:getNativeProperty is set up to work with dot syntax instead of object style calls.
Basically, if you try to do webView.setNativeProperty( “allowsInlineMediaPlayback”, true ), everything should work. (difference is “.” instead of “:” )

This would be fixed in one of upcoming releases, but, we’ll still support dot syntax for backwards compatibility reasons.

Vlad.

Thanks! Finally the problem is solved!!

:D  :D  :D  :smiley: