VIDEO_NAME="$(UNSTRING "$VIDEO_NAME")"
VIDEO_DESCRIPTION="$(UNSTRING "$VIDEO_DESCRIPTION")"
VIDEO_DESCR_CACHE="$(UNSTRING "$VIDEO_DESCR_CACHE")"
+ VIDEO_LENGTH="$(printf %i "$VIDEO_LENGTH" 2>&-)"
[ "${VIDEO_STATUS}" = public ] || AUTHOR || return 0
]' "$_BASE" "$CHANNEL_ID" "$VIDEO_ID" \
"$(HTML "${VIDEO_NAME:-(Unnamed Video)}")" \
"$thumb" \
- "$((${VIDEO_LENGTH%.*} / 60))" "$((${VIDEO_LENGTH%.*} % 60))" \
+ "$((VIDEO_LENGTH / 60))" "$((VIDEO_LENGTH % 60))" \
"$(UNSTRING "$DESCR_CACHE")"
else
return 1
]
]')
$( [ $VIDEO_STATUS != void ] && printf '
- [video
- [source src="%s/video/%s/%s.mp4"]
- ]' "$_BASE" "$channel" "$video"
+ [video preload=none controls=controls width=%i height=%i
+ [source src="%s/video/%s/%s.mp4" type="video/mp4"]
+ ]' "$VIDEO_RESX" "$VIDEO_RESY" "$_BASE" "$channel" "$video"
)
$(AUTHOR && printf '[a .button href="edit" edit]')
[h1 .name $(HTML "$VIDEO_NAME")]
max-height: 8em;
}
-.video.edit form > .delete {
+body.video.edit form > .delete {
text-align: right;
}
-.video.edit form #delconfirm + label:after {
+body.video.edit form #delconfirm + label:after {
content: '\0A';
white-space: pre;
}
-.video.edit form #delconfirm + label + button {
+body.video.edit form #delconfirm + label + button {
pointer-events: none;
color: #AAA;
border-color: #AAA;
left: -.75em;
}
-.video.edit form #delconfirm:checked + label + button {
+body.video.edit form #delconfirm:checked + label + button {
pointer-events: auto;
color: inherit;
border-color: inherit;
background-color: #FDD;
}
+body.video video {
+ display: block;
+ margin: 0 auto;
+ max-height: 80vh;
+}