forked from openlp/openlp
fix check_available to work on feature detection
This commit is contained in:
parent
121f0908a1
commit
28222ed0f8
@ -22,11 +22,11 @@
|
|||||||
"""
|
"""
|
||||||
The :mod:`~openlp.core.ui.media.webkit` module contains our WebKit video player
|
The :mod:`~openlp.core.ui.media.webkit` module contains our WebKit video player
|
||||||
"""
|
"""
|
||||||
from PyQt4 import QtGui
|
from PyQt4 import QtGui, QtWebKit
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.common import Settings, is_macosx
|
from openlp.core.common import Settings
|
||||||
from openlp.core.lib import translate
|
from openlp.core.lib import translate
|
||||||
from openlp.core.ui.media import MediaState
|
from openlp.core.ui.media import MediaState
|
||||||
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
from openlp.core.ui.media.mediaplayer import MediaPlayer
|
||||||
@ -224,11 +224,9 @@ class WebkitPlayer(MediaPlayer):
|
|||||||
"""
|
"""
|
||||||
Check the availability of the media player
|
Check the availability of the media player
|
||||||
"""
|
"""
|
||||||
# At the moment we don't have support for webkitplayer on Mac OS X
|
web = QtWebKit.QWebPage()
|
||||||
if is_macosx():
|
return web.mainFrame().evaluateJavaScript(
|
||||||
return False
|
"Object.prototype.toString.call(document.createElement('video'));") == '[object HTMLVideoElement]'
|
||||||
else:
|
|
||||||
return True
|
|
||||||
|
|
||||||
def load(self, display):
|
def load(self, display):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user