Documentation

Show Embedded Content

When and Why to Use

Use this to embed third-party content - currently only YouTube videos - within your survey. This is ideal for:

  • Testing reactions to public video content
  • Presenting branded content hosted externally
  • Gating progression until content has been viewed for a set time
Chat Style
  • Video is centered with the prompt text above
  • A countdown prevents the user from continuing until the specified duration has passed
Traditional Style
  • Layout shifts to embed the video more prominently
  • Countdown behavior is the same
  • Works with both mobile and remote input interfaces
Chat styleTraditionalTraditional - mobile
StandardStandardShow Embedded Content Figure 01
Configuration Options
OptionTypeRequiredDescription
questionstryesPrompt or instruction to show above the embedded content
urlstryesYouTube video URL to embed
durationintyesNumber of seconds to lock the screen before advancing
Example Code
from survey import Survey

s = Survey(**globals())

s.embed_content(
    "Watch this video",
    url="https://www.youtube.com/watch?v=2gcsgfzqN8k",
    duration=231
)
Notes
  • Only YouTube URLs are supported at this time
  • Users cannot skip ahead; the continue button appears only after the timer expires
  • Use in combination with follow-up questions to assess recall, sentiment, or comprehension