From 2fe8b7a0c59ca4af69e40ed56d18a2d086070495 Mon Sep 17 00:00:00 2001 From: Farhaan Bukhsh Date: Tue, 24 Jun 2025 15:56:00 +0530 Subject: [PATCH] fix: Fixes auto_advance feature for video XBlock (#35200) Signed-off-by: Farhaan Bukhsh --- xmodule/js/src/video/08_video_auto_advance_control.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/xmodule/js/src/video/08_video_auto_advance_control.js b/xmodule/js/src/video/08_video_auto_advance_control.js index 7b1a3a37e6..340ebdf99c 100644 --- a/xmodule/js/src/video/08_video_auto_advance_control.js +++ b/xmodule/js/src/video/08_video_auto_advance_control.js @@ -119,8 +119,16 @@ }, autoAdvance: function() { + // We are posting a message to the MFE and then let the eventlistener + // in the MFE handle the action taken. if (this.state.auto_advance) { - $('.sequence-nav-button.button-next').first().click(); + if (window !== window.parent) { + window.parent.postMessage({ + type: 'plugin.autoAdvance', + payload: {} + }, document.referrer + ); + } } } };