Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| tips:cordova:inappbrowser [2015/02/25 07:34] – created scipio | tips:cordova:inappbrowser [2015/03/27 17:40] (current) – [autoplay] scipio | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| With these modifications the hardware back button works within pages in an InAppBrowser. | With these modifications the hardware back button works within pages in an InAppBrowser. | ||
| - | src/ | + | In src/ |
| - | + | ||
| - | change | + | |
| <code java> | <code java> | ||
| private void goBack() { | private void goBack() { | ||
| Line 16: | Line 14: | ||
| </ | </ | ||
| - | to (note public method) | + | to (public method) |
| <code java> | <code java> | ||
| public void goBack() { | public void goBack() { | ||
| Line 59: | Line 57: | ||
| </ | </ | ||
| + | ===== autoplay ===== | ||
| + | |||
| + | Enable video autplay without gestures | ||
| + | |||
| + | In file src/ | ||
| + | <code java> | ||
| + | inAppWebView.loadUrl(url); | ||
| + | inAppWebView.setId(6); | ||
| + | inAppWebView.getSettings().setLoadWithOverviewMode(true); | ||
| + | inAppWebView.getSettings().setUseWideViewPort(true); | ||
| + | + inAppWebView.getSettings().setMediaPlaybackRequiresUserGesture(false); | ||
| + | </ | ||
| + | |||
| + | ===== loop ===== | ||
| + | |||
| + | Looping mode does not work, add this hack to javascript and add looping=" | ||
| + | <code javascript> | ||
| + | var videos = jQNew( " | ||
| + | for (index = 0; index < videos.length; | ||
| + | | ||
| + | } | ||
| + | </ | ||