Feature Request - YouTube Auto-Pause: only pause on learning/suggested words

For the YouTube extension, I modified the auto-pause function to only pause on words marked learning, or suggested learning.

This means the auto-pause function only pauses the video when there is a word you need to learn, not after every subtitle. It’s a great quality of life change and makes learning much more fluid.

Could you please implement into the base product? (maybe make configurable?)

In pageScript_lly.min.js

var a=n(2),i=n(17),r=n.n(i),o=n(3),s=n(32),l=n(20),u=n(26),lrAutoPauseWordStore=n(14);let c,d=r.a; to import the vocabulary./word state into playback module.

then change
function lrShouldAutoPauseOnSub(e,t){var n;if(!e||!e.nlp||!e.nlp.subs||!e.nlp.subs[t])return!1;const i=(null===(n=e.tm)||void 0===n?void 0:n.langCode_G)||"en";for(const n of e.nlp.subs[t]){const e=lrAutoPauseWordStore.a.getWordDisplayStyling(n,i,null,null),t=(null==e?void 0:e.wordState),a=((null==e?void 0:e.color)||"").toLowerCase();if(("ML"===t||"PL"===t)&&"#fff"!==a&&"#ffffff"!==a&&"white"!==a)return!0}return!1}

then gate the auto-pause branch with this helper (YouTube only)

if(!a.b.get("autoPause")||c.__IS_YOUTUBE&&!lrShouldAutoPauseOnSub(e,h.index)||"NONE"!==h.pauseState&&"HOVER-HOLD-SCHEDULED"!==h.pauseState)

^ suggested change, obviously your version will not be minified.

Thanks very much for your consideration.

Hello @BenX! Thank you for taking the time to share this. It could indeed be useful in practice. I’ve passed this along to the team so they can discuss the possibility of implementing this feature. :slightly_smiling_face: