IRC Log Viewer » #firebreath » 2012-02-27

IRC Nick Time (GMT-7) Message
ZsoL 01:02 taxilian_away: :D np
nice framework you got there
prem_ 01:02 can i use atl dialogs in my FB plugin?
reichi 02:02 hi
linearray 03:02 I think so
you can do pretty much everything, unless there is a good reason you cannot
prem_ 03:02 i mean, one can't use MFC with firebreath..
so just want to make sure ATL doesn't have such issues before I put a considerable effort into it..
ch 03:02 will be windows only of course
MBarni 04:02 Is there a better guide to create a new FireBreath project?
ch 04:02 how are the current docs lacking? is quite solid IMO
MBarni 04:02 the actual docs assume a very big previous knowledge from the user...
that`s the problem.
dougma 04:02 can you be more specific?
linearray 04:02 prem_: you can use MFC
well, theoretically :)
according to the logs it's painful to get it to link correctly
MBarni 04:02 using CMake.... Using GitHub...
reichi 04:02 MBarni: there are plenty of git guides out there
linearray 04:02 prem_: but ATL definitely works
reichi 04:02 MBarni: but there's not much you have to know when you're just building a plugin based von FB
(about git)
jsut clone it
and use it
dougma 04:02 you just have blunder on... and if you learn something which you think would make it easier, add it to the wiki.
MBarni 04:02 what about CMake?
reichi 04:02 you actually don't have to know "anything" about cmake
until you have to link stuff
firebreath comes packed with some nice scripts that do all the work for you
MBarni 04:02 now... using Python
Im following the tutorial
got the GitHub
then the guy runs
there are some prompts... buy in my CMD... a promp not shown pops up
"Plugin has no UI [false]:"
reichi 04:02 yeah fill it
what's the problem?
MBarni 04:02 fill it with what?
false? true?
reichi 04:02 isn't the questions obvious?
do you plan to give your plugin a UI?
if not, that would become true
else just press enter and take the default value [false]
MBarni 04:02 that depends... what composes the UI? like a toolbar? Or the ability to draw some HTML lines on the webpage is already considered UI?
reichi 04:02 no
ui is what you draw inside the plugin
MBarni: what do actually want to do?
you should have a clean understanding of what a npapi plugin can do
and what it can't do
dougma 04:02 MBarni: i think in your case it will be false
MBarni 04:02 reichi I need to use ActiveX or RAPI.dll or OpenNETCF to push and pull some files inside a Windows Mobile Pocket PC through the computer this device is connected to.
reichi 04:02 will it be a visible plugin?
MBarni 04:02 I dont think so... if drawing some HTML lines on the screen is not considered "visible"
reichi 04:02 visible means: will the <object /> / <embed /> tag be visible (have width, and height, etc) OR do you plan to control it via javscript
MBarni 04:02 JavaScript
My website will have to find out if the plugin is installed
and warn the user of it
reichi 04:02 actually
i think on windows i doesn't change a lot
jsut leave it on false
MBarni 04:02 ok
reichi 04:02 btw, why is it a negative question?
i think: "Plugin has UI [true]:" would be much mor straight forward ;)
dougma 04:02 oh yeah, i misread it!
MBarni: in your case: true. :)
reichi 04:02 i know that the define is FB_GUI_DISABLED, but that shouldn't e of any concern with the question ;)
MBarni 04:02 so I need to aswer TRUE to that?
reichi 04:02 "need" to
dougma 04:02 it is true, you have no ui.
MBarni 04:02 ok
reichi 04:02 MBarni: it's not a shows-topper if you find you need a UI later on
MBarni 04:02 ok
reichi 04:02 it's just for some conditional compiles
MBarni 04:02 any of you guys already played Battlefield 3?
reichi 04:02 lol
MBarni 04:02 I love the way that BF3 plugin works
reichi 04:02 :)
pretty nice
dougma 04:02 what does it do?
reichi 04:02 well it's browser-based
so you can browse server with any webbrowser
and launch the game
from any webbrowser
because it is an npapi plugin afaik
MBarni 04:02 launch the game directly though the browser...
dougma 04:02 cute
MBarni 04:02 that`s not possible with FireBreath?
reichi 04:02 sure it is
MBarni 04:02 only with native NPAPI?
reichi 04:02 why not?
MBarni 04:02 dunno... just asking...
reichi 04:02 FB ist just a framwork
it makes things easier
MBarni 04:02 Im a "programmer" for just one year...
reichi 04:02 i hope you know c++
MBarni 05:02 reichi: i dont... but i believe i can manage that... cause there`s a plugin example that already uses Active X...
reichi 05:02 you will feel some real pain
and regret you ever said that sentence ;9
MBarni 05:02 :/
reichi 05:02 do you have someone to assist you with c++?
you can make a lot of things wrong when using c++
MBarni 05:02 yes... my teacher... but only through email
reichi 05:02 and you will most probably have a ton of problem because you actually are doing things wrong :/
MBarni 05:02 :/
almost giving up already
reichi 05:02 no don't
i just wanted to make you aware
you will have to learn some c++
MBarni 05:02 i know VERY FEW of c++... just really basic stuff...
I really ask myself how the world is so unevolved on browser plug-in programming...
reichi 05:02 if it helps
when i started with my fb-based plugin
i was coding c++ for like 2 months
MBarni 05:02 hum.
reichi 05:02 but i started programming a few more years ago (just not c++)
MBarni 05:02 i just program in java and c#... but basic stuff... no complex apps
to open a sample FB project... i just need to extract it inside the "projects" folder?
dougma 05:02 nacl is the evolution of browser plugin tech
linearray 05:02 I thought it's just restricted PPAPI :)
dougma 05:02 pretty much!
but no user approval required!
linearray 05:02 we should totally throw money at taxilian until he implements a PPAPI backend so that FB plugins run on chromeOS
reichi 05:02 mmh
wouldn't qt be a nice "platform" to support?
dougma 05:02 maybe. what changes are needed?
reichi 05:02 well the idea is
qt works on "all" platforms
linearray 05:02 isn't that GPL?
reichi 05:02 i think LGPL
linearray 05:02 ah yes
triple licensed
reichi 05:02 sad thing is you will have to patch qt-embedded as it doesn't support npapi (yet)
but the standard qt and it's qtwebkit does
prem_ 05:02 linearray: thanks for the ATL info..
linearray 05:02 prem_: I did not try it myself, but that's what the logs say
prem_ 05:02 k.. i'll try it out..
reichi 07:02 hmm
crazy things happen if an exception is thrown from within the constructor of a jsapiauto object
mkoch 08:02 hi!
taxilian 08:02 howdy
I'll be actually on a bit later; need to go get some excercise
mkoch 08:02 taxilian: can you suggest me sourceforge like place (but not sourceforge, I heard bad things about that), where I can start publishing my plugin?
I mean the sources and everything, as it's officially confirmed now that it can be open source :)
reichi 08:02 github!
(that's were firebug is hosted, too
i also host some code on github
mkoch 08:02 so far I did the development in svn, but form the name I guess it suppots git only, right?
reichi 08:02 yes
and you want git
git rocks
i know it's hard when one starts using it
but once you got it, it's awesome (imo)
taxilian 09:02 mkoch: I agree with reichi; I'd use github
git pull requests
FireBreathBot 09:02 3 open pull requests:
dougma: FIREBREATH-165: Fix FB::variant memory leaks
shenberg: Explicit implementations of createElement and appendChild DO...
wroberts: Rename FBSTRING_FileDescription to FBSTRING_PluginDescriptio...
reichi 09:02 mkoch: you we're bulding some multimedia-thing, right?
mkoch 09:02 sry, here
reichi: yes, actually a video player plugin based on ffmpeg
the main goal of the project is to play multiple video streams on a single webpage and keep them in sync. that's what (after a long research) seems to be impossible with the currently available plugins
reichi 09:02 oh, and ouy'll opensource it?
i may have use for that ;)
mkoch 09:02 yes, I managed to convince the higher managemet that it's good for everyone, as we would give it away for free anyway, our producti is actually the server which generates the video streams and it is our interest that anyone can use it :)
reichi 09:02 may I ask what's your actual progress?
FireBreathBot 09:02 Commit 4f87c03 on master by Will Roberts: "FIREBREATH-164: Rename FBSTRING_FileDescription to FBSTRING_..."
Commit 5519001 on master by Will Roberts: "FIREBREATH-164: FBSTRING_PluginDescription fallback in Commo..."
JIRA issue issue resolved by richard "Thanks for the patch; this is in the master branch and will be in 1.7.0"
mkoch 09:02 reichi: well, it's still before the 1st release. atm it can play local files or video streams on http/rtp (any format supported by ffmpeg), and it displays correctly on win/linux and mac. it has a JS API, but it needs to be completed. the biggest missing part is the sound, win sound works only with 1 plugin instance, mac doesn't have any sound yet
taxilian 09:02 that's still pretty decent progress
FireBreathBot 09:02 Commit 6272c3d on master by Roee Shenberg: "FIREBREATH-170: Added appendChild to DOM::Node with default ..."
Commit a8dd491 on master by Roee Shenberg: "FIREBREATH-170: Added createElement to DOM::Document with de..."
Commit a5f0eee on master by Roee Shenberg: "FIREBREATH-170: AXDOM::Document implementation of DOM::Docum..."
Commit da906f0 on master by Roee Shenberg: "FIREBREATH-170: AXDOM::Node implementation of DOM::Node::app..."
Commit 2b4b8e7 on master by Roee Shenberg: "FIREBREATH-170: Added return value to appendChild() to match..."
Commit e03d17c on firebreath-1.6 by Roee Shenberg: "FIREBREATH-170: Added appendChild to DOM::Node with default ..."
Commit a00c93c on firebreath-1.6 by Roee Shenberg: "FIREBREATH-170: Added createElement to DOM::Document with de..."
Commit adfdb1f on firebreath-1.6 by Roee Shenberg: "FIREBREATH-170: AXDOM::Document implementation of DOM::Docum..."
Commit cdff1e6 on firebreath-1.6 by Roee Shenberg: "FIREBREATH-170: AXDOM::Node implementation of DOM::Node::app..."
Commit 7167bea on firebreath-1.6 by Roee Shenberg: "FIREBREATH-170: Added return value to appendChild() to match..."
Commit cb17839 on master by Richard Bateman: "Merge pull request #49 from dougma/boost-any
reichi 09:02 mkoch: ôh
but that's sounds already pretty cool :)
FireBreathBot 09:02 JIRA issue issue resolved by richard "Merged. Thanks!"
JIRA issue issue resolved by richard "Thanks for the patch! it's in both 1.6 and master"
taxilian 09:02 there; that should help
mkoch 09:02 most of the problems came from the toubles areound compiling and linking ffmpeg on the different architectures and also form my lack of knowlege on the mac programming side :) I will clean up the code a little bit and make some docs about how to build the plugin and then let you know when it's available
and then any support/contribution is welcome!
ch 09:02 mkoch: how fast is your video playback on mac?
mkoch 09:02 you mean the delay?
ch 09:02 no, how much cpu do you use? :)
for 1080p
reichi 09:02 how expensive is invoking methods on the dom? i gues pretty?!?
mkoch 09:02 sorry, I never tested that so far, the system we are developing for uses ip cameras and most of them stream only VGA, some 720p but no fullHD. I can make a test later if you wish
ch 09:02 k
I have some performance trouble with 1080p and I'm not so sure if this is actually something I can fix from within the plugin
mkoch 10:02 ch: are you also developing a video player plugin?
gargle 10:02 hi all
ch 10:02 yes
a common pattern these days :-)
mkoch 10:02 what are you using to encode the video?
ch 10:02 ffmpeg for decoding
mkoch 10:02 sry, I meant that :)
and what's your reason for writing an own video player plugin?
reichi 10:02 isn't that simple?
there is NONE
there is the VLC plugin
which requires you to install vlc with it
mkoch 10:02 quicktime?
reichi 10:02 except that i don't know any platform-independent plugin capable of playing "almost everything"
mkoch 10:02 okay :)
reichi 10:02 especially DVB Transport Streams seem to be a big problem with almost all players
WMP can do it since v11
which is only available in Windows 7
damn writing!
mkoch 10:02 is your work opensource?
reichi 10:02 mine? nope
unfortunately not
ch 10:02 yeah I also need to play "almost everything"
and no it's not opensource :/
reichi 10:02 but i may contribute to a videoplayer :)
mkoch 10:02 i'll keep you updated :)
taxilian 10:02 interesting; according to Amazon MP3 Downloader is built on FireBreath
reichi 10:02 mmh
at least on the linux version i can't find any sign of FB in the package
same for the windows package
and the readme doesn't name Firebreath
taxilian 10:02 yeah; on the other hand, FireBreath doesn't actually do anything to expose that the plugin was built with it
the mac plist does look like the FireBreath template, but hta'ts not conclusive
reichi 10:02 if they use proper obfuscation you wouldn't even find it in "right" away if you look for it
and i somehow expect amazon to do so
taxilian 10:02 yep, it uses FireBreath. from the binary: "<JSAPI-Auto Javascript Object>"
open it in vim, search for "JSAPI"
reichi 10:02 on osx?
taxilian 10:02 yes
but I suspect other platforms too
reichi 10:02 i don't even find browser-plugins on the other platforms
taxilian 10:02 ahh. well, dunno; I haven't looked =]
reichi 10:02 there should be a readme :)
i gues on the mac version it names firebreath
taxilian 10:02 can't find one
reichi 10:02 window and linux both do have a readme.html
taxilian 10:02 but it is definitely built with FireBreath
reichi 10:02 :)
taxilian 10:02 ahh, sure enough; there is a readme on windows that references FireBreath
reichi 10:02 taxilian: i've already asked that earlier today when you haven't been around
have you ever considered/thought about adding qt as a "platform"?
taxilian 10:02 yes and no
reichi 10:02 considered but yet not thought about it?
taxilian 10:02 I'm totally open to adding pretty much anything as a platform as long as it is doable; however, I don't have any experience with QT, and I don't have any need for it, so I'm not ready to spend any time on it
however, if you'd like to do so I'm happy to help you figure out how
reichi 10:02 i am pretty "done" with adding "my own" platform
which was in fact not so hard as i do not need any real drawing
(though i am still hunting why some bugs, but in general it seems to work quite nice)
taxilian: well... i know qt
taxilian 10:02 like I said; if you want to integrate it into FireBreath, I'm certainly open to that
reichi 10:02 and i guess there is a major issue as qt uses it's own make
name qmake
in general the whole build-process with qt-related things is rather special
gargle 10:02 I have a little question .... I need to fire an event from MyStreamHandler to JS. But, events need the JSAPI object. How I can get send it to MyStreamHandler ?
taxilian 10:02 pass in a reference to the JSAPI object when you create your stream handler
hold it as a weak_ptr
then lock it and use it when you need to fire the event
gargle 10:02 a little like ?
FireBreathBot 10:02 c9bb475 by dougma: FIREBREATH-169: No need to hold a reference to the browser h
taxilian 10:02 umm; I'm not sure how they are related
gargle 10:02 ok, I will try it
thanks for these informations
taxilian 10:02 good luck
gargle 10:02 lol, thanks a lot ;)
shenberg 15:02 Hey, I'm having a "I'm not sure what's the right way of doing things" issue...
I'm making a bundle installer that includes the .msi I get from WiX, and I'm doing it with a batch file invoking light/candle/etc directly. I would like to move to another WiX project inside MSVC that doesn't have the firebreath WiX defaults... What's the right way to go about adding that to the CMake stuff? add_wix_installer seems to do way too much
taxilian 16:02 I'd just look at what add_wix_installer does and make your own version
trim things down
reichi 16:02 hmmm, i want to set a method of my JSAPIAuto object as callback for the "resize" event, how would you recommend to do that?
taxilian 16:02 reichi: not sure we've ever established how well that works
theoretically you'd just call addEventListener from your plugin
but not sure how to make it work correctly in IE
reichi 16:02 IE doesn't matter
i am webkit only
(paradise, if you ask me)
taxilian 16:02 I'd take a look at JSFunction
shenberg 16:02 Also, it seems like a large part of the issue is that the implementation of the installer project is using a build-step invoking the WiX tools manually instead of doing a WiX project that uses the MSBuild targets you get when you install WiX. Was this way chosen for old MSVC versions compatibility?
reichi 16:02 taxilian: kk, thx
taxilian 16:02 shenberg: no, it was chosen because I don't know of a way to use a real WiX project with cmake
shenberg 16:02 Ah, that sucks. I think I'll stick to my post-build batch file for now. I think this will need to cause me more pain for me to decide I need to solve it properly :/
reichi 16:02 taxilian: oh wow, it looks very straight forward :)
taxilian 16:02 there are examples of using JSFunction in NPJavascriptObject, I believe
reichi 16:02 i grepped it ;)
taxilian 16:02 one of these days I'll make one that works with the auto conversion stuff and boost::bind
but I haven't had time
reichi 16:02 i don't know boost
expect the part i got to know with FB ;)
taxilian 16:02 it wouldn't be terribly hard
just use the same principles that JSAPIAuto uses
reichi 16:02 some day I will pay someone to type for me :/
dreijer 17:02 I'm completely new to Firebreath, so excuse the potentially stupid question: If I've built an NSAPI plugin using Firebreath, how do I go about observing page navigations in the browser? Like, I want to do something if a certain URL is visited
taxilian 17:02 you can't do that with a NPAPI plugin
you need an extension
dreijer 17:02 the thing is I also need to access native named pipes when that page is visited, which means I need an NPAPI plugin right?
(Windows specific)
taxilian 17:02 (I'm on a call; hang on a few minutes)
dreijer 17:02 sure, no problem
taxilian 18:02 okay, sorry
that call lasted longer than expected
dreijer: you can use an NPAPI plugin to talk to named pipes, yes
but to do the rest of what you want with page navigations you'll need an extension
extensions can optionally use plugins
niftylettuce 18:02 taxilian: great video/tutorials, I was wondering if you had any examples of extensive invoking of JavaScript on the DOM
or if anyone else in here had any
taxilian 18:02 there are examples in the codebase; pretty much everything works the same way
!find asyncLog
FireBreathBot 18:02 Could not find any tags matching asyncLog
taxilian 18:02 !find htmlLog
FireBreathBot 18:02 Found 1 possible matches. Displaying 1
/^void FB::BrowserHost::htmlLog(const std::string& str)$/ (f) found in src/ScriptingCore/BrowserHost.cpp:
taxilian 18:02 that does it, for example
dreijer 18:02 taxilian: right okay, so the extension communicates with the plugin via js or?
taxilian 18:02 the extension can have it's own DOM of sorts (or so I understand) and you put the object tag in the extension's dom and talk to it with JS
dreijer 18:02 cool
niftylettuce 18:02 cool, is there any way to just plain straight up write JS without having to use the JSAPI? I would imagine not, since the JSAPI is directly tied to the compiling
dougma 18:02 niftylettuce: you can always inject script from the plugin if that's your bag. :)
dreijer 18:02 taxilian: and as far I could tell from the article you linked above, extensions are browser specific whereas I can use e.g. firebreath for the plugin part
taxilian 18:02 not sure I understand your question
niftylettuce 18:02 dougma: inject script?
taxilian 18:02 !wiki executeJavascript
FireBreathBot 18:02 0 results found. Note: Results limited to 8
dougma 18:02 you said you wanted to "write js"
taxilian 18:02 !find executeJavascript
FireBreathBot 18:02 Could not find any tags matching executeJavascript
taxilian 18:02 !findfile BrowserHost.h
dougma 18:02 !find evaluateJavaScript
taxilian 18:02 I guess we killed him
dougma 18:02 wake up FireBreathBot!
niftylettuce 18:02 !find executeJavaScript
FireBreathBot 18:02 Could not find any tags matching executeJavaScript
niftylettuce 18:02 dougma: yeah i was looking for example, sorry should have been specific :)
FireBreathBot 18:02 Found 4 matching file(s) in the master branch. First 4 are:
Found 4 possible matches. Displaying 4
/^void ActiveXBrowserHost::evaluateJavaScript(const std::string &script)$/ (f) found in src/ActiveXCore/ActiveXBrowserHost.cpp:
/^void NpapiBrowserHost::evaluateJavaScript(const std::string &script)$/ (f) found in src/NpapiCore/NpapiBrowserHost.cpp:
/^void FB::BrowserHost::evaluateJavaScript(const std::wstring &script)$/ (f) found in src/ScriptingCore/BrowserHost.cpp:
/^ virtual void evaluateJavaScript(const std::string &script) {$/ (f) found in src/WebKitCore/WebKitBrowserHost.h:
taxilian 18:02 yeah, there it is. evaluateJavaScript
niftylettuce 18:02 taxilian: how did this project get started btw?
taxilian 18:02 someone wanted me to build them a browser plugin framework; I told them I would only do it if I could release it as open source afterwords
the rest is history
niftylettuce 18:02 taxilian: awesome, i invited my pal from here, he is competing with selenium
taxilian 18:02 cool
niftylettuce 18:02 taxilian: im launching a startup based off browser plugin, so your framework will be vital :)
now i just have to learn
SubStack 18:02 rawr
taxilian 18:02 well, if you find it useful, please give back to the project in whatever way you are able
niftylettuce 18:02 SubStack: taxilian = Richard (aka creator)
SubStack 18:02 ahoy
taxilian 18:02 yoha
niftylettuce 18:02 yeah ill definitely give feedback/pull requests when necessaryz
SubStack 18:02 sweet
taxilian 18:02 if you're working on testing frameworks, I should mention that there is a huge need for better methods for testing plugins
niftylettuce 18:02 boom and the fellowship of the ring was form...
SubStack: also take note of the bot commands, like !wiki or !find for instance
taxilian 18:02 well, I need to go spend some time with my kids. I'll likely be back on a bit later
niftylettuce 18:02 !find evaluateJavaScript
FireBreathBot 18:02 Found 4 possible matches. Displaying 4
/^void ActiveXBrowserHost::evaluateJavaScript(const std::string &script)$/ (f) found in src/ActiveXCore/ActiveXBrowserHost.cpp:
/^void NpapiBrowserHost::evaluateJavaScript(const std::string &script)$/ (f) found in src/NpapiCore/NpapiBrowserHost.cpp:
/^void FB::BrowserHost::evaluateJavaScript(const std::wstring &script)$/ (f) found in src/ScriptingCore/BrowserHost.cpp:
niftylettuce 18:02 taxilian: cool, thanks :)
FireBreathBot 18:02 /^ virtual void evaluateJavaScript(const std::string &script) {$/ (f) found in src/WebKitCore/WebKitBrowserHost.h:
dougma 18:02 cross browser testing, nice.
you will find many cross-browser quirks when it comes to plugins :/
mostly around UI: drawing, mouse, etc... so if you're just going to be an invisible plugin that'll be easier