@vidtreo/recorder-vue 1.6.12 → 1.9.0

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.
Files changed (39) hide show
  1. package/README.md +292 -23
  2. package/dist/components/MobileRecordingPrompt.vue.d.ts +8 -0
  3. package/dist/components/MobileRecordingPromptToggle.vue.d.ts +12 -0
  4. package/dist/components/MobileWebRecorderUIContent.vue.d.ts +7 -0
  5. package/dist/components/NativeCameraUIContent.vue.d.ts +7 -0
  6. package/dist/components/StandardRecorder.vue.d.ts +5 -10
  7. package/dist/components/StandardRecorderContent.vue.d.ts +24 -0
  8. package/dist/components/VidtreoRecorder.vue.d.ts +5 -10
  9. package/dist/components/ui/AudioBar.vue.d.ts +40 -0
  10. package/dist/components/ui/DeviceSelector.vue.d.ts +2 -2
  11. package/dist/components/ui/PermissionFlowSteps.vue.d.ts +1 -1
  12. package/dist/components/ui/PermissionRecoveryGuide.vue.d.ts +1 -1
  13. package/dist/components/ui/PreviewContent.vue.d.ts +6 -4
  14. package/dist/components/ui/RecordingControlsButtons.vue.d.ts +5 -4
  15. package/dist/components/ui/SettingsPanel.vue.d.ts +5 -2
  16. package/dist/components/ui/TranscodingProgress.vue.d.ts +1 -0
  17. package/dist/components/ui/UploadErrorOverlay.vue.d.ts +13 -0
  18. package/dist/components/ui/UploadProgress.vue.d.ts +1 -0
  19. package/dist/components/ui/UploadProgressOverlay.vue.d.ts +7 -0
  20. package/dist/composables/use-credential-error.d.ts +9 -0
  21. package/dist/composables/use-native-camera.d.ts +4 -1
  22. package/dist/composables/use-permission-flow.d.ts +2 -1
  23. package/dist/composables/use-recorder-translations.d.ts +2 -0
  24. package/dist/composables/use-vidtreo-recorder.d.ts +6 -0
  25. package/dist/i18n/translations.d.ts +48 -1
  26. package/dist/index.d.ts +2 -1
  27. package/dist/index.js +1 -1
  28. package/dist/recorder-vue.css +1 -1
  29. package/dist/types/index.d.ts +26 -15
  30. package/dist/utils/audio-only.d.ts +3 -0
  31. package/dist/utils/button-visibility.d.ts +1 -0
  32. package/dist/utils/device-error-overlay-mapper.d.ts +30 -1
  33. package/dist/utils/env-utils.d.ts +2 -1
  34. package/dist/utils/mobile-recording-prompt.d.ts +14 -0
  35. package/dist/utils/progress-overlay.d.ts +31 -0
  36. package/dist/utils/upload-error-message.d.ts +13 -0
  37. package/dist/utils/upload-label.d.ts +11 -0
  38. package/package.json +3 -2
  39. package/dist/services/upload-service-wrapper.d.ts +0 -12
@@ -8,11 +8,11 @@ type DeviceProps = {
8
8
  enabled: boolean;
9
9
  };
10
10
  declare const __VLS_export: import("vue").DefineComponent<DeviceProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
- cameraChange: (deviceId: string) => any;
12
11
  micChange: (deviceId: string) => any;
12
+ cameraChange: (deviceId: string) => any;
13
13
  }, string, import("vue").PublicProps, Readonly<DeviceProps> & Readonly<{
14
- onCameraChange?: ((deviceId: string) => any) | undefined;
15
14
  onMicChange?: ((deviceId: string) => any) | undefined;
15
+ onCameraChange?: ((deviceId: string) => any) | undefined;
16
16
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
17
  declare const _default: typeof __VLS_export;
18
18
  export default _default;
@@ -15,7 +15,6 @@ export type PermissionFlowStepsTranslations = {
15
15
  retry: string;
16
16
  recoveryTitle: string;
17
17
  recoveryInstructions: string;
18
- recoveryGuideHint: string;
19
18
  cameraName: string;
20
19
  microphoneName: string;
21
20
  connecting: string;
@@ -28,6 +27,7 @@ type __VLS_Props = {
28
27
  recoveryData: PermissionFlowState["recoveryData"] | undefined;
29
28
  canRetry: boolean;
30
29
  translations: PermissionFlowStepsTranslations;
30
+ audioOnly?: boolean;
31
31
  };
32
32
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
33
33
  requestPermission: () => any;
@@ -1,5 +1,5 @@
1
1
  type __VLS_Props = {
2
- cameraLabel: string;
2
+ cameraLabel?: string;
3
3
  microphoneLabel: string;
4
4
  };
5
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,4 @@
1
- import type { RecorderController } from "@vidtreo/recorder";
1
+ import type { RecorderController, SourceType } from "@vidtreo/recorder";
2
2
  import type { ButtonVisibility } from "../../utils/button-visibility";
3
3
  import { type RecordingControlsButtonsTranslations } from "./RecordingControlsButtons.vue";
4
4
  export type PreviewContentState = {
@@ -25,10 +25,12 @@ export type PreviewContentTranslations = {
25
25
  cameraInUse: string;
26
26
  cameraNotFound: string;
27
27
  cameraPermissionDenied: string;
28
+ cameraTimeout: string;
28
29
  failedToStartCamera: string;
29
30
  audioInUse: string;
30
31
  audioNotFound: string;
31
32
  audioPermissionDenied: string;
33
+ audioTimeout: string;
32
34
  failedToStartAudio: string;
33
35
  switchingDevice: string;
34
36
  recordingStartsIn: string;
@@ -42,7 +44,7 @@ type __VLS_Props = {
42
44
  controller: RecorderController | null;
43
45
  audioLevel: number;
44
46
  buttonVisibility: ButtonVisibility;
45
- currentSourceType: "camera" | "screen";
47
+ currentSourceType: SourceType;
46
48
  isStopLocked: boolean;
47
49
  stopLockedTooltip: string;
48
50
  translations: PreviewContentTranslations;
@@ -53,20 +55,20 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
53
55
  resume: () => any;
54
56
  switchSource: () => any;
55
57
  download: () => any;
58
+ toggleMute: () => any;
56
59
  toggleSettings: () => any;
57
60
  startRecording: () => any;
58
61
  stopRecording: () => any;
59
- toggleMute: () => any;
60
62
  loadedChange: (loaded: boolean) => any;
61
63
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
62
64
  onPause?: (() => any) | undefined;
63
65
  onResume?: (() => any) | undefined;
64
66
  onSwitchSource?: (() => any) | undefined;
65
67
  onDownload?: (() => any) | undefined;
68
+ onToggleMute?: (() => any) | undefined;
66
69
  onToggleSettings?: (() => any) | undefined;
67
70
  onStartRecording?: (() => any) | undefined;
68
71
  onStopRecording?: (() => any) | undefined;
69
- onToggleMute?: (() => any) | undefined;
70
72
  onLoadedChange?: ((loaded: boolean) => any) | undefined;
71
73
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
72
74
  declare const _default: typeof __VLS_export;
@@ -1,3 +1,4 @@
1
+ import type { SourceType } from "@vidtreo/recorder";
1
2
  export type RecordingControlsButtonsTranslations = {
2
3
  settings: string;
3
4
  record: string;
@@ -29,7 +30,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
29
30
  isMuted: boolean;
30
31
  isAudioReady: boolean;
31
32
  isProcessingRecording: boolean;
32
- currentSourceType: "camera" | "screen";
33
+ currentSourceType: SourceType;
33
34
  isStopLocked: boolean;
34
35
  stopLockedTooltip: string;
35
36
  translations?: RecordingControlsButtonsTranslations;
@@ -38,10 +39,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
38
39
  resume: () => any;
39
40
  switchSource: () => any;
40
41
  download: () => any;
42
+ toggleMute: () => any;
41
43
  toggleSettings: () => any;
42
44
  startRecording: () => any;
43
45
  stopRecording: () => any;
44
- toggleMute: () => any;
45
46
  }, string, import("vue").PublicProps, Readonly<{
46
47
  buttonVisibility: {
47
48
  showSettingsButton: boolean;
@@ -56,7 +57,7 @@ declare const __VLS_export: import("vue").DefineComponent<{
56
57
  isMuted: boolean;
57
58
  isAudioReady: boolean;
58
59
  isProcessingRecording: boolean;
59
- currentSourceType: "camera" | "screen";
60
+ currentSourceType: SourceType;
60
61
  isStopLocked: boolean;
61
62
  stopLockedTooltip: string;
62
63
  translations?: RecordingControlsButtonsTranslations;
@@ -65,10 +66,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
65
66
  onResume?: (() => any) | undefined;
66
67
  onSwitchSource?: (() => any) | undefined;
67
68
  onDownload?: (() => any) | undefined;
69
+ onToggleMute?: (() => any) | undefined;
68
70
  onToggleSettings?: (() => any) | undefined;
69
71
  onStartRecording?: (() => any) | undefined;
70
72
  onStopRecording?: (() => any) | undefined;
71
- onToggleMute?: (() => any) | undefined;
72
73
  }>, {
73
74
  translations: RecordingControlsButtonsTranslations;
74
75
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -15,9 +15,10 @@ declare const __VLS_export: import("vue").DefineComponent<{
15
15
  selectedMic: string | null;
16
16
  };
17
17
  translations?: SettingsPanelTranslations;
18
+ audioOnly?: boolean;
18
19
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
19
- cameraChange: (value: string) => any;
20
20
  micChange: (value: string) => any;
21
+ cameraChange: (value: string) => any;
21
22
  }, string, import("vue").PublicProps, Readonly<{
22
23
  devices: {
23
24
  cameras: MediaDeviceInfo[];
@@ -26,9 +27,11 @@ declare const __VLS_export: import("vue").DefineComponent<{
26
27
  selectedMic: string | null;
27
28
  };
28
29
  translations?: SettingsPanelTranslations;
30
+ audioOnly?: boolean;
29
31
  }> & Readonly<{
30
- onCameraChange?: ((value: string) => any) | undefined;
31
32
  onMicChange?: ((value: string) => any) | undefined;
33
+ onCameraChange?: ((value: string) => any) | undefined;
32
34
  }>, {
33
35
  translations: SettingsPanelTranslations;
36
+ audioOnly: boolean;
34
37
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ label: string;
2
3
  progress: number;
3
4
  };
4
5
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,13 @@
1
+ import type { UploadErrorCode } from "@vidtreo/recorder";
2
+ import { type UploadErrorTranslations } from "../../utils/upload-error-message";
3
+ type __VLS_Props = {
4
+ errorCode: UploadErrorCode | null;
5
+ translations: UploadErrorTranslations;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
+ close: () => any;
9
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
10
+ onClose?: (() => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  type __VLS_Props = {
2
+ label: string;
2
3
  progress: number | null;
3
4
  visible: boolean;
4
5
  };
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ progress: number | null;
3
+ label: string;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import type { AccessTokenProvider } from "@vidtreo/recorder";
2
+ import { type ComputedRef } from "vue";
3
+ type CredentialSource = {
4
+ apiKey?: string;
5
+ getAccessToken?: AccessTokenProvider;
6
+ demo?: boolean;
7
+ };
8
+ export declare function useCredentialError(source: () => CredentialSource, onError: (error: Error) => void): ComputedRef<Error | null>;
9
+ export {};
@@ -1,12 +1,15 @@
1
- import { type NativeCameraFile } from "@vidtreo/recorder";
1
+ import { type NativeCameraFile, type UploadErrorCode, type UploadProgressPhase } from "@vidtreo/recorder";
2
2
  import type { UseVidtreoRecorderConfig } from "../types";
3
3
  export type NativeCameraState = {
4
4
  file: NativeCameraFile | null;
5
5
  transcodingProgress: number | null;
6
6
  uploadProgress: number | null;
7
+ uploadPhase: UploadProgressPhase | null;
8
+ uploadRetryAttempt: number | null;
7
9
  isTranscoding: boolean;
8
10
  isConfigLoading: boolean;
9
11
  error: string | null;
12
+ uploadErrorCode: UploadErrorCode | null;
10
13
  transcodedBlob: Blob | null;
11
14
  };
12
15
  export type NativeCameraActions = {
@@ -1,4 +1,4 @@
1
- import type { PermissionFlowChangeReason, PermissionFlowLanguage, PermissionFlowState, PermissionFlowStep } from "@vidtreo/recorder";
1
+ import type { PermissionFlowChangeReason, PermissionFlowLanguage, PermissionFlowMediaType, PermissionFlowState, PermissionFlowStep } from "@vidtreo/recorder";
2
2
  import { type ComputedRef, type MaybeRefOrGetter } from "vue";
3
3
  export type PermissionStepStatus = PermissionFlowState["permissions"]["camera"];
4
4
  export type PermissionFlowStepInfo = {
@@ -7,6 +7,7 @@ export type PermissionFlowStepInfo = {
7
7
  };
8
8
  export type UsePermissionFlowOptions = {
9
9
  language?: MaybeRefOrGetter<PermissionFlowLanguage | undefined>;
10
+ mediaType?: PermissionFlowMediaType;
10
11
  onComplete?: (state: PermissionFlowState) => void;
11
12
  onChange?: (state: PermissionFlowState, reason: PermissionFlowChangeReason) => void;
12
13
  };
@@ -11,10 +11,12 @@ export type PreviewTranslations = {
11
11
  cameraInUse: string;
12
12
  cameraNotFound: string;
13
13
  cameraPermissionDenied: string;
14
+ cameraTimeout: string;
14
15
  failedToStartCamera: string;
15
16
  audioInUse: string;
16
17
  audioNotFound: string;
17
18
  audioPermissionDenied: string;
19
+ audioTimeout: string;
18
20
  failedToStartAudio: string;
19
21
  switchingDevice: string;
20
22
  recordingStartsIn: string;
@@ -1,2 +1,8 @@
1
1
  import type { UseVidtreoRecorderConfig, UseVidtreoRecorderReturn } from "../types";
2
+ export declare function resolveRecorderErrorCode(code: unknown): string | null;
3
+ export declare function isRecordingLifecycleBusy(options: {
4
+ isFinalizingRecording: boolean;
5
+ transcodingProgress: number | null;
6
+ uploadProgress: number | null;
7
+ }): boolean;
2
8
  export declare function useVidtreoRecorder(config: UseVidtreoRecorderConfig): UseVidtreoRecorderReturn;
@@ -9,10 +9,12 @@ export type TranslationKeys = {
9
9
  cameraInUse: string;
10
10
  cameraNotFound: string;
11
11
  cameraPermissionDenied: string;
12
+ cameraTimeout: string;
12
13
  failedToStartCamera: string;
13
14
  audioInUse: string;
14
15
  audioNotFound: string;
15
16
  audioPermissionDenied: string;
17
+ audioTimeout: string;
16
18
  failedToStartAudio: string;
17
19
  audioErrorTitle: string;
18
20
  audioErrorMessage: string;
@@ -41,6 +43,25 @@ export type TranslationKeys = {
41
43
  cameraErrorMessage: string;
42
44
  browserErrorTitle: string;
43
45
  browserErrorMessage: string;
46
+ recordingCodecUnsupportedTitle: string;
47
+ recordingCodecUnsupportedMessage: string;
48
+ recordingMediaEmptyTitle: string;
49
+ recordingMediaEmptyMessage: string;
50
+ recordingMediaErrorTitle: string;
51
+ recordingMediaErrorMessage: string;
52
+ recordingServerTranscodeFallbackTitle: string;
53
+ recordingServerTranscodeFallbackMessage: string;
54
+ recordingTrackEndedTitle: string;
55
+ recordingTrackEndedMessage: string;
56
+ recordingFinalizeTimeoutTitle: string;
57
+ recordingFinalizeTimeoutMessage: string;
58
+ recordingStateRaceTitle: string;
59
+ recordingStateRaceMessage: string;
60
+ recordingNoFramesTitle: string;
61
+ recordingNoFramesMessage: string;
62
+ recordingUnsupportedTitle: string;
63
+ recordingUnsupportedMessage: string;
64
+ recordingPipelineRetry: string;
44
65
  genericErrorTitle: string;
45
66
  genericErrorMessage: string;
46
67
  errorRetry: string;
@@ -61,12 +82,20 @@ export type TranslationKeys = {
61
82
  microphoneConnecting: string;
62
83
  minimumRecordingTimeNotReached: string;
63
84
  uploading: string;
85
+ finalizing: string;
86
+ retryingUpload: string;
87
+ uploadInsufficientCredits: string;
88
+ uploadInsufficientCreditsTitle: string;
89
+ uploadErrorClose: string;
90
+ finishing: string;
64
91
  userInAnotherTab: string;
65
92
  download: string;
66
93
  nativeCameraSelectVideo: string;
67
94
  nativeCameraRecordVideo: string;
68
95
  nativeCameraProcessing: string;
69
96
  nativeCameraConfigLoading: string;
97
+ nativeCameraConfigLoadError: string;
98
+ nativeCameraPreviewAlt: string;
70
99
  errorTitle: string;
71
100
  errorApiKeyRequired: string;
72
101
  errorGeneric: string;
@@ -74,6 +103,8 @@ export type TranslationKeys = {
74
103
  mobileOpenCameraTitle: string;
75
104
  mobileOpenCameraDescription: string;
76
105
  mobileCloseCamera: string;
106
+ mobileHideRecordingPrompt: string;
107
+ mobileShowRecordingPrompt: string;
77
108
  mobilePermissionDenied: string;
78
109
  mobilePermissionDeniedDescription: string;
79
110
  permissionFlowTitle: string;
@@ -90,8 +121,24 @@ export type TranslationKeys = {
90
121
  permissionFlowRetry: string;
91
122
  permissionFlowRecoveryTitle: string;
92
123
  permissionFlowRecoveryInstructions: string;
93
- permissionFlowRecoveryGuideHint: string;
94
124
  permissionFlowConnecting: string;
125
+ initializingMicrophone: string;
126
+ grantMicrophonePermission: string;
127
+ retryMicrophone: string;
128
+ audioOnlyReady: string;
129
+ audioOnlyRecording: string;
130
+ audioOnlyPaused: string;
131
+ audioOnlyUploading: string;
132
+ audioOnlyUploaded: string;
133
+ audioOnlyElapsedTime: string;
134
+ audioOnlyNoMicrophones: string;
135
+ audioRecordingDisabledTitle: string;
136
+ audioRecordingDisabled: string;
137
+ permissionFlowMicrophoneOnlyTitle: string;
138
+ permissionFlowMicrophoneOnlyLabel: string;
139
+ permissionFlowMicrophoneOnlyRecoveryInstructions: string;
140
+ mobileOpenMicrophoneTitle: string;
141
+ mobileOpenMicrophoneDescription: string;
95
142
  };
96
143
  export declare const defaultTranslations: Record<string, TranslationKeys>;
97
144
  export type PartialTranslations = Partial<TranslationKeys>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import "@vidtreo/ui-styles/recorder.css";
2
+ export { CONFIG_ERROR_CREDENTIAL_CONFLICT, getUploadErrorCode, isCredentialConflictError, UPLOAD_ERROR_INSUFFICIENT_CREDITS, } from "@vidtreo/recorder";
2
3
  export { default as MobileWebRecorderUI } from "./components/MobileWebRecorderUI.vue";
3
4
  export { default as NativeCameraUI } from "./components/NativeCameraUI.vue";
4
5
  export { default as StandardRecorder } from "./components/StandardRecorder.vue";
@@ -13,4 +14,4 @@ export type { ButtonTranslations, PreviewTranslations, RecorderTranslations, Set
13
14
  export { useRecorderTranslations } from "./composables/use-recorder-translations";
14
15
  export { useVidtreoRecorder } from "./composables/use-vidtreo-recorder";
15
16
  export { defaultTranslations, getTranslations, type PartialTranslations, type TranslationKeys, } from "./i18n/translations";
16
- export type { AudioWarning, MobileMode, RecordingPrompt, RecordingPromptCountdown, RecordingPromptCountdownPlacement, RecordingState, RecordingStopResult, SourceType, UseVidtreoRecorderConfig, UseVidtreoRecorderReturn, VidtreoRecorderActions, VidtreoRecorderEmits, VidtreoRecorderProps, VidtreoRecorderState, } from "./types";
17
+ export type { AccessTokenProvider, AudioWarning, MediaType, MobileMode, RecordingPrompt, RecordingPromptCountdown, RecordingPromptCountdownPlacement, RecordingState, RecordingStopResult, RecordingUploadResult, SourceType, UploadErrorCode, UploadProgressPhase, UseVidtreoRecorderConfig, UseVidtreoRecorderReturn, VidtreoRecorderActions, VidtreoRecorderEmits, VidtreoRecorderProps, VidtreoRecorderState, } from "./types";