@livepeer/core
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -1,3 +0,3 @@ | ||
export declare const core = "@livepeer/core@1.2.0"; | ||
export declare const react = "@livepeer/react@2.2.0"; | ||
export declare const reactNative = "@livepeer/react-native@1.2.0"; | ||
export declare const core = "@livepeer/core@1.2.1"; | ||
export declare const react = "@livepeer/react@2.2.1"; | ||
export declare const reactNative = "@livepeer/react-native@1.2.1"; |
@@ -198,2 +198,8 @@ /// <reference types="node" /> | ||
noWait?: boolean; | ||
/** | ||
* Sets the chunk size, which indicates the maximum size of the upload PATCH request | ||
* body in bytes. Defaults to 5 MB for streams, and infinity for React & React Native | ||
* environments. | ||
*/ | ||
chunkSize?: number; | ||
}; | ||
@@ -200,0 +206,0 @@ export type Metadata = { |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -33,5 +33,5 @@ 'use strict'; | ||
const core = `@livepeer/core@1.2.0`; | ||
const react = `@livepeer/react@2.2.0`; | ||
const reactNative = `@livepeer/react-native@1.2.0`; | ||
const core = `@livepeer/core@1.2.1`; | ||
const react = `@livepeer/react@2.2.1`; | ||
const reactNative = `@livepeer/react-native@1.2.1`; | ||
@@ -111,2 +111,3 @@ class BaseLivepeerProvider { | ||
const DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024; | ||
class StudioLivepeerProvider extends BaseLivepeerProvider { | ||
@@ -179,3 +180,4 @@ constructor(config) { | ||
onProgress, | ||
noWait | ||
noWait, | ||
chunkSize | ||
} = args; | ||
@@ -218,4 +220,6 @@ let progress = sources.map(source => ({ | ||
}, | ||
...(typeof File !== 'undefined' && source?.file instanceof File ? null : { | ||
chunkSize: 5 * 1024 * 1024 | ||
...(chunkSize ? { | ||
chunkSize | ||
} : typeof File !== 'undefined' && source?.file instanceof File || typeof navigator !== 'undefined' && typeof navigator.product === 'string' && navigator.product.toLowerCase() === 'reactnative' ? null : { | ||
chunkSize: DEFAULT_CHUNK_SIZE | ||
}), | ||
@@ -287,2 +291,4 @@ // fingerprint: function (file: File & { exif?: any }) { | ||
onProgress?.(progress); | ||
} else { | ||
throw new Error('Asset phase was undefined.'); | ||
} | ||
@@ -401,2 +407,3 @@ } catch (e) { | ||
meta: { | ||
...studioPlaybackInfo?.['meta'], | ||
live: Boolean(studioPlaybackInfo?.['meta']?.['live']), | ||
@@ -403,0 +410,0 @@ source: studioPlaybackInfo?.['meta']?.['source']?.map(source => ({ |
@@ -33,5 +33,5 @@ 'use strict'; | ||
const core = `@livepeer/core@1.2.0`; | ||
const react = `@livepeer/react@2.2.0`; | ||
const reactNative = `@livepeer/react-native@1.2.0`; | ||
const core = `@livepeer/core@1.2.1`; | ||
const react = `@livepeer/react@2.2.1`; | ||
const reactNative = `@livepeer/react-native@1.2.1`; | ||
@@ -111,2 +111,3 @@ class BaseLivepeerProvider { | ||
const DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024; | ||
class StudioLivepeerProvider extends BaseLivepeerProvider { | ||
@@ -179,3 +180,4 @@ constructor(config) { | ||
onProgress, | ||
noWait | ||
noWait, | ||
chunkSize | ||
} = args; | ||
@@ -218,4 +220,6 @@ let progress = sources.map(source => ({ | ||
}, | ||
...(typeof File !== 'undefined' && source?.file instanceof File ? null : { | ||
chunkSize: 5 * 1024 * 1024 | ||
...(chunkSize ? { | ||
chunkSize | ||
} : typeof File !== 'undefined' && source?.file instanceof File || typeof navigator !== 'undefined' && typeof navigator.product === 'string' && navigator.product.toLowerCase() === 'reactnative' ? null : { | ||
chunkSize: DEFAULT_CHUNK_SIZE | ||
}), | ||
@@ -287,2 +291,4 @@ // fingerprint: function (file: File & { exif?: any }) { | ||
onProgress?.(progress); | ||
} else { | ||
throw new Error('Asset phase was undefined.'); | ||
} | ||
@@ -401,2 +407,3 @@ } catch (e) { | ||
meta: { | ||
...studioPlaybackInfo?.['meta'], | ||
live: Boolean(studioPlaybackInfo?.['meta']?.['live']), | ||
@@ -403,0 +410,0 @@ source: studioPlaybackInfo?.['meta']?.['source']?.map(source => ({ |
@@ -6,5 +6,5 @@ import * as tus from 'tus-js-client'; | ||
const core = `@livepeer/core@1.2.0`; | ||
const react = `@livepeer/react@2.2.0`; | ||
const reactNative = `@livepeer/react-native@1.2.0`; | ||
const core = `@livepeer/core@1.2.1`; | ||
const react = `@livepeer/react@2.2.1`; | ||
const reactNative = `@livepeer/react-native@1.2.1`; | ||
@@ -84,2 +84,3 @@ class BaseLivepeerProvider { | ||
const DEFAULT_CHUNK_SIZE = 5 * 1024 * 1024; | ||
class StudioLivepeerProvider extends BaseLivepeerProvider { | ||
@@ -152,3 +153,4 @@ constructor(config) { | ||
onProgress, | ||
noWait | ||
noWait, | ||
chunkSize | ||
} = args; | ||
@@ -191,4 +193,6 @@ let progress = sources.map(source => ({ | ||
}, | ||
...(typeof File !== 'undefined' && source?.file instanceof File ? null : { | ||
chunkSize: 5 * 1024 * 1024 | ||
...(chunkSize ? { | ||
chunkSize | ||
} : typeof File !== 'undefined' && source?.file instanceof File || typeof navigator !== 'undefined' && typeof navigator.product === 'string' && navigator.product.toLowerCase() === 'reactnative' ? null : { | ||
chunkSize: DEFAULT_CHUNK_SIZE | ||
}), | ||
@@ -260,2 +264,4 @@ // fingerprint: function (file: File & { exif?: any }) { | ||
onProgress?.(progress); | ||
} else { | ||
throw new Error('Asset phase was undefined.'); | ||
} | ||
@@ -374,2 +380,3 @@ } catch (e) { | ||
meta: { | ||
...studioPlaybackInfo?.['meta'], | ||
live: Boolean(studioPlaybackInfo?.['meta']?.['live']), | ||
@@ -376,0 +383,0 @@ source: studioPlaybackInfo?.['meta']?.['source']?.map(source => ({ |
837547
33738