aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.html
blob: 88863131af5018639ae78f43947ad84ed7c1b26b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13



                                               
                                                              







                                                                                        

      
                 

                                                                                
                                                                           
        

                                                                           
      
 
                         
                                   


                                                                                                                  

      
                           
                                            
                                    
                                              

                      
 
                                                          
                            
          
        
 
                                      
                                                                                       


                                                                                                                                             

          
 
                                                                             




                                                                           
 
                                                                            




                                                                                       
 
                                                                                                           
                                                           
                                                                                                                      



                                                                     
                              
                                                                                                          
                                                                     




                                                                                                          


                                                                    
 










                                                                                                            

             
          
 
                                                                              




                                                                                                                 
 



                                             
 




                                                                                                                       
 



                                             


          
                                 
                                                                  






                                                         
          
 
                                                            

























                                                    












                                                                                                                                        



          
                                     


                                                                       
              
<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">
  <!-- 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-sublime-skin"></video>
  </div>

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

<!-- P2P informations -->
<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>

<!-- Video informations -->
<div *ngIf="video !== null" id="video-info">
  <div class="row video-name-views">
    <div class="col-xs-8 col-md-8 video-name">
      {{ video.name }}
    </div>

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

  <div class="row video-small-blocks">
    <div class="col-xs-5 col-xs-3 col-md-3 video-small-block video-small-block-author">
      <a class="option" title="Access to all videos of this user" [routerLink]="['/videos/list', { field: 'author', search: video.author }]">
        <span class="glyphicon glyphicon-user"></span>
        <span class="video-small-block-text">{{ video.by }}</span>
      </a>
    </div>

    <div class="col-xs-2 col-md-3 video-small-block video-small-block-share">
      <a class="option" (click)="showShareModal()" title="Share the video">
        <span class="glyphicon glyphicon-share"></span>
        <span class="video-small-block-text">Share</span>
      </a>
    </div>

    <div class="col-xs-2 col-md-3 video-small-block video-small-block-more">
      <div class="video-small-block-dropdown" dropdown dropup="true" placement="right">
        <a class="option" title="Access to more options" dropdownToggle>
          <span class="glyphicon glyphicon-option-horizontal"></span>
          <span class="video-small-block-text">More</span>
        </a>

        <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.uuid ]">
              <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 class="col-xs-3 col-md-3 video-small-block video-small-block-rating">
      <div class="video-small-block-like">
        <span
          class="glyphicon glyphicon-thumbs-up" title="Like this video"
          [ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'like' }" (click)="setLike()"
        ></span>

        <span class="video-small-block-text">
          {{ video.likes }}
        </span>
      </div>

      <div class="video-small-block-dislike">
        <span
          class="glyphicon glyphicon-thumbs-down" title="Dislike this video"
          [ngClass]="{ 'interactive': isUserLoggedIn(), 'activated': userRating === 'dislike' }" (click)="setDislike()"
        ></span>

        <span class="video-small-block-text">
          {{ video.dislikes }}
        </span>
      </div>
    </div>
  </div>

  <div class="row video-details">
    <div class="video-details-date-description col-xs-8 col-md-9">
      <div class="video-details-date">
        Published on {{ video.createdAt | date:'short' }}
      </div>

      <div class="video-details-description">
        {{ video.description }}
      </div>
    </div>

    <div class="video-details-attributes col-xs-4 col-md-3">
      <div class="video-details-attribute">
        <span class="video-details-attribute-label">
          Category:
        </span>
        <span class="video-details-attribute-value">
          {{ video.categoryLabel }}
        </span>
      </div>

      <div class="video-details-attribute">
        <span class="video-details-attribute-label">
          Licence:
        </span>
        <span class="video-details-attribute-value">
          {{ video.licenceLabel }}
        </span>
      </div>

      <div class="video-details-attribute">
        <span class="video-details-attribute-label">
          Language:
        </span>
        <span class="video-details-attribute-value">
          {{ video.languageLabel }}
        </span>
      </div>

      <div class="video-details-attribute">
        <span class="video-details-attribute-label">
          Tags:
        </span>

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

    </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>