@g9tm/lynxcontrols-intro-carousel
G9IntroCarousel: full-screen onboarding slides (MAUI G9MAUIControls.IntroCarousel) with one media slot (video or
image) behind a flat or gradient overlay, logo, localized title and subtitle, step pills, previous / next, a language
button and the sign-in call to action. Slides swipe through lynx-ui Swiper. Depends on @g9tm/lynxcontrols-foundation and
@g9tm/lynxcontrols only. Migration table: docs/migration/IntroCarousel.Controls.md.
import { G9IntroCarousel, useIntroCarousel } from '@g9tm/lynxcontrols-intro-carousel';
const intro = useIntroCarousel();
<G9IntroCarousel
controller={intro}
autoBegin={false} // call intro.beginPresentation() once the page is on screen
slides={[
{ videoAssetPath: 'Onboarding/1video.mp4', imageSource: 'slide1.png', titleResourceKey: 'IntroSlide1Title', subtitleResourceKey: 'IntroSlide1Subtitle' },
{ imageSource: 'slide2.png', titleResourceKey: 'IntroSlide2Title' },
]}
useGradientOverlay
onLanguage={openLanguagePicker}
onComplete={() => setIntroVisible(false)}
onFirstContentReady={() => host.release()} // dismiss the page splash once the first frame is up
onMediaFallback={(index, reason) => log(index, reason)}
/>
Media
- Video goes through
services.media:resolve(source)thencreatePlayer(media, { loop, muted, startSeconds, nearEndSeconds })→{ view, play, pause, dispose, subscribe }.viewis the platform video element your provider builds (the host registers the video XElement); the carousel never names a video tag. - On Android and iOS use
createNativeMediaProvider()from@g9tm/lynxcontrols-native/media: bundled assets resolve through the host (asset:///…from the APKassets/,file://…from the iOS bundle), and players render the<g9-video>element (Media3 ExoPlayer / AVQueuePlayer + AVPlayerLooper; register it as the integration guides show). Desktop has no video element yet (decision D14): the Lynxtron services provide nomedia, so the carousel shows its images with'no-media-provider'. - One player at a time (MAUI's single
MediaElement): a slide change fades the current media out (mediaFadeOutDurationMs), disposes its player, then loads the next slide's media and fades it in (mediaFadeInDurationMs); the very first reveal is immediate withskipFirstSlideInitialFadeIn. Loop fades come from the player'snearEnd/loopedevents (useVideoLoopFade). - Fallback. When a video slide cannot play, its image shows and
onMediaFallback(index, reason)reports'no-media-provider','video-unsupported'(the provider'ssupportsVideo()is false — desktop until decision D14 is resolved; the contract itself is not reduced) or'video-failed'(resolve, create or playback error). - Release. The player is disposed on slide change, when
activeturns false (page in the background, carousel hidden), onstopAndReleaseMedia()and on unmount. - Readiness.
onFirstContentReadyfires once: the first video frame is revealed, its fallback image is shown, or the slide has nothing to show.startupCoverImageSource+startupCoverDurationMskeep a poster up for at least that long and until media is ready, then fade it (startupCoverFadeDurationMs).
Chrome
Title and subtitle are string keys resolved through the app's provider (strings.resolve); Next / Previous / the
call to action resolve IntroNext, IntroPrevious and IntroSignIn with English fallbacks. In RTL the Next and
Previous targets swap sides and their chevrons flip, and the swiper runs RTL. No text shadows (MAUI removed them):
readability comes from the overlay.
Video playback per platform is a device check (ledger N-046).