Moodle for mobile

iframe responsive in app doesn't work

 
Picture of Willy Gomez
iframe responsive in app doesn't work
 

Hi.

I use this code to make responsive an iframe from vimeo in my site, when used in browsers it works fine, but in app it doesn't work responsive... could you help me? thanks

CSS

.videocontenedor{ max-width: 800px; max-height: 451px; }

.video-responsive{ overflow:hidden; padding-bottom:56.25%; position:relative; height:0; }

.video-responsive iframe{ left:0; top:0; height:100%; width:100%; position:absolute; }

HTML

<div class=" videocontenedor">
<div class="video-responsive iframe">
<iframe src="https://player.vimeo.com/video/257059412" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="">
</iframe></div></div>



 
Average of ratings: -
Picture of Juan Leyva
Re: iframe responsive in app doesn't work
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi,

the CSS classes you are using are not part of the Mobile app, you should create a Moodle Mobile remote theme including those classes and try again.

See https://docs.moodle.org/dev/Moodle_Mobile_Themes

 
Average of ratings: -
Picture of Willy Gomez
Re: iframe responsive in app doesn't work
 

Gracias Juan.

El problema es que no logro hacer que un video de vimeo se comporte responsive, utilizo iframe incrustrado. Tienes idea de cómo puedo hacer para que el video  incrustrado de vimeo se comporte responsive?


Gracias miles

 
Average of ratings: -
Picture of Willy Gomez
Re: iframe responsive in app doesn't work
 
I believe that I found the problem:

In app vimeo player calls moodle/media/player/vimeo/wsplayer.php and it overrides css.

Manually I added to wsplayer.php the style needed to make responsive the iframe and it works. I know that this is not the more elegant solution. Do you think that there is another solution?

Thanks

Willy


On Tuesday, March 20, 2018, 12:26:11 AM CST, Willy Gomez (via Moodle.org) <noreply@moodle.org> wrote:


Picture of Willy Gomez
Re: iframe responsive in app doesn't work
by Willy Gomez - Tuesday, 20 March 2018, 1:55 PM
 

Gracias Juan.

El problema es que no logro hacer que un video de vimeo se comporte responsive, utilizo iframe incrustrado. Tienes idea de cómo puedo hacer para que el video  incrustrado de vimeo se comporte responsive?


Gracias miles

 
Average of ratings: -
Picture of Juan Leyva
Re: iframe responsive in app doesn't work
Core developersMoodle HQParticularly helpful MoodlersPlugin developersTesters

Hi Willy,

I think this was the only way to fix it, can you share here the code you added in the wsplayer.php file?

We were thinking in integrating similar into core.

 
Average of ratings: -