[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [GMG-Devel] Plugin for page view counter
From: |
Christopher Allan Webber |
Subject: |
Re: [GMG-Devel] Plugin for page view counter |
Date: |
Mon, 14 Jan 2013 09:36:05 -0600 |
User-agent: |
mu4e 0.9.9-dev6; emacs 24.0.92.1 |
Tiberiu C. Turbureanu writes:
> Thanks for the pointer, Chris!
>
> I need a way to increment the view counter only when the media file is
> loaded. How can I achieve this?
I'm not sure what you mean. Do you mean:
- only when the page is loaded
- or something more complex: only if someone clicks "play" on a song or
video?
The solution I was talking about involves number one. As for number
two, that would be a lot more complex, but I imagine it could be
achieved via one of two things:
- Easier solution: javascript callback on play that notifies the
browser of playing starting.
- Much, much trickier solution: you might be able to set up a proxy
view before serving the actual video that first increments the file,
but then tells the web server to send the video via X-Sendfile. That
sounds too complex to me though, and might be especially hard if a
browser "seeks" the media to read just a few frames to get a preview
image or do some preloading, which it might do in some
configurations.
> Also, Sebastian Spaeth told me that at the moment there is no way for a
> plugin to alter the template of the media page, but a hook mechanism is
> being discussed. That why until the implementation is ready, I think I
> will go for a new page under a route like this
> /u/<string:user>/m/<string:media>/viewcount.
Spaetz is right, there's no present solution to this. After I go
through my merge-a-thon this week though, I'll be switching onto some
plugin development, and will be looking into a solution to allow plugins
to extend pages more easily.
- Chris
- [GMG-Devel] Plugin for page view counter, Tiberiu C. Turbureanu, 2013/01/06
- Re: [GMG-Devel] Plugin for page view counter, Christopher Allan Webber, 2013/01/07
- Re: [GMG-Devel] Plugin for page view counter, Tiberiu C. Turbureanu, 2013/01/13
- Re: [GMG-Devel] Plugin for page view counter,
Christopher Allan Webber <=
- Re: [GMG-Devel] Plugin for page view counter, Nathan Yergler, 2013/01/14
- Re: [GMG-Devel] Plugin for page view counter, Christopher Allan Webber, 2013/01/14
- Re: [GMG-Devel] Plugin for page view counter, will kahn-greene, 2013/01/14
- Re: [GMG-Devel] Plugin for page view counter, Christopher Allan Webber, 2013/01/14
- Re: [GMG-Devel] Plugin for page view counter, will kahn-greene, 2013/01/14
- Re: [GMG-Devel] Plugin for page view counter, Christopher Allan Webber, 2013/01/15
- Re: [GMG-Devel] Plugin for page view counter, Christopher Allan Webber, 2013/01/14
- Re: [GMG-Devel] Plugin for page view counter, Odin, 2013/01/17