moved video logic into ImagePanel