Простой способ - опрос.
const player = globalThis.ytPlayerUtilsVideoTagPoolInstance.l[0]
setTimeout(function polling() {
if (player.currentTime < 180)
setTimeout(polling, 1000)
else
player.pause()
}, 1000)
Альтернативный способ:
const player = globalThis.ytPlayerUtilsVideoTagPoolInstance.l[0]
const timer = setInterval(() => { // no need of named function as no 'async recursion' is needed
if (player.currentTime >= 180) {
player.pause()
clearInterval(timer)
}
}, 1000)