Move settings out from foreach loop
Add local qunit to run local tests
Apply refactoring to plugin
Add test for startVideo call