@cinecrew/cinecrew-player 0.1.5 → 0.1.6

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": "@cinecrew/cinecrew-player",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "description": "Customizable cross-platform live and on-demand video player for React and React Native.",
6
6
  "license": "MIT",
@@ -239,7 +239,7 @@ export const WebVideoPlayer = forwardRef(({
239
239
  <View style={styles.container} collapsable={false}>
240
240
  {activeUrl ? (
241
241
  <video
242
- key={activeUrl}
242
+ key={`${activeUrl}:${corsMode || 'nocors'}`}
243
243
  ref={videoRef}
244
244
  data-resolved-scheme={resolvedScheme}
245
245
  data-stream-mode={streamMode}
package/src/web/index.js CHANGED
@@ -443,6 +443,7 @@ function WebPlayerSurface({
443
443
  };
444
444
  }
445
445
  return h('video', {
446
+ key: `${directVideoSource || ''}:${corsMode || 'nocors'}`,
446
447
  ref: videoRef,
447
448
  className: 'cinecrew-player__video',
448
449
  src: directVideoSource,
@@ -1407,6 +1408,12 @@ export const CineCrewPlayer = forwardRef(function CineCrewPlayer(props, ref) {
1407
1408
  setRecordingStatus('complete');
1408
1409
  try {
1409
1410
  if (!downloadRecording(blob, title)) throw new Error('The browser did not start the recording download. Use Download recording to retry.');
1411
+ // Auto-dismiss back to idle after a successful download.
1412
+ setRecordingStatus('idle');
1413
+ recordingBlobRef.current = null;
1414
+ if (recordingDownloadLinkRef.current?.url) URL.revokeObjectURL(recordingDownloadLinkRef.current.url);
1415
+ recordingDownloadLinkRef.current = null;
1416
+ setRecordingDownloadLink(null);
1410
1417
  } catch (downloadError) {
1411
1418
  setRecordingError(downloadError?.message || 'The recording could not be downloaded. Use Download recording to retry.');
1412
1419
  }