added video close properly and autoplay