From d18936ea1864063ede40cb8cae4c9a66caa8b038 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Mon, 27 Feb 2017 09:43:02 -0800 Subject: [PATCH] only force youtube web entities to 30 FPS --- .../entities-renderer/src/RenderableWebEntityItem.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp index 8c30c01e50..7cd1b62e3b 100644 --- a/libraries/entities-renderer/src/RenderableWebEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableWebEntityItem.cpp @@ -113,7 +113,14 @@ bool RenderableWebEntityItem::buildWebSurface(QSharedPointer // FIXME, the max FPS could be better managed by being dynamic (based on the number of current surfaces // and the current rendering load) - _webSurface->setMaxFps(30); + + // We special case YouTube URLs since we know they are videos that we should play with at least 30 FPS. + if (QUrl(_sourceUrl).host().endsWith("youtube.com", Qt::CaseInsensitive)) { + _webSurface->setMaxFps(30); + } else { + _webSurface->setMaxFps(10); + } + // The lifetime of the QML surface MUST be managed by the main thread // Additionally, we MUST use local variables copied by value, rather than