How to use the @clappr/core.Log.info function in @clappr/core

To help you get started, we’ve selected a few @clappr/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github clappr / clappr-stats / src / clappr-stats.js View on Github external
_onCompletion() {
    let currentPercentage = this._metrics.extra.watchedPercentage
    let allPercentages = this._completion.watch
    let isCalled = this._completion.calls.indexOf(currentPercentage) != -1

    if (allPercentages.indexOf(currentPercentage) != -1 && !isCalled) {
      Log.info(this.name + ' PERCENTAGE_EVENT: ' + currentPercentage)
      this._completion.calls.push(currentPercentage)
      this.trigger(ClapprStats.PERCENTAGE_EVENT, currentPercentage)
    }
  }