add js api for timeline object