Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Missed some files of the previous commit.

MythBrowser: Add a new MythFlashPlayer class that evaluates JavaScript in order
to control video playback. Current available controls are play, pause, and seek.
It will be used for better flash player integration in MythNetvision once the
scripts are updated to pass the required mythflash:// urls.

Patch by Jonatan <mythtv@comhem.se>. Refs #9301.
  • Loading branch information...
commit 7b59f38a20b6fc8242ff8e5da6b35ce197cf65ba 1 parent 55ca0d1
Paul Harrison authored
View
7 mythplugins/mythbrowser/mythbrowser/bookmarkmanager.cpp
@@ -19,6 +19,7 @@ using namespace std;
#include "bookmarkeditor.h"
#include "browserdbutil.h"
#include "mythbrowser.h"
+#include "mythflashplayer.h"
// ---------------------------------------------------
@@ -381,7 +382,11 @@ void BookmarkManager::slotBookmarkClicked(MythUIButtonListItem *item)
{
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
- MythBrowser *mythbrowser = new MythBrowser(mainStack, urls, zoom.toFloat());
+ MythScreenType *mythbrowser;
+ if (urls[0].startsWith("mythflash://"))
+ mythbrowser = new MythFlashPlayer(mainStack, urls);
+ else
+ mythbrowser = new MythBrowser(mainStack, urls, zoom.toFloat());
if (mythbrowser->Create())
{
View
8 mythplugins/mythbrowser/mythbrowser/main.cpp
@@ -15,6 +15,7 @@
#include "bookmarkmanager.h"
#include "browserdbutil.h"
#include "mythbrowser.h"
+#include "mythflashplayer.h"
using namespace std;
@@ -30,8 +31,11 @@ static int handleMedia(const QString &url, const QString &, const QString &, con
float zoom = gCoreContext->GetSetting("WebBrowserZoomLevel", "1.4").toFloat();
MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack();
-
- MythBrowser *mythbrowser = new MythBrowser(mainStack, urls, zoom);
+ MythScreenType *mythbrowser;
+ if (urls[0].startsWith("mythflash://"))
+ mythbrowser = new MythFlashPlayer(mainStack, urls);
+ else
+ mythbrowser = new MythBrowser(mainStack, urls, zoom);
if (mythbrowser->Create())
mainStack->AddScreen(mythbrowser);
View
4 mythplugins/mythbrowser/mythbrowser/mythbrowser.pro
@@ -16,9 +16,9 @@ installimages.files = images/*.png
INSTALLS += installimages
# Input
-HEADERS += mythbrowser.h webpage.h
+HEADERS += mythbrowser.h mythflashplayer.h webpage.h
HEADERS += bookmarkmanager.h bookmarkeditor.h browserdbutil.h
-SOURCES += main.cpp mythbrowser.cpp webpage.cpp
+SOURCES += main.cpp mythbrowser.cpp mythflashplayer.cpp webpage.cpp
SOURCES += bookmarkmanager.cpp bookmarkeditor.cpp browserdbutil.cpp
include ( ../../libs-targetfix.pro )
Please sign in to comment.
Something went wrong with that request. Please try again.