1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-22 14:11:39 +00:00

Closes #140: video file support

This commit is contained in:
Benjamin Gamard
2018-03-02 19:05:20 +01:00
parent 18c9833104
commit 4a676b01e1
18 changed files with 312 additions and 24 deletions

View File

@@ -20,12 +20,17 @@
</div>
</div>
<div class="text-center" ng-if="$stateParams.fileId">
<div class="text-center" style="position: relative;" ng-if="$stateParams.fileId">
<img ng-src="../api/file/{{ $stateParams.fileId }}/data?size=web"
ng-init="error = false"
img-error="error = true"
ng-show="!error" />
<a href class="video-overlay" ng-if="file.mimetype.substring(0, 6) == 'video/'"
ng-init="videoPlayer = false" ng-click="videoPlayer = true">
<span class="glyphicon glyphicon-play-circle" ng-if="!videoPlayer"></span>
<video ng-if="videoPlayer" autoplay="autoplay" loop="loop"
controls="controls" ng-src="../api/file/{{ $stateParams.fileId }}/data"></video>
</a>
<p class="well-lg" ng-show="error">
<span class="glyphicon glyphicon-warning-sign"></span>
{{ 'file.view.not_found' | translate }}

View File

@@ -392,6 +392,33 @@ input[readonly].share-link {
}
}
// Video player
.video-overlay {
display: block;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
font-size: 500%;
color: #242424;
.glyphicon {
text-shadow: 0 0 20px #fff;
top: 50%;
transform: translateY(-50%);
}
&:hover {
color: #444;
}
video {
cursor: default;
width: 100%;
}
}
// Vertical alignment
.vertical-center {
min-height: 100vh;