rebuilding site Wed Sep 23 02:46:20 PM CST 2020

This commit is contained in:
James Feng Cao 2020-09-23 14:46:21 +08:00
parent 9c40818894
commit 0335f0428e

View file

@ -232,13 +232,14 @@ function create_control_panel() {
div.append.apply(div, content_divs); div.append.apply(div, content_divs);
div.style.cssText = ` div.style.cssText = `
width: 100%; width: 50%;
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
position: absolute; position: absolute;
z-index: 9999999999; z-index: 9999999999;
top: 0; top: 0;
left: 30%;
background-color: rgba(51, 51, 51, 0.8); background-color: rgba(51, 51, 51, 0.8);
color: white; color: white;
box-sizing: border-box; box-sizing: border-box;
@ -587,7 +588,13 @@ const hook_video_control = hook => {
speed_div.addEventListener('tap', throttle(e => { speed_div.addEventListener('tap', throttle(e => {
e.stopImmediatePropagation(); e.stopImmediatePropagation();
clear_content(); clear_content();
const split = video.playbackRate.toString().split('.'); if(control.div.style != 'none'){
if(window.playbackRate>=2.0) window.playbackRate=0.5;
else if(window.playbackRate<=0.5) window.playbackRate=1.0;
else window.playbackRate=2.0;
}else
window.playbackRate = video.playbackRate;
const split = window.playbackRate.toString().split('.');
control.content_divs[0].innerText = split[0]; control.content_divs[0].innerText = split[0];
control.content_divs[1].innerText = '.'; control.content_divs[1].innerText = '.';
control.content_divs[2].innerText = (split[1] || '00').split('')[0] || 0; control.content_divs[2].innerText = (split[1] || '00').split('')[0] || 0;