Is it possible to dynamically switch the :host
from block
to inline
when the user hits fullscreen in html5 video?
When the html5 video is full screen, there is nothing on the element itself where I could do :host(element-attribute)
.
I'm scratching my head trying to figure out a way.
<dom-module id="video-player">
<template>
<style>
:host {
display: block;
width: 100%;
position: relative;
margin-left: 100%;
}
.v-center {
@apply(--layout-horizontal);
@apply(--layout-center-center);
padding-top: 5%;
background-color: black;
overflow-y: scroll;
height: 100%;
}
video {
padding-bottom: 300px;
}
video:-webkit-full-screen {
padding-bottom: 0;
}
video:-webkit-full-screen * {
display: inline;
}
</style>
<iron-media-query query="(max-width: 600px)"
query-matches="{{smallScreen}}"></iron-media-query>
<iron-meta id="meta2" key="foo" value="filler"></iron-meta>
<div class='v-center' hidden$="{{!smallScreen}}">
<video width="90%" controls src="{{videoUrl}}"></video>
</div>
<div class='v-center' hidden$="{{smallScreen}}">
<video width="40%" controls src="{{videoUrl}}"></video>
</div>
</template>