video resize dynamically using javascript