Hauptadresse statt Zweitadresse, Abspielgeschwindigkeit je Video
- Weitere Adressen einer Website (z. B. www.stommer.info) leiten per 301 auf die Hauptadresse um; vorher blockierte der Browser Skripte, Schriften und Videos, die von der Hauptadresse kamen (kein Titelvideo, Ersatzschrift) - Site::origin() nimmt verbindlich das Feld domain - Videos: Abspielgeschwindigkeit 0,5x bis 1x, gilt im Titelbereich und Rundgang Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b5ff837dcd
commit
cc47cac93e
14 files changed
+113
-16
No files matched your search
@@ -51,6 +51,15 @@ public static function configure(Schema $schema): Schema
|
||||
->default(fn (): ?int => app(CurrentProperty::class)->id())
|
||||
->placeholder('– keine (z. B. Umgebung) –')
|
||||
->live(),
|
||||
Select::make('playback_rate')
|
||||
->label('Abspielgeschwindigkeit')
|
||||
->helperText('Gilt überall, wo das Video gezeigt wird – im Titelbereich und im Rundgang. Drohnenflüge wirken mit 0,75× ruhiger; unter 0,6× kann die Bewegung ruckeln. Kapitelzeiten bleiben gleich.')
|
||||
->options(Video::PLAYBACK_RATES)
|
||||
->formatStateUsing(fn (mixed $state): string => self::rateKey($state))
|
||||
->dehydrateStateUsing(fn (mixed $state): float => (float) $state)
|
||||
->default('1')
|
||||
->selectablePlaceholder(false)
|
||||
->required(),
|
||||
Section::make('Kapitel')
|
||||
->description('Für den Rundgang: Besucher springen per Knopf zu einem Raum. Ist ein Raum aus dem Grundriss gewählt, bietet der Grundriss bei diesem Raum „Im Video ansehen“ an.')
|
||||
->collapsible()
|
||||
@@ -87,6 +96,16 @@ public static function configure(Schema $schema): Schema
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Option key for a stored rate (0.75 → "0.75", 1.0 → "1"); unknown values fall back to the original speed.
|
||||
*/
|
||||
public static function rateKey(mixed $rate): string
|
||||
{
|
||||
$key = rtrim(rtrim(number_format((float) ($rate ?: 1), 2, '.', ''), '0'), '.');
|
||||
|
||||
return array_key_exists($key, Video::PLAYBACK_RATES) ? $key : '1';
|
||||
}
|
||||
|
||||
/**
|
||||
* Names of the visible floor plan rooms of the apartment (name => name).
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user