fix: Fixes auto_advance feature for video XBlock (#35200)

Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
This commit is contained in:
Farhaan Bukhsh
2025-06-24 15:56:00 +05:30
committed by GitHub
parent 0e9bda8a35
commit 2fe8b7a0c5

View File

@@ -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
);
}
}
}
};