Fire onChapter on chapter boundaries; M returns to menu via onMenu
The menu state machine advances via onChapter events when a video crosses a chapter marker, which we never emitted - so the menu never opened naturally. Track chapter boundaries from the playlist markers and fire onChapter. Also change M to invoke the onMenu dispatcher (returns to the menu video) rather than drawing menu items directly.
This commit is contained in:
@@ -80,6 +80,8 @@ public class MoviePlayer extends BaseNativeObject {
|
||||
|
||||
if (!previousMenuMode && this.menuMode) {
|
||||
VsmxBaseObject callback = controller.getPropertyValue("onMenu");
|
||||
System.err.println("[menu] onMenu fires, callback=" + callback
|
||||
+ " (" + (callback == null ? "null" : callback.getClass().getSimpleName()) + ")");
|
||||
if (callback instanceof VsmxFunction function) {
|
||||
interpreter.interpretFunction(function, null, new VsmxBaseObject[0]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user