Sound breaking up on Youtube

I use a 2018 Mac Mini (Sonoma 14.4.1) with external ruarkaudio stereo speakers. Recently, I have found when watching a Youtube video, the sound breaks up making the video almost unwatchable. This occurs spasmodically and not on any particular clip.
Is anybody else having this issue and is there a solution?

Problem solved. It was a loose optical cable I was using between the dock and speakers.