Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
Paul Harrison committed Dec 6, 2010
1 parent 55ca0d1 commit 7b59f38
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
7 changes: 6 additions & 1 deletion mythplugins/mythbrowser/mythbrowser/bookmarkmanager.cpp
Expand Up @@ -19,6 +19,7 @@ using namespace std;
#include "bookmarkeditor.h"
#include "browserdbutil.h"
#include "mythbrowser.h"
#include "mythflashplayer.h"

// ---------------------------------------------------

Expand Down Expand Up @@ -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())
{
Expand Down
8 changes: 6 additions & 2 deletions mythplugins/mythbrowser/mythbrowser/main.cpp
Expand Up @@ -15,6 +15,7 @@
#include "bookmarkmanager.h"
#include "browserdbutil.h"
#include "mythbrowser.h"
#include "mythflashplayer.h"

using namespace std;

Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions mythplugins/mythbrowser/mythbrowser/mythbrowser.pro
Expand Up @@ -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 )

0 comments on commit 7b59f38

Please sign in to comment.