Skip to content

Changelog on 1.3.0

Compare
Choose a tag to compare
@liuruenshen liuruenshen released this 30 Jun 05:37
· 57 commits to gh-pages since this release

SDK URL

https://app.straas.net/sdk/1.3.0/player-sdk.js

Add new property on a player instance

[Player instance].currentLiveDateTime

This property returns recorded date & time on playback video if it is available, otherwise null is returned.

The value of the property is measured in milliseconds which is the same as:

(new Date()).getTime()

Example:

window['StraaSOnInit'] = function StraaSOnInit() {
  Player = window.StraaS.Player

  playerInstance = new Player('#player', {
    id: VIDEO_ID,
    accountId: ACCOUNT_ID,
    type: Player.Type.VIDEO,
    events: {
      timeupdate: function (event) {
        console.log('[recorded video time(ms)]', event.target.currentLiveDateTime)
      }
    },
  })
}