The explanation you have quoted is quite misleading- time dilation cannot account for the constancy of the speed of light in all directions. As @lpz mentioned, the effect responsible is the relativity of simultaneity, and I urge you to focus on it until you are really clear about it, as it is the most important, and most often misunderstood, aspect of SR. Overlooking the effect of the relativity of simultaneity is the cause of most of the famous 'paradoxes' of SR.
Suppose you and I are moving relative to each other. For me, if it is 10.30 on my watch, it is 10.30 everywhere. 'Now' for me is a flat slice through spacetime. However, in your reference frame, my flat slice through spacetime is a sloping one, with the slope rising in your direction of motion. My time is out of synch with yours, and the effect increases with distance along our direction of relative motion.
To see how this accounts for a constant speed of light, imagine that you and a friend are standing half way between two detectors, one a light second away to the east, the other a light second away to the west. The detectors have timers which are synchronised with your friend's watch. At 12:00:00 your friend flashes a light. Exactly a light second later, at 12:00:01, the flash reaches each of the detectors, the speed to light being the same in both directions.
Now, suppose the moment your friend flashed the light, you has started walking to the east at two metres per second. How would the results of the experiment look to you? To the east, in your direction of motion, the detector fired after the light had travelled two metres less than a light second, while to the west the detector fired after the light had travelled two metres more than a light second. In your frame, the two detectors must have caught the flash at different times: the east detector caught it a fraction before 12:00:01 and the west detector caught it a fraction after 12:00:01. In other words, you and your friend disagree about what time it is at each of the detectors. From your perspective, the clock on the east detector is running slightly ahead of the real time in your frame, while the clock on the west detector is running slightly behind the real time in your frame.