This is sort of true. But the speed was measured other ways as well, and ultimately the person who made the real realization about lightspeed was James Clerk Maxwell. Here is the page in his book where he notes the investigations into magnetism and electricity had derived the same speed and so concludes, on this page, that light was among other types of observable energy composed of transverse electromagnetic waves that also moved at lightspeed. This what where the speed was understood as a universal constant for any observer. Later, Einstein, in some pretty simple (but amazing) algebra, took Maxwell's observation that lightspeed was always being measured or calculated as a constant to the conclusion of special relativity and time dilation being as real as rain.
https://medium.com/liecatcher/who-is-james-clerk-maxwell-c14a956d530