VIdeo question - why does it not resize? | XM Community
Skip to main content
Solved

VIdeo question - why does it not resize?

  • May 29, 2018
  • 4 replies
  • 1321 views

Forum|alt.badge.img+2
I'm using a video in one of my questionnaires but the Video does not automatically resize on mobile devices, but images do? Is there something I can do to make the video resize automatically?

Best answer by AndrewWKU

Qualtrics is right, a bit of custom code would be required to make this look perfect. An 80% solution that's a bit easier to implement would be to add a CSS style of width: 100%; to the video, leaving the iframe height alone. 1. Open your survey. 2. Click on the question editor where the video is embedded. 3. Choose the HTML View tab. Locate the `<iframe>` tag. 4. Remove the `width="000"` attribute. 5. Before `height="315"`, add this style attribute: `style="width:100%;"` Here's a sample of what my finished HTML looks like: `<iframe style="width:100%;" height="315" src="https://www.youtube.com/embed/0000000" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>`

4 replies

  • 8 replies
  • May 29, 2018
Is your video uploaded directly to Qualtrics, or is it embedded from another source like YouTube or Vimeo? You may just need to tweak the embed code. If the code includes fixed sizes, try removing these and see if the video takes the size of it's parent container.

Forum|alt.badge.img+2
  • Author
  • 5 replies
  • May 30, 2018
Currently using a Youtube link so there is no embed code being used. What would be the best way to go about this and have you ever done it? Qualtrics support said it is not possible to make this automatically resize without custom HTML code at the moment.

  • 8 replies
  • Answer
  • May 30, 2018
Qualtrics is right, a bit of custom code would be required to make this look perfect. An 80% solution that's a bit easier to implement would be to add a CSS style of width: 100%; to the video, leaving the iframe height alone. 1. Open your survey. 2. Click on the question editor where the video is embedded. 3. Choose the HTML View tab. Locate the `<iframe>` tag. 4. Remove the `width="000"` attribute. 5. Before `height="315"`, add this style attribute: `style="width:100%;"` Here's a sample of what my finished HTML looks like: `<iframe style="width:100%;" height="315" src="https://www.youtube.com/embed/0000000" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>`

Forum|alt.badge.img+2
  • Author
  • 5 replies
  • May 30, 2018
This seems to do the trick for now. Thanks @AndrewWKU