So for this, something like: $("video").playbackRate = 2
or whatever. It's nice even for players with controls (like YT) if you want more than 2x speed
Also you can just look at the video tag's internal URL and just download and play however, offline :)
At 2 or 4 times the speed I think is a simple step, just omit every two or three of four samples.
Anyway, this gives different distortions. I am Deaf so I don't hear the distortions but I understand sound in a mathematical way. At a sampling rate of 44.1k the highest representable sound is about 22kHz. At 4 times the speed this is only the fourth of it, about 5500 Hz. If higher sounds aren't filtered they will wrap around and re-appear as low frequency sounds. I imagine that this sounds very weird.
And for n not being a power of two or at 8 times or more, you need to resample sound. Transform the samples into the frequency domain and back into the time domain but sped up. This is quite a mathematically heavy operation and probably there are other limits I don't know of.