-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoplay videos does not work on cordova-IOS with Meteor 1.3 #7173
Comments
looks like a Cordova bug. Is there anything meteor can do for this? |
It's somewhat meteor related, because meteor choses wkwebview as default, whereas cordova has UIWebview as default. This might be mentioned in the docs as a gotcha of wkwebview. It took me a really long time to figure out what's the problem and I think others might have the same problem. Also the option to chose between wkwebview and uiwebview should be mentioned. |
So there comes two issues in fact:
|
Sounds like two docs issues now. @macrozone I would suggest your posting this to meteor/docs. Closing this on meteor/meteor. |
ok thx, @laosb , will do that. (I would also love to see UIWebview deprecated, but the cordova-integration of WkWebview seems to be not ready yet as I think that not been able to autoplay videos is a major regression) |
It seems that hotcode-reload does not work on cordova with UIWebview. The webview does reload, when I do a change, but the change is not visible. I need to restart the app in order to see the change. Can someone confirm this? --> i'll open a new issue for this |
Thanks for the quick fix @macrozone, been looking for a solution to the autoplay issue for a few hours now and you just saved my night 👍 |
On Meteor 1.2 it was possible to play videos on cordova-ios without user interaction:
<video src="/path/to/video.mp4
autoplay>`With Meteor 1.3. autoplay no longer works.
There is a Cordova-Preference for this but this seems to have no effect:
App.setPreference("MediaPlaybackRequiresUserAction", false);
I created a simple repo to reproduce: https://github.com/macrozone/meteor-cordova-ios-video-autoplay.git
Can someone confirm?
Edit:
After a little bit debugging on xcode I found out that the setting "MediaPlaybackRequiresUserAction" is not passed to the WkWebview.
It seems that no property from cordova's config.xml is passed to WkWebview, there seems to be an open PR: apache/cordova-plugin-wkwebview-engine#7
Fortunalty I found a workaround: disabling the WKWebview:
App.setPreference("CordovaWebViewEngine", "CDVUIWebViewEngine");
The text was updated successfully, but these errors were encountered: