There have been some attempts at making a HTML5 video system that switches between SD and HD: http://www.miracletutorials.com/switch-low-to-hd-video-part1/ is one example. Sublime Video had an implementation which might still work: http://docs.sublimevideo.net/releases