Added handling when video has ended