Skip to content
HomePagesHomePages template kit

media

Typed references into the dev media pack, for fixture authoring: `media.photo(id)` references a pack image asset (photo, floor plan, or library graphic); `media.video(id)` a hosted video; `media.video.link(url, provider?, { poster? })` a provider embed, optionally with a pack image as its poster; `media.video.none` the deliberately-unfilled video branch; `media.tour(id)` a pooled 3D tour and `media.tour.none` the unfilled one; `media.document(id)` a pack document.

Typed references into the dev media pack, for fixture authoring: media.photo(id) references a pack image asset (photo, floor plan, or library graphic); media.video(id) a hosted video; media.video.link(url, provider?, { poster? }) a provider embed, optionally with a pack image as its poster; media.video.none the deliberately-unfilled video branch; media.tour(id) a pooled 3D tour and media.tour.none the unfilled one; media.document(id) a pack document. Every id is checked against the pack’s catalog at compile time.

Import from @homepages/template-kit/fixtures.

const media: {
photo: typeof photoRef;
video: typeof hostedVideo & {
link: typeof linkVideo;
none: NoVideoRef;
};
tour: typeof tourRef & { none: TourRef };
document: typeof documentRef;
}