aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/+videos/+video-watch/video-watch.component.html
blob: 09be2d0859d0a8bd302d54ac60c3efccdb3e7656 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                                    
                                                                     
                          




                                                                                           
 
                              
                                                                                                                                      
          
 

                            

                                                 
                               

                                                                          
        
 



                                                                                    
 


                                                                                 
 


                                                                                          
 




                                                                            
                          

          
                                                                         

                                                                  
          

        
                            
                                                         


                                        





                                                                                                                    
                                                                                                                               
                                                             
 
                                               
                                                                               


                  
                                                                            
                                           
                                                               
                  
 
                                                     
                                                                   
                                                                                 
                    
 



                                                                                                                         
                  
                
 

                                                                 
                                                                                                                                  
 
                                                              
                                                                     
                                                                                                   

                                                   
                                                                                              




                                                                    
                                                                                                                  


                                                           

                    
 
                                                                                                                       
                
              
 
            
 
                                                                   
 
                                         



                                                                              
 
                                                                     

                                                                                                                                              

              



                                                                                                             
 







                                                                                                          
 







                                                                                                        
 






                                                                                                          
              
 






                                                                                                             
 
                                                           
                                                                  
                                                                                               
              

            





                                                           
          
 
                          
                                                
                                                                    

                                                      
                             
        
 
                                             
      
 
                                     
<div class="root" [ngClass]="{ 'theater-enabled': theaterEnabled }">
  <!-- We need the video container for videojs so we just hide it -->
  <div id="video-wrapper">
    <div *ngIf="remoteServerDown" class="remote-server-down">
      Sorry, but this video is not available because the remote instance is not responding.
      <br />
      Please try again later.
    </div>

    <div id="videojs-wrapper">
      <img class="placeholder-image" *ngIf="playerPlaceholderImgSrc" [src]="playerPlaceholderImgSrc" alt="Placeholder image" i18n-alt>
    </div>

    <my-video-watch-playlist
      #videoWatchPlaylist
      [playlist]="playlist" class="playlist"
      (videoFound)="onPlaylistVideoFound($event)"
    ></my-video-watch-playlist>

    <my-plugin-placeholder pluginId="player-next"></my-plugin-placeholder>
  </div>

  <div class="row">
    <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToImport()">
      The video is being imported, it will be available when the import is finished.
    </div>

    <div i18n class="col-md-12 alert alert-warning" *ngIf="isVideoToTranscode()">
      The video is being transcoded, it may not work properly.
    </div>

    <div i18n class="col-md-12 alert alert-info" *ngIf="hasVideoScheduledPublication()">
      This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
    </div>

    <div i18n class="col-md-12 alert alert-info" *ngIf="isWaitingForLive()">
      This live has not started yet.
    </div>

    <div i18n class="col-md-12 alert alert-info" *ngIf="isLiveEnded()">
      This live has ended.
    </div>

    <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
      <div class="blocked-label" i18n>This video is blocked.</div>
      {{ video.blockedReason }}
    </div>
  </div>

  <!-- Video information -->
  <div *ngIf="video" class="margin-content video-bottom">
    <div class="video-info">
      <div class="video-info-first-row">
        <div>
          <ng-template #publishedTemplate>
            <ng-container i18n>Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle></ng-container><my-video-views-counter [video]="video"></my-video-views-counter>
          </ng-template>

          <div class="d-block d-md-none"> <!-- only shown on medium devices, has its counterpart for larger viewports below -->
            <h1 class="video-info-name">{{ video.name }}</h1>

            <div class="video-info-date-views">
              <ng-template *ngTemplateOutlet="publishedTemplate"></ng-template>
            </div>
          </div>

          <div class="d-flex justify-content-between flex-direction-column">
            <div class="d-none d-md-block">
              <h1 class="video-info-name">{{ video.name }}</h1>
            </div>

            <div class="video-info-first-row-bottom">
              <div class="d-none d-md-block video-info-date-views">
                <ng-template *ngTemplateOutlet="publishedTemplate"></ng-template>
              </div>

              <my-action-buttons
                [video]="video" [isUserLoggedIn]="isUserLoggedIn()" [videoCaptions]="videoCaptions" [playlist]="playlist"
                [currentTime]="getCurrentTime()" [currentPlaylistPosition]="getCurrentPlaylistPosition()"
              ></my-action-buttons>
            </div>
          </div>

          <div class="pt-3 border-top video-info-channel d-flex">
            <div class="video-info-channel-left d-flex">
              <my-video-avatar-channel [video]="video" [genericChannel]="isChannelDisplayNameGeneric()"></my-video-avatar-channel>

              <div class="video-info-channel-left-links ml-1">
                <ng-container *ngIf="!isChannelDisplayNameGeneric()">
                  <a [routerLink]="[ '/c', video.byVideoChannel ]" i18n-title title="Channel page">
                    {{ video.channel.displayName }}
                  </a>
                  <a [routerLink]="[ '/a', video.byAccount ]" i18n-title title="Account page">
                    <span i18n>By {{ video.byAccount }}</span>
                  </a>
                </ng-container>

                <ng-container *ngIf="isChannelDisplayNameGeneric()">
                  <a [routerLink]="[ '/a', video.byAccount ]" class="single-link" i18n-title title="Account page">
                    <span i18n>{{ video.byAccount }}</span>
                  </a>
                </ng-container>
              </div>
            </div>

            <my-subscribe-button #subscribeButton [videoChannels]="[video.channel]" size="small"></my-subscribe-button>
          </div>
        </div>

      </div>

      <my-video-description [video]="video"></my-video-description>

      <div class="video-attributes mb-3">
        <div class="video-attribute">
          <span i18n class="video-attribute-label">Privacy</span>
          <span class="video-attribute-value">{{ video.privacy.label }}</span>
        </div>

        <div *ngIf="video.isLocal === false" class="video-attribute">
          <span i18n class="video-attribute-label">Origin</span>
          <a class="video-attribute-value" target="_blank" rel="noopener noreferrer" [href]="getVideoUrl()">{{ video.originInstanceHost }}</a>
        </div>

        <div *ngIf="!!video.originallyPublishedAt" class="video-attribute">
          <span i18n class="video-attribute-label">Originally published</span>
          <span class="video-attribute-value">{{ video.originallyPublishedAt | date: 'dd MMMM yyyy' }}</span>
        </div>

        <div class="video-attribute">
          <span i18n class="video-attribute-label">Category</span>
          <span *ngIf="!video.category.id" class="video-attribute-value">{{ video.category.label }}</span>
          <a
            *ngIf="video.category.id" class="video-attribute-value"
            [routerLink]="[ '/search' ]" [queryParams]="{ categoryOneOf: [ video.category.id ] }"
          >{{ video.category.label }}</a>
        </div>

        <div class="video-attribute">
          <span i18n class="video-attribute-label">Licence</span>
          <span *ngIf="!video.licence.id" class="video-attribute-value">{{ video.licence.label }}</span>
          <a
            *ngIf="video.licence.id" class="video-attribute-value"
            [routerLink]="[ '/search' ]" [queryParams]="{ licenceOneOf: [ video.licence.id ] }"
          >{{ video.licence.label }}</a>
        </div>

        <div class="video-attribute">
          <span i18n class="video-attribute-label">Language</span>
          <span *ngIf="!video.language.id" class="video-attribute-value">{{ video.language.label }}</span>
          <a
            *ngIf="video.language.id" class="video-attribute-value"
            [routerLink]="[ '/search' ]" [queryParams]="{ languageOneOf: [ video.language.id ] }"
          >{{ video.language.label }}</a>
        </div>

        <div class="video-attribute video-attribute-tags">
          <span i18n class="video-attribute-label">Tags</span>
          <a
            *ngFor="let tag of getVideoTags()"
            class="video-attribute-value" [routerLink]="[ '/search' ]" [queryParams]="{ tagsOneOf: [ tag ] }"
          >{{ tag }}</a>
        </div>

        <div class="video-attribute" *ngIf="!video.isLive">
          <span i18n class="video-attribute-label">Duration</span>
          <span class="video-attribute-value">{{ video.duration | myDurationFormatter }}</span>
        </div>
      </div>

      <my-video-comments
        class="border-top"
        [video]="video"
        [user]="user"
        (timestampClicked)="handleTimestampClicked($event)"
      ></my-video-comments>
    </div>

    <my-recommended-videos
      [displayAsRow]="displayOtherVideosAsRow()"
      [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }"
      [playlist]="playlist"
      (gotRecommendations)="onRecommendations($event)"
    ></my-recommended-videos>
  </div>

  <my-privacy-concerns></my-privacy-concerns>
</div>

<my-player-styles></my-player-styles>