Refactored videopreview plugin.