Factorize timeline code in VideoEngine