' Play a video file
PLAY "training-video.mp4"
' Play with autoplay and loop
PLAY "background.mp4" WITH OPTIONS "autoplay,loop,muted"
' Play from URL
PLAY "https://example.com/videos/demo.mp4"
TALK "Welcome to the training module!"
TALK "Let's start with an introduction video."
PLAY "intro-video.mp4" WITH OPTIONS "controls"
HEAR ready AS TEXT "Type 'continue' when you're ready to proceed:"
IF LOWER(ready) = "continue" THEN
TALK "Great! Now let's review the key concepts."
PLAY "concepts-slides.pptx"
HEAR understood AS TEXT "Did you understand the concepts? (yes/no)"
IF LOWER(understood) = "yes" THEN
TALK "Excellent! Here's your certificate."
PLAY "certificate.pdf"
ELSE
TALK "Let's review the material again."
PLAY "concepts-detailed.mp4"
END IF
END IF
' Show product images in sequence
products = FIND "products", "featured=true"
FOR EACH product IN products
TALK "Now showing: " + product.name
PLAY product.image_path
WAIT 3000 ' Wait 3 seconds between images
NEXT
' Display code for review
TALK "Let's review the implementation:"
PLAY "src/main.rs"
HEAR feedback AS TEXT "Any comments on this code?"
INSERT "code_reviews", file_path, feedback, NOW()
' Play audio message
TALK "Here's a voice message from your team:"
PLAY "team-message.mp3" WITH OPTIONS "controls"
' Play background music
PLAY "ambient.mp3" WITH OPTIONS "autoplay,loop,muted"
' Display content based on file type
HEAR file_name AS TEXT "Enter the file name to display:"
file_ext = LOWER(RIGHT(file_name, 4))
IF file_ext = ".mp4" OR file_ext = "webm" THEN
PLAY file_name WITH OPTIONS "controls,autoplay"
ELSE IF file_ext = ".pdf" THEN
PLAY file_name
ELSE IF file_ext = ".jpg" OR file_ext = ".png" THEN
PLAY file_name WITH OPTIONS "fullscreen"
ELSE
TALK "Unsupported file type"
END IF
' Play YouTube video (via embed URL)
PLAY "https://www.youtube.com/embed/dQw4w9WgXcQ"
' Play Vimeo video
PLAY "https://player.vimeo.com/video/123456789"
' Multi-step onboarding with media
TALK "Welcome to our platform! Let's get you started."
' Step 1: Welcome video
TALK "First, watch this quick introduction:"
PLAY "onboarding/welcome.mp4" WITH OPTIONS "controls"
HEAR step1_done AS TEXT "Press Enter when done..."
' Step 2: Feature overview
TALK "Here's an overview of our key features:"
PLAY "onboarding/features.pptx"
HEAR step2_done AS TEXT "Press Enter when done..."
' Step 3: Quick start guide
TALK "Finally, here's your quick start guide:"
PLAY "onboarding/quickstart.pdf"
TALK "You're all set! 🎉"
' Check if file exists before playing
file_path = "presentation.pptx"
IF FILE_EXISTS(file_path) THEN
PLAY file_path
ELSE
TALK "Sorry, the file could not be found."
TALK "Please check the file path and try again."
END IF