Skip to content

Commit

Permalink
Add progress bar hover and transition
Browse files Browse the repository at this point in the history
Prevent click catch by Youtube iframe which block vlite click
  • Loading branch information
Joris Daniel committed Dec 16, 2018
1 parent 6b2d871 commit 0528830
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![vLitejs](https://img.shields.io/badge/vLitejs-v1.1.1-ffb300.svg?style=flat-square)
![vLitejs](https://img.shields.io/badge/vLitejs-v1.1.2-ffb300.svg?style=flat-square)

# vLite.js

Expand Down
15 changes: 14 additions & 1 deletion css/vlite.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@
object-fit: cover;
}

.wrapper-vlite iframe.vlite-js {
pointer-events: none;
}

.wrapper-vlite.playing .poster, .wrapper-vlite.paused:not(.first-start) .poster {
visibility: hidden;
opacity: 0;
Expand Down Expand Up @@ -234,6 +238,10 @@
background-color: rgba(0, 0, 0, 0.3);
}

.wrapper-vlite .control-bar:hover .progress-bar {
height: 8px;
}

.wrapper-vlite .control-bar .control-bar-inner {
position: relative;
width: 100%;
Expand All @@ -247,6 +255,8 @@
right: 0;
height: 3px;
background-color: rgba(0, 0, 0, 0.2);
transition: height 100ms ease-out;
z-index: 1;
}

.wrapper-vlite .progress-bar .progress-input {
Expand All @@ -255,6 +265,7 @@
left: 0;
width: 100%;
height: 100%;
margin: 0;
cursor: pointer;
opacity: 0;
}
Expand All @@ -266,6 +277,8 @@
width: 0;
height: 100%;
background-color: #fff;
border-radius: 0px 4px 4px 0px;
transition: all 100ms ease-out;
}

.wrapper-vlite .play-pause-button {
Expand Down Expand Up @@ -371,4 +384,4 @@

.wrapper-vlite .fullscreen .icon-fullscreen:before {
content: "\e901";
}
}
2 changes: 1 addition & 1 deletion css/vlite.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var playerHtml5 = new vLite({
"fullscreen": true,
"poster": "img/poster.jpg",
"bigPlay": true,
"nativeControlsForTouch": true
"nativeControlsForTouch": false
},
callback: (player) => {
//Ready
Expand Down
Loading

0 comments on commit 0528830

Please sign in to comment.