@livepeer/core
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -569,2 +569,3 @@ /// <reference types="node" /> | ||
playbackId: string; | ||
recordings?: boolean; | ||
}; | ||
@@ -571,0 +572,0 @@ export type PlaybackInfo = { |
export declare const version: { | ||
readonly core: "@livepeer/core@2.1.2"; | ||
readonly react: "@livepeer/react@3.1.2"; | ||
readonly core: "@livepeer/core@2.1.3"; | ||
readonly react: "@livepeer/react@3.1.3"; | ||
readonly reactNative: "@livepeer/react-native@2.0.10"; | ||
}; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var client = require('./client-7e4fd284.cjs.dev.js'); | ||
var version = require('./version-80761c87.cjs.dev.js'); | ||
var version = require('./version-2bfd2d65.cjs.dev.js'); | ||
var updateStream = require('./updateStream-835a5d34.cjs.dev.js'); | ||
@@ -10,0 +10,0 @@ var getStream = require('./getStream-a1e88460.cjs.dev.js'); |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var client = require('./client-b49d615d.cjs.prod.js'); | ||
var version = require('./version-4e29784d.cjs.prod.js'); | ||
var version = require('./version-3a79b075.cjs.prod.js'); | ||
var updateStream = require('./updateStream-f8b5c94f.cjs.prod.js'); | ||
@@ -10,0 +10,0 @@ var getStream = require('./getStream-03a26cdc.cjs.prod.js'); |
export { ACCESS_CONTROL_ERROR_MESSAGE, BFRAMES_ERROR_MESSAGE, HttpError, NOT_ACCEPTABLE_ERROR_MESSAGE, STREAM_OFFLINE_ERROR_MESSAGE, STREAM_OPEN_ERROR_MESSAGE, isAccessControlError, isBframesError, isNotAcceptableError, isStreamOfflineError } from '../errors/dist/livepeer-core-errors.esm.js'; | ||
export { C as Client, c as clearClient, a as createClient, b as createStorage, n as noopStorage } from './client-8a4dc167.esm.js'; | ||
export { v as version } from './version-2296f29d.esm.js'; | ||
export { v as version } from './version-101b0412.esm.js'; | ||
export { c as createAsset, a as createClip, b as createStream, g as getAsset, d as getAssetMetrics, e as getPlaybackInfo, f as getStreamSession, h as getStreamSessions, u as updateAsset, i as updateStream, w as watchLivepeerProvider } from './updateStream-ecc4927f.esm.js'; | ||
@@ -5,0 +5,0 @@ export { g as getLivepeerProvider, a as getStream } from './getStream-fd5ec1b5.esm.js'; |
@@ -308,8 +308,6 @@ 'use strict'; | ||
const destroyPlaybackIdListener = store.subscribe(currentState => { | ||
const currentSource = currentState?.src?.src; | ||
const currentPlaybackUrl = currentState?.url; | ||
const isMounted = currentSource && currentState._element; | ||
const shouldOpenNewSocket = isMounted && currentPlaybackUrl && currentPlaybackUrl !== previousPlaybackUrl; | ||
const playbackId = currentState.playbackId; | ||
const shouldOpenNewSocket = Boolean(currentState._element) && currentPlaybackUrl && currentPlaybackUrl !== previousPlaybackUrl && playbackId && currentPlaybackUrl.includes(playbackId); | ||
if (shouldOpenNewSocket) { | ||
const playbackId = currentState.playbackId; | ||
previousPlaybackUrl = currentPlaybackUrl ?? null; | ||
@@ -316,0 +314,0 @@ try { |
@@ -308,8 +308,6 @@ 'use strict'; | ||
const destroyPlaybackIdListener = store.subscribe(currentState => { | ||
const currentSource = currentState?.src?.src; | ||
const currentPlaybackUrl = currentState?.url; | ||
const isMounted = currentSource && currentState._element; | ||
const shouldOpenNewSocket = isMounted && currentPlaybackUrl && currentPlaybackUrl !== previousPlaybackUrl; | ||
const playbackId = currentState.playbackId; | ||
const shouldOpenNewSocket = Boolean(currentState._element) && currentPlaybackUrl && currentPlaybackUrl !== previousPlaybackUrl && playbackId && currentPlaybackUrl.includes(playbackId); | ||
if (shouldOpenNewSocket) { | ||
const playbackId = currentState.playbackId; | ||
previousPlaybackUrl = currentPlaybackUrl ?? null; | ||
@@ -316,0 +314,0 @@ try { |
@@ -305,8 +305,6 @@ import { a as getMetricsReportingUrl } from '../../dist/controller-2a8486d0.esm.js'; | ||
const destroyPlaybackIdListener = store.subscribe(currentState => { | ||
const currentSource = currentState?.src?.src; | ||
const currentPlaybackUrl = currentState?.url; | ||
const isMounted = currentSource && currentState._element; | ||
const shouldOpenNewSocket = isMounted && currentPlaybackUrl && currentPlaybackUrl !== previousPlaybackUrl; | ||
const playbackId = currentState.playbackId; | ||
const shouldOpenNewSocket = Boolean(currentState._element) && currentPlaybackUrl && currentPlaybackUrl !== previousPlaybackUrl && playbackId && currentPlaybackUrl.includes(playbackId); | ||
if (shouldOpenNewSocket) { | ||
const playbackId = currentState.playbackId; | ||
previousPlaybackUrl = currentPlaybackUrl ?? null; | ||
@@ -313,0 +311,0 @@ try { |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -8,3 +8,3 @@ 'use strict'; | ||
var errors_dist_livepeerCoreErrors = require('../../../errors/dist/livepeer-core-errors.cjs.dev.js'); | ||
var version = require('../../../dist/version-80761c87.cjs.dev.js'); | ||
var version = require('../../../dist/version-2bfd2d65.cjs.dev.js'); | ||
var provider = require('../../../dist/provider-8be95bb2.cjs.dev.js'); | ||
@@ -427,4 +427,5 @@ | ||
const playbackId = typeof args === 'string' ? args : args.playbackId; | ||
const fetchRecordings = Boolean(typeof args === 'string' ? false : args.recordings); | ||
const urlEncodedPlaybackId = encodeURIComponent(playbackId); | ||
const studioPlaybackInfo = await this._get(`/playback/${urlEncodedPlaybackId}?recordings=true`, { | ||
const studioPlaybackInfo = await this._get(`/playback/${urlEncodedPlaybackId}${fetchRecordings ? '?recordings=true' : ''}`, { | ||
headers: this._defaultHeaders | ||
@@ -431,0 +432,0 @@ }); |
@@ -8,3 +8,3 @@ 'use strict'; | ||
var errors_dist_livepeerCoreErrors = require('../../../errors/dist/livepeer-core-errors.cjs.prod.js'); | ||
var version = require('../../../dist/version-4e29784d.cjs.prod.js'); | ||
var version = require('../../../dist/version-3a79b075.cjs.prod.js'); | ||
var provider = require('../../../dist/provider-81c54dc4.cjs.prod.js'); | ||
@@ -427,4 +427,5 @@ | ||
const playbackId = typeof args === 'string' ? args : args.playbackId; | ||
const fetchRecordings = Boolean(typeof args === 'string' ? false : args.recordings); | ||
const urlEncodedPlaybackId = encodeURIComponent(playbackId); | ||
const studioPlaybackInfo = await this._get(`/playback/${urlEncodedPlaybackId}?recordings=true`, { | ||
const studioPlaybackInfo = await this._get(`/playback/${urlEncodedPlaybackId}${fetchRecordings ? '?recordings=true' : ''}`, { | ||
headers: this._defaultHeaders | ||
@@ -431,0 +432,0 @@ }); |
import * as tus from 'tus-js-client'; | ||
import fetch from 'cross-fetch'; | ||
import { HttpError } from '../../../errors/dist/livepeer-core-errors.esm.js'; | ||
import { v as version } from '../../../dist/version-2296f29d.esm.js'; | ||
import { v as version } from '../../../dist/version-101b0412.esm.js'; | ||
import { d as defaultStudioConfig } from '../../../dist/provider-d7595ad8.esm.js'; | ||
@@ -399,4 +399,5 @@ | ||
const playbackId = typeof args === 'string' ? args : args.playbackId; | ||
const fetchRecordings = Boolean(typeof args === 'string' ? false : args.recordings); | ||
const urlEncodedPlaybackId = encodeURIComponent(playbackId); | ||
const studioPlaybackInfo = await this._get(`/playback/${urlEncodedPlaybackId}?recordings=true`, { | ||
const studioPlaybackInfo = await this._get(`/playback/${urlEncodedPlaybackId}${fetchRecordings ? '?recordings=true' : ''}`, { | ||
headers: this._defaultHeaders | ||
@@ -403,0 +404,0 @@ }); |
889610
34962