Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1725] iPad Video player does not remove when window is closed.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionHold
Resolution Date2011-04-15T03:00:37.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0
ComponentsiOS
Labelsapple, bug, ios, ipad, player, rplist, video, window
Reporterctredway
AssigneeBlain Hamon
Created2011-04-15T03:00:33.000+0000
Updated2017-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.

Comments

  1. Stephen Tramer 2011-04-15

    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.

  2. Jeff Haynie 2011-04-15

    (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...

  3. Pedro Enrique 2011-04-15

    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.

  4. Ralf Pfeiffer 2011-04-15

    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.

  5. Stephen Tramer 2011-04-15

    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.

  6. ctredway 2011-04-15

    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.

  7. Stephen Tramer 2011-04-15

    Not a regression. Was caused by erroneously listening for "complete" on the click of the fullscreen "Done" button. Making resolved. FROM APPLE'S DOCUMENTATION:

    This notification [MPMoviePlayerPlaybackDidFinishNotification] is not sent in cases where the movie player is displaying in fullscreen mode and the user taps the Done button. In that instance, the Done button causes movie playback to pause while the player transitions out of fullscreen mode. If you want to detect this scenario in your code, you should monitor other notifications such as MPMoviePlayerDidExitFullscreenNotification.

    These notifications trigger "complete" and "fullscreen" respectively.

  8. Stephen Tramer 2011-04-15

    Clint is able to continuously reproduce, although I'm not. Very strange. Marking needs-more-info as a result.

  9. Stephen Tramer 2011-04-15

    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

  10. Lee Morris 2017-03-03

    Closing ticket due to time passed and irrelevance of ticket.

JSON Source