@clappr/hlsjs-playback 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clappr/hlsjs-playback",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "HLS Playback based on hls.js",
5
5
  "main": "./dist/hlsjs-playback.js",
6
6
  "module": "./dist/hlsjs-playback.esm.js",
@@ -15,7 +15,8 @@
15
15
  "test:debug": "node --inspect node_modules/.bin/jest ./src --runInBand",
16
16
  "test:watch": "jest ./src --watch",
17
17
  "lint": "eslint *.js ./src",
18
- "lint:fix": "yarn lint -- --fix"
18
+ "lint:fix": "yarn lint -- --fix",
19
+ "prepublishOnly": "npm run release"
19
20
  },
20
21
  "files": [
21
22
  "/dist",
package/src/hls.js CHANGED
@@ -40,6 +40,14 @@ export default class HlsjsPlayback extends HTML5Video {
40
40
  this._hls.currentLevel = this._currentLevel
41
41
  }
42
42
 
43
+ get latency() {
44
+ return this._hls.latency
45
+ }
46
+
47
+ get currentProgramDateTime() {
48
+ return this._hls.playingDate
49
+ }
50
+
43
51
  get _startTime() {
44
52
  if (this._playbackType === Playback.LIVE && this._playlistType !== 'EVENT')
45
53
  return this._extrapolatedStartTime