Created
March 7, 2014 03:47
-
-
Save mattdangerw/9404925 to your computer and use it in GitHub Desktop.
Video playback crash
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
const Gtk = imports.gi.Gtk; | |
const Gdk = imports.gi.Gdk; | |
const System = imports.system; | |
const WebKit2 = imports.gi.WebKit2; | |
let html = '\n\ | |
<!doctype html>\n\ | |
<html>\n\ | |
<body>\n\ | |
<div id="player">\n\ | |
<iframe id="player" type="text/html" width="854" height="480" src="http://www.youtube.com/embed/wZZ7oFKsKzY?enablejsapi=1&autoplay=1&origin=http://endlessm.com&showinfo=0" frameborder="0" style="visibility:hidden;" onload="this.style.visibility=\'visible\';"></iframe>\n\ | |
</div>\n\ | |
</body>\n\ | |
</html>\n\ | |
\n'; | |
Gtk.init(null, 0); | |
let web_view = new WebKit2.WebView(); | |
web_view.load_html(html, null); | |
let test_window = new Gtk.Window({ | |
default_width: 1000, | |
default_height: 600 | |
}); | |
test_window.add(web_view); | |
test_window.connect("destroy", Gtk.main_quit); | |
test_window.show_all(); | |
test_window.connect("draw", function () { | |
print("hey"); | |
}); | |
Gtk.main(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment