IRC Log Viewer » #firebreath » 2012-12-06

IRC Nick Time (GMT-7) Message
ea2973929 09:12 Hi, just ask a quick question about firebreath, is it possible to implement a video player plugin using it that would be cross platform? what would be the requirement of the underlying implementation? That it can render to some graphics surface?
jshanab_ 09:12 There is a BasicMediaPlayer example in the examples directory. It shows you how to draw on opengl on mac,linux, and windows. I have written a video player that renders to a texture in opengl. So once I have a GL context all is golden. Note that on Mac you only have a windowless plugin, which means that you the drawing context only, not a window handle. The wiki has some good info about...
...Drawign models
Mac is the odd child.
ok, that is more perspective than truth I guess
ea2973929 09:12 Ok, thanks! Good pointers, it seems to be quite possible.
jshanab_ 09:12 I have been trying to use GLFW, or SDL, or SFML, the new line of SDL was most promising, but so me edge case bugs on windows. It seems the best point for the abstraction is Firebreath itself, and then each platform can draw in whatever way is best.
ea2973929 09:12 That also keeps dependencies down so it's not to bad
taxilian 10:12 ea2973929, jshanab_: actually BasicMediaPlayer only shows you how to do opengl on mac
there is a windows example on the wiki somewhere, though
ag_ 10:12 is there any way to run activeX object for mozilla
taxilian 10:12 ag_: absolutely… sorta.
ag_ 10:12 how
taxilian 10:12 you could try
I haven't ever used it
barring that you could create a plugin that hosts your activex control and proxies calls to it
(which is what that one is supposed to do)
ag_ 10:12 i am writing a simple code in html run shell command on windows
taxilian 10:12 uh
that's a really really really really really dangerous thing to do
ag_ 10:12 and when i use the browser it doesn't work
taxilian 10:12 you know that, right?
ag_ 10:12 I knw
taxilian 10:12 why exactly if you're just doing a shell command would you want to use activex to do it?
ag_ 10:12 but is there any alternative to run python script from html
i was to run a python script of parsing in html on some buttn click lets say
i used activeX for that
taxilian 10:12 let me ask you a question: is this for something that you plan to have a lot of people use, or for something strictly internal?
ag_ 10:12 i understand from sec point its dangerous when used among many ppl
taxilian 10:12 dangerous doesn't begin to cover it
ag_ 10:12 though currently i am developing a tool
which will be used by many ppl later
is there any alternative way to run python from js
in html
taxilian 10:12 no
you would have to use a plugin
I wouldn't bother with activex
I'd just write a plugin that does it
but you do *not* want to make something that can be used to execute arbitrary python on a user's computer
ag_ 10:12 hmm
my bad is I was not able to execute a simple file read without fso
taxilian 10:12 you'd be far better off making a plugin that allowed *very carefully limited* access to the filesystem (never by arbitrary path, only by allowing the user to choose a file) than you would be allowing *any* kind of arbitrary code to run on the user's system outside of the browser
ag_ 10:12 I have no experience writing a plugin
though i would love to do so
and i am open to it
can u give me some link to do that
taxilian 10:12
ag_ 10:12 one last question
isn't there any other way to run python script from html other than copy past the python code or do it through activeX Object?
taxilian 10:12 be *very very* careful on any of this; if you succeed in getting a plugin out there and then people's computers are compromised because you didn't know what you were doing and left serious security holes you could quite possibly be legally liable for the damage.
no, python is far too dangerous to allow direct access to from the browser; the only way to run it would be through a plugin of some sort (activex controls are basically plugins)
ag_ 10:12 ok
I think this firebreath gonna help me a lot
thanks for ur helpful suggestion
taxilian 10:12 glad I could help
good luck
ag_ 10:12 have u ever faced any isse ready a file in html using fread or simle JS function
well i spent hell lot of time doing this simple job of reading a file but i could not and then ultimately i had to use "var fso = new ActiveXObject("Scripting.FileSystemObject");"
taxilian 10:12 have you looked at the html5 filesystem access stuff?
ag_ 10:12 ok
i saw this
but initially could not figure out few things there.. but after coding few things in html seems readable to me
kellyk_ 12:12 I have compiled the test plugin on OSX and it works perfectly in firefox-very cool. Chrome just doesent see the plugin (Chrome:plugins doesent list it after restarting). I have it in /Users/me/Internet Plugins
taxilian 12:12 kellyk_ which test plugin?
kellyk_ 12:12 I have it in /Users/me/Library/Internet Plugins
I just compiled per the video tutorial on the site, everything went fine.
taxilian 12:12 okay, so this isn't a test plugin, it's the skeleton plugin created by fbgen?
kellyk_ 12:12 sorry, yes.
taxilian 12:12 I'd check first to make sure that it wasn't built 64 bit only
go into the .plugin/ dir and find the binary
kellyk_ 12:12 ah, thats the problem..
taxilian 12:12 run "file <plugin binary>"
chrome doesn't do 64 bit plugins yet
kellyk_ 12:12 right, thanks, thsts it!
btw, just wanted to say nice work on the framework, it "just works"
taxilian 12:12 thanks
jshanab_ 15:12 FYI. In Firefox and chrome, If you block the main thread. All is well in terms of opengl and directx rendering. (I know this is not recommended at all, but was temporarily done for a modal dialog box and download of a clip). In IE9 however blocking the main thread of javascript leaves the video driver in a locked state and textures don't update.
I think this also explains why scrolling the page is so smooth on chrome and Firefox and so jerky and slow on IE when there are a bunch of video's on the page. :-)
taxilian 15:12 jshanab: heh. I'm surprised it works at all when you block the main thread
but probably has to do with the internal workings
jshanab_ 15:12 There are a lot of other threads running and since it is a modal dialog box. there was no danger of clicking on the browser to get the "white screen". But the opengl progress bar of the download was not updateing. Anyway it was an easy fix to put it on a thread and make it async (Something I wanted done anyway)
jshanab_ 16:12 What version of boost do I have to have with the most recent FB version?
taxilian 16:12 probably doesn't matter; 1.46 and 1.50 both have been tested to work, I think