Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

resizing video for mobile

More
2 years 8 months ago #223943 by uba
resizing video for mobile was created by uba
Please help us help you and fill where relevant:
Your LimeSurvey version: 3.27
Own server or LimeSurvey hosting: own
Theme: fruity

==================
Hi, in my survey I have a series of short videos that I show to respondents. After each video respondents rate how much they liked the video on a scale of 1 to 7. Each video is set to a width of 420px and a height of 315, as such:

<video controls="" height="315" width="420"><source src=" www.mysite.org/audioandvideo/video files/abstractbw.mp4" />

This works fine on a laptop or tablet, but on my mobile phone the video is too wide for the screen.  In cases such as this I'd like the videos to resize so that they occupy 100% of the screen rather than being chopped off. I've done some internet searching and it seems I may be able use a "media query" and some CSS to accomplish what I want to do. Unfortunately because my knowledge of CSS is very poor I'm still unable to understand exactly what I need to do. If anyone one can offer some help it would be greatly appreciated.  
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 8 months ago #223955 by DenisChenu
Replied by DenisChenu on topic resizing video for mobile
Maybe same than ipg can work ?

<video controls="" style="max-width:100%;height:auto">

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The following user(s) said Thank You: uba
The topic has been locked.
More
2 years 8 months ago #223971 by uba
Replied by uba on topic resizing video for mobile
Yes that works Denis, thanks!
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
2 years 8 months ago #224074 by DenisChenu
Replied by DenisChenu on topic resizing video for mobile
Unsure,
Maybe you can add rthis directly in custom.css
Code:
video,img {
    max-width: 100% !important;
    height: auto !important;
}

And still use width/height

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
2 years 8 months ago #224077 by uba
Replied by uba on topic resizing video for mobile
Hi, I added that to custom.css (fruity template) but it didn't seem to have an effect. However your previous solution works, and I am able to specify width and height:

<video controls="" height="315" style="max-width:100%;height:auto" width="420"><source src=" www.mysite.org/audioandvideo/video files/abstractbw.mp4" /> 
The following user(s) said Thank You: DenisChenu
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose