aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.html
blob: ed26b513e7f42aefb6ed52ce6c3abed4f96a41b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<div *ngIf="error" class="row">
  <div class="alert alert-danger">
    The video load seems to be abnormally long.
    <ul>
      <li>Maybe the server {{ video.podHost }} is down :(</li>
      <li>
        If not, you can report an issue on
        <a href="https://github.com/Chocobozzz/PeerTube/issues" title="Report an issue">
          https://github.com/Chocobozzz/PeerTube/issues
        </a>
      </li>
    </ul>
  </div>
</div>

<div class="row">
  <div class="col-md-12">
    <!-- We need the video container for videojs so we just hide it -->
    <div [hidden]="videoNotFound" class="embed-responsive embed-responsive-19by9">
       <video id="video-container" class="video-js vjs-default-skin vjs-big-play-centered"></video>
    </div>

    <div *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div>
  </div>
</div>

<div id="torrent-info" class="row">
  <div id="torrent-info-download" class="col-md-4 col-sm-4 col-xs-4">Download: {{ downloadSpeed | bytes }}/s</div>
  <div id="torrent-info-upload" class="col-md-4 col-sm-4 col-xs-4">Upload: {{ uploadSpeed | bytes }}/s</div>
  <div id="torrent-info-peers" class="col-md-4 col-sm-4 col-xs-4">Number of peers: {{ numPeers }}</div>
</div>

<div *ngIf="video !== null" id="video-info">
  <div class="row" id="video-name-actions">
    <div class="col-md-6">
      <div class="row">
        <div id="video-name" class="col-md-12">
          {{ video.name }}
        </div>
      </div>

      <div class="row">
        <div class="col-md-12" id="video-by-date">
          <span id="video-by">
              from
              <a [routerLink]="['/videos/list', { field: 'author', search: video.author }]" class="video-miniature-author">
                {{ video.by }}
              </a>
            </span>
          <span id="video-date">on {{ video.createdAt | date:'short' }}</span>
        </div>
      </div>
    </div>

    <div id="video-actions" class="col-md-6 text-right">
      <div id="rates">
        <button
          id="likes" class="btn btn-default"
          [ngClass]="{ 'not-interactive-btn': !isUserLoggedIn(), 'activated-btn': userRating === 'like' }" (click)="setLike()"
        >
          <span class="glyphicon glyphicon-thumbs-up"></span> {{ video.likes }}
        </button>

        <button
          id="dislikes" class="btn btn-default"
          [ngClass]="{ 'not-interactive-btn': !isUserLoggedIn(), 'activated-btn': userRating === 'dislike' }" (click)="setDislike()"
        >
          <span class=" glyphicon glyphicon-thumbs-down"></span> {{ video.dislikes }}
        </button>
      </div>

      <button id="share" class="btn btn-default" (click)="showShareModal()">
        <span class="glyphicon glyphicon-share"></span> Share
      </button>

      <div class="btn-group" dropdown>
        <button id="single-button" type="button" id="more" class="btn btn-default" dropdownToggle>
          <span class="glyphicon glyphicon-option-horizontal"></span> More
        </button>

        <ul *dropdownMenu class="dropdown-menu" id="more-menu" role="menu" aria-labelledby="single-button">
          <li *ngIf="canUserUpdateVideo()" role="menuitem">
            <a class="dropdown-item" title="Update this video" href="#" [routerLink]="[ '/videos/edit', video.id ]">
              <span class="glyphicon glyphicon-pencil"></span> Update
            </a>
          </li>

          <li role="menuitem">
            <a class="dropdown-item" title="Get magnet URI" href="#" (click)="showMagnetUriModal($event)">
               <span class="glyphicon glyphicon-magnet"></span> Magnet
            </a>
          </li>

          <li *ngIf="isUserLoggedIn()" role="menuitem">
            <a class="dropdown-item" title="Report this video" href="#" (click)="showReportModal($event)">
              <span class="glyphicon glyphicon-alert"></span> Report
            </a>
          </li>

	  <li *ngIf="isVideoRemovable()" role="menuitem">
	    <a class="dropdown-item" title="Delete this video" href="#" (click)="removeVideo($event)">
	      <span class="glyphicon glyphicon-remove"></span> Delete
	    </a>
	  </li>

	  <li *ngIf="isVideoBlacklistable()" role="menuitem">
	    <a class="dropdown-item" title="Blacklist this video" href="#" (click)="blacklistVideo($event)">
	      <span class="glyphicon glyphicon-eye-close"></span> Blacklist
	    </a>
	  </li>
        </ul>
      </div>
    </div>
  </div>

  <div id="video-tags-views" class="row">
    <div class="col-md-8">
      <a *ngFor="let tag of video.tags" [routerLink]="['/videos/list', { field: 'tags', search: tag }]" class="label label-primary">
        {{ tag }}
      </a>
    </div>

    <div id="video-views" class="col-md-4 text-right">
      {{ video.views }} views
    </div>
  </div>

  <div id="video-category" class="row">
    <div class="col-md-12">
      <span id="category-label">Category:</span>
      {{ video.categoryLabel }}
    </div>
  </div>

  <div id="video-licence" class="row">
    <div class="col-md-12">
      <span id="licence-label">Licence:</span>
      {{ video.licenceLabel }}
    </div>
  </div>

  <div id="video-language" class="row">
    <div class="col-md-12">
      <span id="language-label">Language:</span>
      {{ video.languageLabel }}
    </div>
  </div>

  <div id="video-description" class="row">
    <div class="col-md-12">
      <div id="description-label">Description</div>
      {{ video.description }}
    </div>
  </div>
</div>

<ng-template [ngIf]="video !== null">
  <my-video-share #videoShareModal [video]="video"></my-video-share>
  <my-video-magnet #videoMagnetModal [video]="video"></my-video-magnet>
  <my-video-report #videoReportModal [video]="video"></my-video-report>
</ng-template>