← Back to team overview

zeya team mailing list archive

Re: Couple of queries regarding zeya.py

 

Hello Samson:
Samson Yeung wrote:
Hi,

- I am not too sure of what is going on in 'serve_content' when it is
checking for whether buffering is activated or not. Who
activates/deactivates buffering?

Javascript executed on the client web browser. Google Chrome's
implementation of ogg decoding needs to see a Content-Length header.
In resources/zeya.js, there is code to check if client is Google
Chrome.

- When I go to http://127.0.0.1:8080/getcontent?, I just see a "Loading
type" video. Not sure what is happening here:

133            elif self.path.startswith('/getcontent?'):
134                self.serve_content(urllib.unquote(self.path[12:]))

"http://127.0.0.1:8080/getcontent?"; could be better error handled, but
it's not a user facing URL, so fixing that is not a top priority. We
could probably point the user directly to "http://127.0.0.1:8080/"; for
clarity (with some additional instructional text on using whatever the
server's ip is.)

In your case, self.serve_content is being called with everything after
the question mark, in this case, it is getting called with an empty
string.

Also, to check my understanding: So, basically what is happening here is all
non-Ogg files are decoded to Oggs and are then sent back using 'audio/ogg'

Actually, all files are decoded and pushed to the ogg encoder, even
ogg files. Not the most efficient, but patches welcome!

which is recognized by a HTML5 compliant browser and hence the dependence on
HTML5.

What other dependencies do we have on HTML5 ?

Unfortunately, the dependency is more specifically Google Chrome or
Firefox. Safari does not work, even if you have the ogg codec stuff
installed (at least when I tried). The Opera 10 Beta I tried also did
not work, but I have not checked recently. The real dependency is the
<audio> tag, and an ogg decoder. Though there is also javascript which
the client web browser must be able to execute.

-Samson


Thanks for your reply. It answers all of my queries. BTW, I hardly spent 45 minutes with the code and it all makes sense to me. Nice job with the code as well :)


Thanks & Best Regards,
Amit

--
Journal: http://amitksaha.wordpress.com
µ-blog: http://twitter.com/amitsaha
IRC: cornucopic on #scheme, #lisp, #math, #linux



References