Last active
August 29, 2015 14:13
-
-
Save wonder-sk/5ed604d13379802885c1 to your computer and use it in GitHub Desktop.
Play internet radio
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content = """<!DOCTYPE html><html><head> | |
<script type="text/javascript" src="http://jplayer.org/latest/lib/jquery.min.js"></script> | |
<script type="text/javascript" src="http://jplayer.org/latest/dist/jplayer/jquery.jplayer.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(){ var stream = { title: "ABC Lounge", mp3: "http://listen.radionomy.com/abc-lounge" }, ready = false; | |
$("#jquery_jplayer_1").jPlayer({ ready: function (event) { ready = true; $(this).jPlayer("setMedia", stream).jPlayer("play"); }, | |
supplied: "mp3", }); });</script></head><body><div id="jquery_jplayer_1" class="jp-jplayer"></div></body></html>""" | |
from PyQt4.QtWebKit import QWebView | |
v = QWebView() | |
v.setHtml(content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment