@livepeer/core
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -539,3 +539,3 @@ import { StoreApi } from 'zustand/vanilla'; | ||
}; | ||
declare const createControllerStore: ({ device, storage, src, initialProps, }: { | ||
declare const createControllerStore: ({ device, storage, src, initialProps, playbackId, }: { | ||
device: DeviceInformation; | ||
@@ -545,2 +545,3 @@ storage: ClientStorage; | ||
initialProps: Partial<InitialProps>; | ||
playbackId?: string | undefined; | ||
}) => { | ||
@@ -547,0 +548,0 @@ store: MediaControllerStore; |
@@ -98,2 +98,3 @@ // src/media/controller.ts | ||
var ASSET_URL_PART_VALUE = "hls"; | ||
var FLV_URL_PART_VALUE = "flv"; | ||
var WEBRTC_URL_PART_VALUE = "webrtc"; | ||
@@ -106,4 +107,5 @@ var RECORDING_URL_PART_VALUE = "recordings"; | ||
const includesWebRtcUrl = parts.includes(WEBRTC_URL_PART_VALUE); | ||
const includesFlvUrl = parts.includes(FLV_URL_PART_VALUE); | ||
const includesRecording = parts.includes(RECORDING_URL_PART_VALUE); | ||
const playbackId = includesWebRtcUrl ? parts?.[(parts?.length ?? 0) - 1] : includesRecording || includesAssetUrl ? parts?.[(parts?.length ?? 0) - 2] ?? null : null; | ||
const playbackId = includesWebRtcUrl || includesFlvUrl ? parts?.[(parts?.length ?? 0) - 1] : includesRecording || includesAssetUrl ? parts?.[(parts?.length ?? 0) - 2] ?? null : null; | ||
if (playbackId?.includes("+")) { | ||
@@ -547,3 +549,4 @@ const split = playbackId.split("+")?.[1]; | ||
src, | ||
initialProps | ||
initialProps, | ||
playbackId | ||
}) => { | ||
@@ -580,3 +583,3 @@ const resolvedStorage = initialProps?.storage === null ? createStorage({ | ||
muted: initialVolume === 0, | ||
playbackId: parsedInputSource?.playbackId ?? null, | ||
playbackId: playbackId ?? parsedInputSource?.playbackId ?? null, | ||
playbackOffsetMs: null, | ||
@@ -811,3 +814,3 @@ playLastTime: 0, | ||
...__controls, | ||
playbackId: parsedSourceNew.playbackId | ||
playbackId: playbackId ?? parsedSourceNew.playbackId | ||
} | ||
@@ -1012,3 +1015,3 @@ }; | ||
...base.__controls, | ||
playbackId: parsedSourceNew?.playbackId ?? null | ||
playbackId: playbackId ?? parsedSourceNew?.playbackId ?? null | ||
} | ||
@@ -1182,3 +1185,2 @@ }; | ||
this.destroy = store.subscribe((state, prevState) => { | ||
console.log(state); | ||
if (this.requestedPlayTime === null && state.__controls.playLastTime !== 0) { | ||
@@ -1317,3 +1319,2 @@ this.requestedPlayTime = Math.max( | ||
try { | ||
console.log({ playbackId, currentSource }); | ||
if (!playbackId || !currentSource) { | ||
@@ -1320,0 +1321,0 @@ return null; |
declare const version: { | ||
readonly core: "@livepeer/core@3.1.4"; | ||
readonly react: "@livepeer/react@4.1.4"; | ||
readonly core: "@livepeer/core@3.1.5"; | ||
readonly react: "@livepeer/react@4.1.5"; | ||
}; | ||
export { version }; |
// src/version.ts | ||
var core = "@livepeer/core@3.1.4"; | ||
var react = "@livepeer/react@4.1.4"; | ||
var core = "@livepeer/core@3.1.5"; | ||
var react = "@livepeer/react@4.1.5"; | ||
var version = { | ||
@@ -5,0 +5,0 @@ core, |
@@ -6,3 +6,3 @@ { | ||
"type": "module", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
598786
5572