improve responsivness

This commit is contained in:
Eugenio Romano 2016-09-01 13:43:01 +01:00
parent 0ff549d0ac
commit 021f1adb5f
5 changed files with 57 additions and 15 deletions

View File

@ -1,8 +1,48 @@
.viewer-video-row {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
box-orient: horizontal;
flex-direction: row;
-webkit-box-pack: center;
-moz-box-pack: center;
box-pack: center;
justify-content: center;
-webkit-box-align: center;
-moz-box-align: center;
box-align: center;
align-items: center;
}
.viewer-video-cell {
-webkit-box-flex: 1;
-moz-box-flex: 1;
box-flex: 1;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
padding: 10px;
margin: 10px;
text-align: center;
}
video {
max-height: 80vh;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: center;
align-items: center;
align-content: center;
max-width: 100%;
margin-left: auto;
margin-right: auto;
display: block;
width: 70%;
width: 70%;
}

View File

@ -1,3 +1,10 @@
<div class="viewer-video-content">
<div class="viewer-video-row">
<div class="viewer-video-cell">
<video controls >
<source [src]="urlFile" [type]="mimeType" />
</video>
</div>
</div>
</div>

View File

@ -15,14 +15,15 @@
* limitations under the License.
*/
import { Component, Input } from '@angular/core';
import { Component, Input, ViewEncapsulation } from '@angular/core';
declare let __moduleName: string;
@Component({
moduleId: __moduleName,
selector: 'media-player',
templateUrl: './mediaPlayer.component.html',
styleUrls: ['./mediaPlayer.component.css']
styleUrls: ['./mediaPlayer.component.css'],
encapsulation: ViewEncapsulation.None
})
export class MediaPlayerComponent {

View File

@ -55,7 +55,3 @@ img-viewer {
justify-content: center;
}
.viewer-content-container {
width: 100%;
margin: auto;
}

View File

@ -43,9 +43,8 @@
<!--</button>-->
<!--</div>-->
<div *ngIf="isLoaded()" class="center-element mdl-cell mdl-cell--12-col" >
<div id="viewer-content-container" *ngIf="isLoaded()" class="center-element mdl-cell mdl-cell--12-col" >
<div id="viewer-content-container" class="viewer-content-container mdl-cell" >
<!-- Start View Switch-->
<div *ngIf="isPdf()">
<pdf-viewer [showToolbar]="showToolbar" [urlFile]="urlFileContent" [nameFile]="displayName" ></pdf-viewer>
@ -60,7 +59,6 @@
<not-supported-format [urlFile]="urlFileContent" [nameFile]="displayName" ></not-supported-format>
</div>
<!-- End View Switch -->
</div>
</div>