@livepeer/core
Advanced tools
Comparing version 3.1.15 to 3.1.16
@@ -628,2 +628,3 @@ import { StoreApi } from 'zustand/vanilla'; | ||
firstFrameTime: number | null; | ||
bootMs: number; | ||
retryCount: number; | ||
@@ -638,3 +639,3 @@ connected: boolean; | ||
timeUnpaused: Timer; | ||
constructor(store: MediaControllerStore, opts: MetricsOpts | undefined); | ||
constructor(store: MediaControllerStore, bootMs: number, opts: MetricsOpts | undefined); | ||
addError(error: string): void; | ||
@@ -641,0 +642,0 @@ getFirstPlayback(): number | null; |
@@ -1106,2 +1106,3 @@ // src/media/controller.ts | ||
firstFrameTime = null; | ||
bootMs; | ||
retryCount = 0; | ||
@@ -1116,5 +1117,6 @@ connected = false; | ||
timeUnpaused = new Timer(); | ||
constructor(store, opts) { | ||
constructor(store, bootMs, opts) { | ||
const currentState = store.getState(); | ||
this.store = store; | ||
this.bootMs = bootMs; | ||
const windowHref = typeof window !== "undefined" ? window?.location?.href ?? "" : ""; | ||
@@ -1212,3 +1214,3 @@ const pageUrl = isInIframe() ? typeof document !== "undefined" ? document?.referrer || windowHref : windowHref : windowHref; | ||
setFirstPlayback() { | ||
this.currentMetrics.firstPlayback = Date.now() - bootMs; | ||
this.currentMetrics.firstPlayback = Date.now() - this.bootMs; | ||
} | ||
@@ -1219,3 +1221,3 @@ getFirstFrameTime() { | ||
setFirstFrameTime() { | ||
this.firstFrameTime = Date.now() - bootMs; | ||
this.firstFrameTime = Date.now() - this.bootMs; | ||
} | ||
@@ -1255,4 +1257,4 @@ setPlaybackScore(playbackScore) { | ||
}; | ||
var bootMs = Date.now(); | ||
function addMediaMetricsToStore(store, opts) { | ||
const bootMs = Date.now(); | ||
const defaultResponse = { | ||
@@ -1273,3 +1275,3 @@ metrics: null, | ||
let enabled = true; | ||
const metricsStatus = new MetricsStatus(store, opts); | ||
const metricsStatus = new MetricsStatus(store, bootMs, opts); | ||
const monitor = new PlaybackMonitor(store); | ||
@@ -1276,0 +1278,0 @@ const report = async () => { |
declare const version: { | ||
readonly core: "@livepeer/core@3.1.15"; | ||
readonly react: "@livepeer/react@4.1.15"; | ||
readonly core: "@livepeer/core@3.1.16"; | ||
readonly react: "@livepeer/react@4.1.16"; | ||
}; | ||
export { version }; |
// src/version.ts | ||
var core = "@livepeer/core@3.1.15"; | ||
var react = "@livepeer/react@4.1.15"; | ||
var core = "@livepeer/core@3.1.16"; | ||
var react = "@livepeer/react@4.1.16"; | ||
var version = { | ||
@@ -5,0 +5,0 @@ core, |
@@ -6,3 +6,3 @@ { | ||
"type": "module", | ||
"version": "3.1.15", | ||
"version": "3.1.16", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
602445
5591