This repository has been archived on 2022-06-28. You can view files and clone it, but cannot push or open issues or pull requests.
Yotter/app/templates/video.html

66 lines
2.6 KiB
HTML

<head>
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='video-js.min.css') }}">
</head>
{% extends "base.html" %}
{% block content %}
<div class="ui text container">
{% if video.nginxUrl == "#" and video.isLive %}
<div class="ui center aligned text container">
<img alt="Empty feed image" class="ui image" src="{{ url_for('static',filename='img/live.png') }}">
</div>
{% elif video.isUpcoming %}
<div class="ui center aligned text container">
<div class="ui row">
<img alt="Empty feed image" class="ui image" src="{{ url_for('static',filename='img/scheduled.png') }}">
</div>
</div>
{%else%}
<div class="video-js-responsive-container vjs-hd">
<video class="video-js vjs-default-skin"
data-setup='{ "playbackRates": [0.5, 1, 1.25,1.5, 2] }'
width="1080"
controls
buffered
preload="none">
{% if config.nginxVideoStream %}
<source src="{{video.nginxUrl}}" type="video/mp4">
{% else %}
<source src="{{url_for('stream', url=video.videoUrl.replace('/', 'YotterSlash'))}}" type="video/mp4">
{% endif %}
</video>
</div>
{%endif%}
<div class="ui segments">
<div class="ui segment">
<h2 class="ui header break-word">{{video.title}}</h2>
</div>
<div class="ui horizontal segments">
<div class="center aligned ui segment">
<a target="_blank" href="{{ url_for('channel', id=video.channelId)}}">
{%if video.author.__len__() > 8%}
<i class="user icon"></i> {{video.author[0:10]+'...'}}
{%else%}
<i class="user icon"></i> {{video.author}}
{%endif%}
</a>
</div>
<div class="center aligned ui segment">
<h4 class="ui header"><i class="grey eye icon"></i>{{video.viewCount}}</h4>
</div>
<div class="center aligned ui segment">
{% if video.averageRating | int > 49 %}
<h4 class="ui header"><i class="green thumbs up icon"></i> {{video.averageRating[0:4]}}%</h4>
{% else %}
<h4 class="ui header"><i class="red thumbs down icon"></i> {{video.averageRating[0:4]}}%</h4>
{% endif %}
</div>
</div>
<div class="ui raised segment break-word">
<p>{{video.description}}</p>
</div>
</div>
</div>
<script src="{{ url_for('static',filename='video.min.js') }}"></script>
{% endblock %}