Closed synctext closed 10 years ago
Concreet project ToDo list: -Eclipse: run Tribler from sources -wxWebView working in Tribler with hardcoded youtube clip -grab youtube video file -seed in P2P using Libswift in Tribler -play on another Tribler -Open-ended assignment then midway/scrum targets the following will be targetted: --Optional0: Support for P2P streaming URLs. HTML5 "< video >" tag is expanded with ppsp://db5dabb90a3cbd61a90866a4cc208ae959440ec9 support --Optional1: show any website using address bar (standard HTTP fetch) --Optional2: download content via P2P protocol anonymously --Optional3: convert any encountered magnet:// URL link into a Youtube-like player window --Optional4: foundation for AnonTube research of Tribler team (ambitious and on critical path) #119
prior work 4 years ago, read thesis .PDF: http://www.tribler.org/P2PWebhosting
14 June code submission Report submit 4 July presentation day (tentative)
Note, above "webview->RunScript()" example might not work due to lack of page loading complete: http://trac.wxwidgets.org/ticket/14326
HTML dynamic rewriting is seen as a difficult technical problem. Either this will need significant engineering effort, a smart & fancy solution or we simply avoid this issue and alter course.
Your comments don't seem to be true, according to the ticket you referenced the runscript command will not work until the page is fully loaded. Therefore, simply waiting for the page to be fully loaded seems to be fine.
If we want to replace/modify urls in the video tag, then we can simply pass all http traffic through a proxy which rewrites the html.
after initial work and results the following target as end-goal was discussed: single-page web mirror service; eternal availability of wikipedia and wikileaks.
RunScript issue (mystery segfault) resolved:
You cannot access a wx.html2.WebView
object's RunScript
outside of the main App event dispatch loop.
For seperate threads this must be invoked using the wx.CallAfter
function.
For example here is a function that waits for an initial load of a webpage and executes some javascript on it:
def execute_on_load(browser, javascript):
'''browser: wx.html2.WebView object
javascript: string containing javascript code
'''
while (browser.GetCurrentURL() == "about:blank"):
time.sleep(0.3)
wx.CallAfter(browser.RunScript, javascript)
Status update: With the wx functionality implemented in the latest wxPython version (Phoenix) we can now parse any webpage (not just wikipedia and wikileaks pages) and have its local copy look good. Even though Phoenix murders all applications based on previous wxPython versions, we have managed to port Tribler to it (albeit with some deprecation warnings).
For what I can see, this is an unreleased development branch of WX.
Are we planning on using this on production versions of Tribler? (and hence packaging for all our supported platforms)
Ticket done: bsc thesis completed "Closing the gap between the Web and Peer to Peer" http://repository.tudelft.nl/view/ir/uuid%3Ac51e551d-22a6-46e8-ba56-0109bb134ae7/
Abstract During the course of Q4 of the 2012-2013 academic year, we have worked on the project of a Peer-to-Peer web browser. After a two week orientation phase, a six week programming phase and nally another two week reporting phase we deliver our product. The final result of this endeavor is an integrated web browser in the Tribler platform, which supports automatic retrieval and distribution of resources encountered on the web page.
Aim: create a fully functional web browser which also support (anonymous) P2P video streaming.
Outcome: P2P-Browser for HTML5-based websites with any-format video embedding, Javascript and CSS.
Approach: build upon the new WxWidget HTML rendering in wxpython 2.9: http://docs.wxwidgets.org/trunk/classwx_web_view.html A browser in 800 lines: http://trac.wxwidgets.org/browser/wxWidgets/branches/SOC2011_WEBVIEW/samples/webview/webview.cpp We can even play Youtube (and grab it for P2P seeding in Libswift it seems):
For windows, HTML5 video tag support needs IE9 libs :-(
For P2P streaming we build upon our own upcoming IETF Internet Standard work: https://datatracker.ietf.org/doc/draft-ietf-ppsp-peer-protocol/ We use VLC to PlayVideo(), render in that windows and support any video format plus HTML5 power? Old VLC adding patch exists: http://trac.wxwidgets.org/ticket/10264
P2P streaming support appears easy to add via the wxWebViewHandler. Assuming Python we can make a call to the libswift process and present the output of the HTTPGW as the inputstream for the web engine. VLC will be used for playback. All mainstream containers+codecs will thus be supported, so we've created a HTML5 element that can play all formats. Bittorrent swarms can thus be easily be supported.
Limitation: web sites need to be specifically created to support Youtube-like P2P streaming.