Modifying a DOM Property in html.Video - Dash Video Component

I am following dash-player Dash Player Custom Component - Playing and controlling your videos with Dash . I want the video to pause at certain time but the time is always changing and it comes in 5 decimal places. For example, I want to stop the video at time 4. I am not able to do so as it’s not entering the loop because time is coming different everytime. Can anyone please suggest