Skip to content

Commit

Permalink
Merge pull request #42 from lduboeuf/master
Browse files Browse the repository at this point in the history
fix seek bar in full screen
  • Loading branch information
mateosalta authored Sep 3, 2022
2 parents c7c7149 + b4b2e83 commit 819778b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.0.0)
project(youtube-web C CXX)

set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Werror")


find_package(Qt5Core)
find_package(Qt5Qml)
Expand Down
8 changes: 7 additions & 1 deletion app/Main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,16 @@ Rectangle {
property string seekBarOverlayScript: "
if (!document.getElementById('custom-seekbar')) {
var styleSheet = document.createElement('style');
var styles = 'body[faux-fullscreen=true] #custom-seekbar { bottom:50px !important; } #custom-seekbar { bottom: 0; left: 30px;right: 30px; width: auto;z-index: 3;position: absolute;height: 20px; overflow: hidden;margin-bottom: 12px;}';
styleSheet.innerText = styles
document.body.appendChild(styleSheet)
var wrapper= document.createElement('div');
wrapper.innerHTML= '<div><div id=\"custom-seekbar\" class=\"cbox\" style=\"bottom: 0;left: 30px;right: 30px;width: auto;z-index: 3;position: absolute;height: 20px; overflow: hidden;margin-bottom: 10px;\"><span style=\" position: absolute; top: 0px; left: 0px; height: 10px; width: 0;\"></span></div></div>';
wrapper.innerHTML= '<div><div id=\"custom-seekbar\" class=\"cbox\"><span style=\" position: absolute; top: 0px; left: 0px; height: 12px; width: 0;\"></span></div></div>';
document.getElementById('player-container-id').appendChild(wrapper.firstChild);
//document.getElementsByClassName('ytm-progress-bar')[0].appendChild(wrapper.firstChild);
var customseekbar = document.getElementById('custom-seekbar');
customseekbar.onclick = function(e) {
Expand Down

0 comments on commit 819778b

Please sign in to comment.