Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16044] Android: Plugins keep playing after closing WebView

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2013-12-23T22:33:17.000+0000
Affected Version/sRelease 3.2.0
Fix Version/s2013 Sprint 26, 2013 Sprint 26 API, Release 3.2.1, Release 3.3.0
ComponentsAndroid
Labels3.2.0, android, module_webview, qe-testadded, webview
ReporterWienke
AssigneeSunila
Created2013-12-15T22:02:50.000+0000
Updated2014-01-22T21:55:27.000+0000

Description

Really love the new HTML5 video support in 3.2. But when I load the webview in a window it the plugin (webhchrome client) Does not always stop playing. The Android docs say that you have to called the onPause function to clear all plugin activity. As far as I can see I don't see this happening here. https://github.com/wienke/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiWebChromeClient.java

Comments

  1. Ingo Muschenetz 2013-12-16

    We will investigate, but only consider this a blocker issue for 3.2.0 if it's a regression.
  2. Ingo Muschenetz 2013-12-17

    Removing dev-investigate and triage tags. We will schedule this once it is moved to a TIMOB ticket.
  3. Wienke 2013-12-18

    When I call the pause function on the webview on closing of the window it also does not pause the HTML5 video plugin. If there would be a way to expose the onPause method of the native webview or hook that up to the pause function then that would fix the problem.
  4. Wienke 2013-12-19

    Just another suggestion: Can it be that the trick with: https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/java/ti/modules/titanium/ui/widget/webview/TiUIWebView.java#L220 // Hidden APIs // http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/webkit/WebView.java;h=bbd8b95c7bea66b7060b5782fae4b3b2c4f04966;hb=4db1f432b853152075923499768639e14403b73a#l2558 internalWebViewPause = webView.getClass().getMethod("onPause"); internalWebViewResume = webView.getClass().getMethod("onResume"); is not working any more with API 19?
  5. Wienke 2013-12-19

    I tried it in a module which works. Please see this line. https://github.com/WappZapp/html5video-appcelerator-module/blob/master/src/tv/wappzapp/html5video/WebVideoProxy.java#L94 Shouldn't be that hard of a fix. I like the way you guys do it way better.
  6. Sunila 2013-12-19

    pause and resume webview when the activity is paused or resumed https://github.com/appcelerator/titanium_mobile/pull/5150
  7. Wienke 2013-12-20

    Great this is being worked on. Please let me know if I can be of any help in testing or otherwise.
  8. Wienke 2013-12-21

    Thanks guys! I compiled this in the 3.2.0 and it works like a charm. You guys rock! And have a good christmas.
  9. Wienke 2013-12-23

    Some stuff I notice with this solution: - 4.2 - when going to a window which as a video and leaving the video while playing, play does not work when you open a second screen with a window. When you hit the fullscreen button and play it, it will play but not from the non fullscreen container - 4.3 same behaviour but now the controls are also not showing.
  10. Ritu Agrawal 2013-12-25

    [~wgiezeman] We believe the original reported issue has been fixed. We would appreciate if you can open another ticket for the new issues you are running into and we would troubleshoot these issues.
  11. Wienke 2013-12-27

  12. Allen Yeung 2014-01-03

    3_2_X: https://github.com/appcelerator/titanium_mobile/pull/5182
  13. Dhirendra Jha 2014-01-07

    Environment Used - Appc-Studio: 3.2.1.201401061716 SDK Build:3.2.1.v20140106195644 and 3.3.0.v20140106195650
 acs:1.0.11
 alloy:1.3.1-beta
 npm:1.3.2
 titanium:3.2.0
 titanium-code-processor:1.1.0
 Osx: Maverick 10.9
 Device:Nexus7(v4.3) Result - Not its working and not reproducible.
  14. Lokesh Choudhary 2014-01-07

JSON Source