If there is a dark photon that kinetically mixes with the ordinary photon, then photons can oscillate into dark photons, and vice versa. These oscillations are resonantly enhanced if the dark photon mass equals the plasma mass of the ordinary photon, which tracks the electron number density. Photon to dark photon oscillations during the cosmic dark ages can distort the blackbody spectrum of the CMB. I will present the first treatment of photon to dark photon oscillations including inhomogeneities in the plasma mass. I will present the first cosmic bounds on dark photons in the mass range 10^-14 to 10^-16 eV, which follow from oscillations seeded by perturbations in the plasma mass. I will also discuss applications of dark photon to photon oscillations for 21cm cosmology.