removed depricated checkbox and other code

This commit is contained in:
Dmitri 2026-06-07 09:35:38 +02:00
parent d29ac7c8f0
commit ade1afab7c
10 changed files with 1 additions and 35 deletions

View File

@ -29,7 +29,6 @@ interface BackgroundSettingsEditorProps {
videoEndTime?: number | null;
onVideoSettingsChange?: (settings: VideoPlaybackSettings) => void;
// Audio-specific playback settings (only used when type='audio')
audioAutoplay?: boolean;
audioLoop?: boolean;
audioStartTime?: number | null;
audioEndTime?: number | null;
@ -55,7 +54,6 @@ const BackgroundSettingsEditor: React.FC<BackgroundSettingsEditorProps> = ({
videoStartTime,
videoEndTime,
onVideoSettingsChange,
audioAutoplay,
audioLoop,
audioStartTime,
audioEndTime,
@ -195,18 +193,6 @@ const BackgroundSettingsEditor: React.FC<BackgroundSettingsEditorProps> = ({
Playback Settings
</p>
<label className='flex cursor-pointer items-center gap-2 text-[11px] text-white/80'>
<input
type='checkbox'
className='h-3 w-3 rounded border-gray-300'
checked={audioAutoplay ?? true}
onChange={(e) =>
onAudioSettingsChange({ autoplay: e.target.checked })
}
/>
Autoplay
</label>
<label className='flex cursor-pointer items-center gap-2 text-[11px] text-white/80'>
<input
type='checkbox'

View File

@ -64,7 +64,6 @@ interface CanvasBackgroundProps {
/** Pause video playback (e.g., during navigation to show frozen frame) */
pauseVideo?: boolean;
// Audio playback settings
audioAutoplay?: boolean;
audioLoop?: boolean;
audioStartTime?: number | null;
audioEndTime?: number | null;
@ -91,7 +90,6 @@ const CanvasBackground: React.FC<CanvasBackgroundProps> = ({
videoEndTime = null,
videoStoragePath,
pauseVideo = false,
audioAutoplay = true,
audioLoop = true,
audioStartTime = null,
audioEndTime = null,
@ -124,7 +122,6 @@ const CanvasBackground: React.FC<CanvasBackgroundProps> = ({
const { audioRef } = useBackgroundAudioPlayback({
audioUrl: backgroundAudioUrl,
audioStoragePath: audioStoragePath || backgroundAudioUrl,
autoplay: audioAutoplay,
loop: audioLoop,
startTime: audioStartTime,
endTime: audioEndTime,

View File

@ -241,7 +241,6 @@ export function ElementEditorPanel({
options={assetOptions.audio}
durationNote={durationNotes.backgroundAudio}
onChange={setBackgroundAudioUrl}
audioAutoplay={pageBackground.audioSettings.autoplay}
audioLoop={pageBackground.audioSettings.loop}
audioStartTime={pageBackground.audioSettings.startTime}
audioEndTime={pageBackground.audioSettings.endTime}

View File

@ -140,7 +140,6 @@ export interface BackgroundSettingsEditorProps {
videoEndTime?: number | null;
onVideoSettingsChange?: (settings: VideoPlaybackSettings) => void;
// Audio-specific playback settings (only used when type='audio')
audioAutoplay?: boolean;
audioLoop?: boolean;
audioStartTime?: number | null;
audioEndTime?: number | null;

View File

@ -691,7 +691,6 @@ export default function RuntimePresentation({
: null;
// Background audio playback settings from selected page
const audioAutoplay = selectedPage?.background_audio_autoplay ?? true;
const audioLoop = selectedPage?.background_audio_loop ?? true;
const audioStartTime =
selectedPage?.background_audio_start_time != null
@ -862,7 +861,6 @@ export default function RuntimePresentation({
pendingTransitionComplete ||
navIsSwitching
}
audioAutoplay={audioAutoplay}
audioLoop={audioLoop}
audioStartTime={audioStartTime}
audioEndTime={audioEndTime}

View File

@ -23,8 +23,6 @@ export interface UseBackgroundAudioPlaybackOptions {
audioUrl?: string;
/** Original storage path for play-once tracking (stable across navigations) */
audioStoragePath?: string;
/** Whether to autoplay the audio (default: true) */
autoplay?: boolean;
/** Whether to loop the audio (default: true) */
loop?: boolean;
/** Start time in seconds (default: null = start from beginning) */
@ -52,7 +50,6 @@ export interface UseBackgroundAudioPlaybackResult {
* @example
* const { audioRef } = useBackgroundAudioPlayback({
* audioUrl: 'https://example.com/audio.mp3',
* autoplay: true,
* loop: true,
* startTime: 2.5,
* endTime: 10.0,
@ -63,7 +60,6 @@ export interface UseBackgroundAudioPlaybackResult {
export function useBackgroundAudioPlayback({
audioUrl,
audioStoragePath,
autoplay = true,
loop = true,
startTime = null,
endTime = null,
@ -198,7 +194,7 @@ export function useBackgroundAudioPlayback({
audio.pause();
backgroundAudioController.setWaitingForInteraction(false);
}
}, [audioUrl, autoplay, paused, shouldBlockAutoplay]);
}, [audioUrl, paused, shouldBlockAutoplay]);
// Session-scoped "play once" behavior when loop is disabled
// Audio that has already played stops on revisit

View File

@ -137,7 +137,6 @@ export function useConstructorPageActions({
endTime: backgroundVideoEndTime,
},
audioSettings: {
autoplay: backgroundAudioAutoplay,
loop: backgroundAudioLoop,
startTime: backgroundAudioStartTime,
endTime: backgroundAudioEndTime,
@ -217,7 +216,6 @@ export function useConstructorPageActions({
background_video_muted: backgroundVideoMuted,
background_video_start_time: backgroundVideoStartTime,
background_video_end_time: backgroundVideoEndTime,
background_audio_autoplay: backgroundAudioAutoplay,
background_audio_loop: backgroundAudioLoop,
background_audio_start_time: backgroundAudioStartTime,
background_audio_end_time: backgroundAudioEndTime,

View File

@ -80,7 +80,6 @@ export interface UsePageBackgroundResult {
backgroundVideoMuted: boolean;
backgroundVideoStartTime: number | null;
backgroundVideoEndTime: number | null;
backgroundAudioAutoplay: boolean;
backgroundAudioLoop: boolean;
backgroundAudioStartTime: number | null;
backgroundAudioEndTime: number | null;
@ -196,7 +195,6 @@ export function usePageBackground(
backgroundVideoMuted: background.videoSettings.muted,
backgroundVideoStartTime: background.videoSettings.startTime,
backgroundVideoEndTime: background.videoSettings.endTime,
backgroundAudioAutoplay: background.audioSettings.autoplay,
backgroundAudioLoop: background.audioSettings.loop,
backgroundAudioStartTime: background.audioSettings.startTime,
backgroundAudioEndTime: background.audioSettings.endTime,

View File

@ -220,7 +220,6 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => {
backgroundVideoMuted,
backgroundVideoStartTime,
backgroundVideoEndTime,
backgroundAudioAutoplay,
backgroundAudioLoop,
backgroundAudioStartTime,
backgroundAudioEndTime,
@ -1863,7 +1862,6 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => {
pendingTransitionComplete ||
navIsSwitching
}
audioAutoplay={backgroundAudioAutoplay}
audioLoop={backgroundAudioLoop}
audioStartTime={backgroundAudioStartTime}
audioEndTime={backgroundAudioEndTime}

View File

@ -801,7 +801,6 @@ export interface PageBackgroundVideoSettings {
* Audio playback settings for page background
*/
export interface PageBackgroundAudioSettings {
autoplay: boolean;
loop: boolean;
startTime: number | null;
endTime: number | null;
@ -839,7 +838,6 @@ export const DEFAULT_VIDEO_SETTINGS: PageBackgroundVideoSettings = {
* Default audio settings
*/
export const DEFAULT_AUDIO_SETTINGS: PageBackgroundAudioSettings = {
autoplay: true,
loop: true,
startTime: null,
endTime: null,
@ -897,7 +895,6 @@ export function createPageBackgroundFromPage(
: null,
},
audioSettings: {
autoplay: page.background_audio_autoplay ?? true,
loop: page.background_audio_loop ?? true,
startTime:
page.background_audio_start_time != null