Docs

API

useOnPlay method

loopic.useOnPlay([middlewareFunction])

  • middlewareFunction Function
    • next Function

Description

Method used for adding additional middleware functions to the play pipeline. Middleware functions will be called in the same order as they were added to the pipeline.

Middleware function receives the reference to the next middleware function in the pipeline. Next function must be called if you want to execute all other middlewares left for that dynamic id. If you do not want to execute left middlewares, skip adding next() call.

Example

loopic.useOnPlay((next) => {
  gotoAndPlay(30);
});