我试图在QWebEngineView中嵌入YouTube视频,视频加载正常但是全屏按钮被禁用此消息"全屏不可用"甚至认为嵌入代码确实有" allowfullscreen"
代码段:
web = QWebEngineView()
htmlString = """
<iframe width="560" height="315" src="https://www.youtube.com/embed/L0MK7qz13bU?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe>
"""
web.setHtml(htmlString, QUrl(baseUrl))
答案 0 :(得分:1)
要启用全屏,必须启用FullScreenSupportEnabled属性并接受页面的fullScreenRequested顺序。
authServiceMock.AuthenticateAsync(Arg.Any<HttpContext>(), Arg.Any<string>())
.Returns(Task.FromResult(AuthenticateResult.Success()));
providerMock.GetService(typeof(IAuthenticationService))
.Returns(authServiceMock);
httpContextMock.RequestServices.Returns(providerMock);
//...
截图: