My current understanding of this is that Safari will select clip.mp4 over clip-hevc.mp4 on devices where native hardware HEVC decoding is not supported. I originally ran this code on an older MacBook without hardware HEVC. The code snippet I posted will work as intended on a newer device.