]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-watch/video-watch.component.html
Video-watch hooks modifications for videojs
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-watch / video-watch.component.html
index 7e9b89dd0d88b073a152c6891105a47e50840a11..ac474b4275ec3e3fed5f42b299e285880c4385a0 100644 (file)
@@ -9,31 +9,10 @@
 
     <div id="videojs-wrapper"></div>
 
-    <div *ngIf="playlist && video" class="playlist"  myInfiniteScroller [autoInit]="true" [onItself]="true" (nearOfBottom)="onPlaylistVideosNearOfBottom()">
-      <div class="playlist-info">
-        <div class="playlist-display-name">
-          {{ playlist.displayName }}
-
-          <span *ngIf="isUnlistedPlaylist()" class="badge badge-warning" i18n>Unlisted</span>
-          <span *ngIf="isPrivatePlaylist()" class="badge badge-danger" i18n>Private</span>
-          <span *ngIf="isPublicPlaylist()" class="badge badge-info" i18n>Public</span>
-        </div>
-
-        <div class="playlist-by-index">
-          <div class="playlist-by">{{ playlist.ownerBy }}</div>
-          <div class="playlist-index">
-            <span>{{ currentPlaylistPosition }}</span><span>{{ playlistPagination.totalItems }}</span>
-          </div>
-        </div>
-      </div>
-
-      <div *ngFor="let playlistVideo of playlistVideos">
-        <my-video-playlist-element-miniature
-          [video]="playlistVideo" [playlist]="playlist" [owned]="isPlaylistOwned()" (elementRemoved)="onElementRemoved($event)"
-          [playing]="currentPlaylistPosition === playlistVideo.playlistElement.position" [accountLink]="false" [position]="playlistVideo.playlistElement.position"
-        ></my-video-playlist-element-miniature>
-      </div>
-    </div>
+    <my-video-watch-playlist
+      #videoWatchPlaylist
+      [video]="video" [playlist]="playlist" class="playlist"
+    ></my-video-watch-playlist>
   </div>
 
   <div class="row">
       This video will be published on {{ video.scheduledUpdate.updateAt | date: 'full' }}.
     </div>
 
-    <div i18n class="col-md-12 alert alert-info" *ngIf="noPlaylistVideos">
-      This playlist does not have videos.
-    </div>
-
     <div class="col-md-12 alert alert-danger" *ngIf="video?.blacklisted">
       <div class="blacklisted-label" i18n>This video is blacklisted.</div>
       {{ video.blacklistedReason }}
@@ -67,7 +42,7 @@
           <div class="d-block d-md-none"> <!-- only shown on medium devices, has its conterpart for larger viewports below -->
             <h1 class="video-info-name">{{ video.name }}</h1>
             <div i18n class="video-info-date-views">
-              Published {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
+              Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle> <span class="views"> - {{ video.views | myNumberFormatter }} views</span>
             </div>
           </div>
 
@@ -76,7 +51,7 @@
               <h1 class="video-info-name">{{ video.name }}</h1>
 
               <div i18n class="video-info-date-views">
-                Published {{ video.publishedAt | myFromNow }} - {{ video.views | myNumberFormatter }} views
+                Published <my-date-toggle [date]="video.publishedAt"></my-date-toggle> <span class="views"> - {{ video.views | myNumberFormatter }} views</span>
               </div>
             </div>
 
       <my-video-comments [video]="video" [user]="user"></my-video-comments>
     </div>
 
-    <my-recommended-videos [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }" [user]="user"></my-recommended-videos>
+    <my-recommended-videos
+        [inputRecommendation]="{ uuid: video.uuid, tags: video.tags }"
+        [user]="user"
+        (gotRecommendations)="onRecommendations($event)"
+    ></my-recommended-videos>
   </div>
 
   <div class="row privacy-concerns" *ngIf="hasAlreadyAcceptedPrivacyConcern === false">
       OK
     </div>
   </div>
+</div>
 
 <ng-template [ngIf]="video !== null">
   <my-video-support #videoSupportModal [video]="video"></my-video-support>
-  <my-video-share #videoShareModal [video]="video"></my-video-share>
+  <my-video-share #videoShareModal [video]="video" [videoCaptions]="videoCaptions"></my-video-share>
 </ng-template>