How to Stop BD Player (not javax.media.Player)
In my Xlet, the Stop button is being captured for internal use. I am trying to create a function that achieves effect similar to pressing the Stop button, i.e., the disk is stopped and subsequent pressing of Play restarts the disk and Xlets.
To remove unnecessary complexities, I am using "hello world" Xlet generated automatically by NetBeans. Only addition to it is add UserEventListener to look for any keystroke to terminate the Xlet. I have tried the following to achieve this functionality unsuccessfully (on TMT and on Sony BDPS 360)
1. Cleanup and notifyDestroyed() - makes the screen blank but the BD player is left in some state where the Play key does not start Xlet again. Ejecting and reinserting starts Xlet just fine.
2. destroyXlet(true) - Called it from an independent thread - has exactly the same effect as notifyDestroyed().
3. System.exit(1) - results in security exception.
4. Tried to throw exceptions - tried RuntimeException, IndexOutOfBoundsException, and DivideByZeroException - seem to have no effect on Xlet.
I would appreciate any guidance. Thanks in advance.
Message was edited by: vinaykagarwal