questions are as follows:
- how to enforce the use of H5 player?
- what if the full screen button is invalid?
Test Code:
import sys
from PyQt5 import QtWidgets, QtGui, QtCore
from PyQt5.QtWebEngineWidgets import *
def _fullScreenRequested( request ):
request.accept()
w.showFullScreen()
argvs = sys.argv
-sharp flash
argvs.append("--ppapi-flash-path=./pepflashplayer.dll")
app = QtWidgets.QApplication(argvs)
w = QWebEngineView()
w.settings().setAttribute(QWebEngineSettings.PluginsEnabled, True)
w.settings().setAttribute(QWebEngineSettings.JavascriptEnabled, True)
w.settings().setAttribute(QWebEngineSettings.FullScreenSupportEnabled, True)
w.page().fullScreenRequested.connect(_fullScreenRequested)
w.load(QtCore.QUrl("https://www.bilibili.com/video/av22192941/"))
-sharp w.load(QtCore.QUrl("https://youtu.be/fAIX12F6958"))
w.show()
app.exec_()
after testing, the Youtube video can be full-screen, but the full-screen buttons of major domestic video websites are invalid
after debugging, it is found that if the website uses video.js (to determine whether the browser supports H5 or not) will lead to the use of flash playback-it is estimated that it is not friendly to QtWebEngine.-- such as bilibili
excuse me, how can I achieve full screen?