Преглед на файлове

refactor: replace old aspect ratio method with aspect-ratio property

Kristian Vos преди 1 година
родител
ревизия
d3c4e3ab48
променени са 3 файла, в които са добавени 3 реда и са изтрити 6 реда
  1. 1 2
      frontend/src/components/SoundcloudPlayer.vue
  2. 1 2
      frontend/src/components/YoutubePlayer.vue
  3. 1 2
      frontend/src/pages/Station/index.vue

+ 1 - 2
frontend/src/components/SoundcloudPlayer.vue

@@ -427,8 +427,7 @@ onBeforeUnmount(() => {
 
 	.player-container {
 		position: relative;
-		padding-bottom: 56.25%; /* proportion value to aspect ratio 16:9 (9 / 16 = 0.5625 or 56.25%) */
-		height: 0;
+		aspect-ratio: 16/9;
 		overflow: hidden;
 
 		:deep(iframe) {

+ 1 - 2
frontend/src/components/YoutubePlayer.vue

@@ -577,8 +577,7 @@ onBeforeUnmount(() => {
 
 	.player-container {
 		position: relative;
-		padding-bottom: 56.25%; /* proportion value to aspect ratio 16:9 (9 / 16 = 0.5625 or 56.25%) */
-		height: 0;
+		aspect-ratio: 16/9;
 		overflow: hidden;
 
 		:deep(iframe) {

+ 1 - 2
frontend/src/pages/Station/index.vue

@@ -3051,8 +3051,7 @@ onBeforeUnmount(() => {
 
 			#video-container {
 				position: relative;
-				padding-bottom: 56.25%; /* proportion value to aspect ratio 16:9 (9 / 16 = 0.5625 or 56.25%) */
-				height: 0;
+				aspect-ratio: 16/9;
 				overflow: hidden;
 
 				.player-cannot-autoplay {