Closed ryanmusante closed 2 years ago
I cannot implement extensions into qtwebengine, I might be able to disable the auto preview with javascript.. but I don't really know javascript sooo I'm not sure.
@ryanmusante Good news! figured it out this is how it looks when you load netflix
@ryanmusante but bad news not quite sure how to implement it :(
document.getElementsByClassName('billboard-row')[0].setAttribute('style', 'display:none')
I found a hacky solution that would work well with some cool new features coming.. stay tuned
Sounds good!
QString code ="try { " \
"billboard = document.querySelector('.billboard-row');"\
"if (billboard) {" \
"var video = document.querySelector('video');" \
"video.muted = true;"\
"video.playbackRate = 0;"\
"video.setAttribute('preload', 0);"\
"video.setAttribute('autoplay', 'false');"\
"video.pause();"\
"}" \
"} catch (e) { } " ;
webView()->page()->runJavaScript(code);
This seems to work! it is not pretty but there will be no more autopreview crap
Here is how it looks now just need to find a way for users to opt in.
It works, simply amazing! So, to opt-in, some possible suggestions:
I think option 2 is the best just have a command line argument like -na for no auto play. Will work on this today, I'll let you know when it is ready.
This makes use of command line arguments and uses qt web engine for comparison. https://github.com/magiruuvelvet/LightweightQtDRMStreamViewer
@ryanmusante qtwebflix has command line arguments, just haven't implemented this yet sorry :( maybe this weekend
Status update for feature implement?
Is this possible to incorporate? It is chrome compatiblity.
https://chrome.google.com/webstore/detail/netflix-classic/mokjkiliipanjhlfbpagnmlpihmaohde