add http video and preview functionality

Basically just tweaked the js to accommodate a more consistent and DRYer preview