]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/sass/video-js-custom.scss
Add fallback to HTTP
[github/Chocobozzz/PeerTube.git] / client / src / sass / video-js-custom.scss
index fe9495e777c7907a9ccc59d38811146d8a822cd0..ee8f2594935ffbea1b526f387287b8dd0528f9de 100644 (file)
@@ -23,19 +23,47 @@ $control-bar-height: 34px;
   }
 
   .vjs-big-play-button {
-    font-size: 8em;
+    outline: 0;
+    font-size: 6em;
 
-    $big-play-width: 3em;
-    $big-play-height: 1.5em;
+    $big-play-width: 1.5em;
+    $big-play-height: 1em;
 
     border: 0;
     border-radius: 0.3em;
 
     left: 50%;
     top: 50%;
+    width: $big-play-width;
+    height: $big-play-height;
+    line-height: $big-play-height;
     margin-left: -($big-play-width / 2);
     margin-top: -($big-play-height / 2);
-    background-color: transparent !important;
+    transition: opacity 0.5s;
+
+    &::-moz-focus-inner {
+      border: 0;
+      padding: 0
+    }
+
+    .vjs-icon-placeholder::before {
+      transition: text-shadow 0.3s;
+    }
+
+    &:hover {
+      opacity: 0.9;
+
+      .vjs-icon-placeholder::before {
+        text-shadow: 0 0 1px rgba(255, 255, 255, 0.8);
+      }
+    }
+  }
+
+  &.vjs-has-started .vjs-big-play-button {
+    display: block;
+    visibility: hidden;
+    opacity: 0;
+    transition: visibility 0.3s, opacity 0.3s;
   }
 
   .vjs-control-bar,
@@ -89,6 +117,7 @@ $control-bar-height: 34px;
     }
 
     .vjs-play-control {
+      outline: 0;
       font-size: $font-size;
       padding: 0 17px;
       margin-right: 5px;
@@ -101,7 +130,7 @@ $control-bar-height: 34px;
         padding: 0;
 
         .vjs-current-time-display {
-          line-height: $control-bar-height;
+          line-height: calc(#{$control-bar-height} + 1px);
 
           &::after {
             content: "/";
@@ -116,7 +145,7 @@ $control-bar-height: 34px;
         padding: 0;
 
         .vjs-duration-display {
-          line-height: $control-bar-height;
+          line-height: calc(#{$control-bar-height} + 1px);
         }
       }
 
@@ -125,17 +154,17 @@ $control-bar-height: 34px;
       }
     }
 
-    .vjs-webtorrent {
+    .vjs-peertube {
       width: 100%;
       line-height: $control-bar-height;
       text-align: right;
       padding-right: 60px;
 
-      .vjs-webtorrent-displayed {
+      .vjs-peertube-displayed {
         display: block;
       }
 
-      .vjs-webtorrent-hidden {
+      .vjs-peertube-hidden {
         display: none;
       }
 
@@ -169,6 +198,8 @@ $control-bar-height: 34px;
     }
 
     .vjs-mute-control {
+      outline: 0;
+
       .vjs-icon-placeholder {
         display: inline-block;
         width: 22px;
@@ -252,6 +283,7 @@ $control-bar-height: 34px;
 
     .vjs-fullscreen-control {
       width: 37px;
+      outline: 0;
 
       .vjs-icon-placeholder {
         display: inline-block;
@@ -270,18 +302,19 @@ $control-bar-height: 34px;
     .vjs-menu-button-popup {
       font-size: 13px;
       font-weight: $font-semibold;
-      width: 42px;
+      width: 50px;
 
       // Thanks: https://github.com/kmoskwiak/videojs-resolution-switcher/pull/92/files
       .vjs-resolution-button-label {
         line-height: $control-bar-height;
         position: absolute;
         top: 0;
-        left: -1px;
+        left: 4px;
         width: 100%;
         height: 100%;
         text-align: center;
         box-sizing: inherit;
+        text-align: center;
       }
 
       .vjs-resolution-button {
@@ -292,9 +325,9 @@ $control-bar-height: 34px;
         top: 20px;
 
         .vjs-menu-content {
-          width: 4em;
+          width: 50px;
           left: 50%; /* Center the menu, in it's parent */
-          margin-left: -2em; /* half of width, to center */
+          margin-left: -21px;
         }
 
         li {
@@ -305,10 +338,37 @@ $control-bar-height: 34px;
     }
   }
 
-  @media screen and (max-width: 450px) {
-    .vjs-webtorrent-displayed {
+  @media screen and (max-width: 550px) {
+    .vjs-big-play-button {
+      font-size: 5em;
+    }
+
+    .vjs-webtorrent {
+      padding: 0 !important;
+
+      .vjs-webtorrent-displayed {
+        display: none !important;
+      }
+    }
+  }
+
+  @media screen and (max-width: 300px) {
+    .vjs-dock-text {
+      font-size: 1.5em;
+    }
+
+    .vjs-big-play-button {
+      font-size: 4em;
+    }
+
+    .vjs-volume-control {
       display: none !important;
     }
+
+    .vjs-volume-panel {
+      width: 26px !important;
+      margin-right: 83px !important;
+    }
   }
 }
 
@@ -320,7 +380,9 @@ $control-bar-height: 34px;
   border: 0.7em solid rgba(255, 255, 255, 0.2);
   border-left-color: #ffffff;
   transform: translateZ(0);
-  animation: spinner 1.4s infinite linear;
+  animation: 0.3s ease-out 1.1s forwards vjs-spinner-show, spinner 1.4s infinite linear !important;
+  overflow: hidden;
+  visibility: hidden;
 
   &:before {
     animation: none !important;
@@ -341,5 +403,41 @@ $control-bar-height: 34px;
       transform: rotate(360deg);
     }
   }
+
+  @keyframes vjs-spinner-show {
+    0% {
+      display: none;
+      opacity: 0;
+    }
+
+    1% {
+      display: block;
+      visibility: visible;
+      opacity: 0;
+    }
+
+    100% {
+      display: block;
+      visibility: visible;
+      opacity: 1;
+    }
+  }
+}
+
+// Error display disabled
+.vjs-error:not(.vjs-error-display-enabled) {
+  .vjs-error-display {
+    display: none;
+  }
+
+  .vjs-loading-spinner {
+    display: block;
+  }
 }
 
+// Error display enabled
+.vjs-error.vjs-error-display-enabled {
+  .vjs-error-display {
+    display: block;
+  }
+}