[TIMOB-1725] iPad Video player does not remove when window is closed.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Hold |
Resolution Date | 2011-04-15T03:00:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 |
Components | iOS |
Labels | apple, bug, ios, ipad, player, rplist, video, window |
Reporter | ctredway |
Assignee | Blain Hamon |
Created | 2011-04-15T03:00:33.000+0000 |
Updated | 2017-03-03T17:17:09.000+0000 |
Description
Running 1.4 and 1.4.1 on iOS 3.2 when a window is closed that has a video player instance in it, the video player is not removed as well. I tried using a window.remove(videoPlayer) and that did not work either.
No views are detached when a window is closed. What's the point of removing the video player? If it's to stop it, then the player can simply be stopped manually through an event listener.
If it has to do with memory issues, this could possibly be fixed by better view memory management, which may be part of Blain's ongoing view refactor.
(from [4ec97cd3307b066fbf464300337d89e89b70a6b4]) [#1725 state:fixed-in-qa] Added flag to determine whether or not movies are 'really' attached to a view. http://github.com/appcelerator/titanium_mobile/commit/4ec97cd3307b066fbf464300337d89e89b70a6b4"> http://github.com/appcelerator/titanium_mobile/commit/4ec97cd3307b0...
test file exists in bug tests.
Tested in iPad Simulator 3.2, 4.0, 4.1, and 4.2
SDK 1.5 12/9/2010 - r43358e5f
When window is opened, the video starts playing, then:
iOS 4.0, 4.1, and 4.2
When window is closed, video stops playing as expected.
iOS 3.2
When window is closed, video keeps playing in the background.
Steve, please describe the problem, root cause and fix. I prefer not to add to R1.5 if there is a workaround.
Categorizing as needs more info and TBS, and low.
Going to mark this as "resolved" as it's resolved for 4.0+ devices.
In 3.2, it appears that this is an apple bug (able to recreate outside of Titanium, and so was Blain). Unfortunately there is no workaround because this is caused entirely by the MPMoviePlayerController internals - we can't intervene at any point without the possibility of introducing private APIs and thus possible app rejection.
Ok, this is back on iOS 4+. If the fullscreen flag is set to true, the video player will not remove from view and the window its in will not close either. If the fullscreen flag is not used or false (which is the default), and the controls are set to fullscreen, it will behave the way it should.
Not a regression. Was caused by erroneously listening for "complete" on the click of the fullscreen "Done" button. Making resolved. FROM APPLE'S DOCUMENTATION:
These notifications trigger "complete" and "fullscreen" respectively.
Clint is able to continuously reproduce, although I'm not. Very strange. Marking needs-more-info as a result.
Turns out this is also an apple bug - sometimes the notification/event IS fired, but only when the control style is FULLSCREEN (whether or not the movie is fullscreen is irrelevant). That doesn't match documentation. Also, the close() issue has to do with not allowing the close of toplevel tab windows (which is perfectly OK).
It's worth noting that this bug also prevents us from being able to remove the movie control overlay from a window if necessary; all other control schemes allow us to remove a movie from a view. Fullscreen controls do not.
Radar Bug ID# 8785759
Closing ticket due to time passed and irrelevance of ticket.