Plyr: Video player will not auto resize after changing source on iPhone

Created on 14 May 2016  路  1Comment  路  Source: sampotts/plyr

While playing video loaded from src of the <video> tag, it's fine and the player will resize according to screen resolution.

img_1820
img_1821

But after I load a new source using plyr.source, the player will no longer auto resize, instead display the video in full size.

img_1822

Won't fix

Most helpful comment

This isn't really a bug with Plyr as such. As custom UIs for HTML5 video are not fully supported on iOS, no styles are added for it in Plyr. I'd recommend adding the following standard CSS for images, videos and audio to your build if you don't have it already:

img,
video,
audio {
    /* Prevent overflow */
    max-width: 100%;
    /* Prevent gap underneath */
    vertical-align: middle;
}

You'll see the docs have something similar.

>All comments

This isn't really a bug with Plyr as such. As custom UIs for HTML5 video are not fully supported on iOS, no styles are added for it in Plyr. I'd recommend adding the following standard CSS for images, videos and audio to your build if you don't have it already:

img,
video,
audio {
    /* Prevent overflow */
    max-width: 100%;
    /* Prevent gap underneath */
    vertical-align: middle;
}

You'll see the docs have something similar.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sparkktv picture sparkktv  路  4Comments

michaelmano picture michaelmano  路  3Comments

thang-nm picture thang-nm  路  4Comments

MTyson picture MTyson  路  3Comments

nam-co picture nam-co  路  4Comments