I am serving video's in a webview in Android using Appcelerator Titanium. On iOS this works like a charm. But on Android this gives some problems. It goes wrong the second time an activity is opened with a webview that holds a html5 video element.
Steps to reproduce:
(Also see this youtube video: http://www.youtube.com/watch?v=0MpSpfJNyOk )
The first time opening a video/activity with html5 video it shows the video and I am able to play it. When I close the window/activity and open a new window with another video the webview loads and the html5 video play loads as well. But playing it is not possible. When pressing the fullscreen button and pressing the play/pause button twice the video begins to play in fullscreen.
When pausing the video before closing the activity/window the video in the next window is able to play.
The youtube video shows the behavior on a Samsung Galaxy Tab 3 10.1" running Android 4.2 using this test project https://dl.dropboxusercontent.com/u/1849335/WebviewTest.zip
You can understand it took me a while to understand this pattern :)
Context:
I am using the 3.2.GA Titanium SDK with this fix (https://github.com/appcelerator/titanium_mobile/pull/5150) merged. In that change they fixed that the onPause() method should always be called on the webview when closing a activity otherwise the plugin processes will continue to play.
The files that are responsible for this behavior are: https://github.com/wienke/titanium_mobile/tree/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview https://github.com/wienke/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/WebViewProxy.java
Curious if people also see this behavior without Titanium.