rafbis / moodle-mplayer

Automatically exported from code.google.com/p/moodle-mplayer
0 stars 0 forks source link

Please support lighttpd mod_secdownload #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Could you implement lighttpd mod_secdownload url generation?

Original issue reported on code.google.com by GSla...@gmail.com on 18 Oct 2010 at 9:02

GoogleCodeExporter commented 8 years ago
Hi, I don't directly provide any support for media streaming. Basically, there 
are far too many flavours and providers available so support for them is best 
given by your streaming media service provider who should be able to provide 
you with any configuration information necessary.

Good luck!

Original comment by matbury on 22 Oct 2010 at 10:44

GoogleCodeExporter commented 8 years ago
Unfortunately it is not configurable on the web interface, it requires php code.
As you're supporting lighttpd streaming, it's just an additional option to it:
- a checkbox for "secure download" (or a different stream type: lighttpd secure)
- a text field for the base url and a text field for the password

And a php code something like this (this is a quick hack to make it work with 
the lighttpd provider):
        // Generate lighttpd mod_secdownload videolink
        if ($mplayer->type == '&provider=lighttpd') {
                $t_hex = sprintf("%08x", time());
                $t_file=$mplayer->mplayerfile;
                $mplayer->mplayerfile = $mplayer->mplayerfileurl . md5($mplayer->mplayerfilepass."/".$t_file.$t_hex) . '/' .$t_hex . "/" . $t_file;
                $mplayer->hdfile = "&hd.file=".$mplayer->mplayerfileurl. md5($mplayer->mplayerfilepass."/".$t_file.$t_hex) . '/' .$t_hex . "/" . $t_file;
        }

The above needs patching of the web form also.

And this is media service provider independent: this is the way lighttpd server 
makes the URL secure (mod_secdownload).

Original comment by GSla...@gmail.com on 24 Oct 2010 at 8:54

GoogleCodeExporter commented 8 years ago
Hi, thanks for your help and advice. You obviously know a great deal more about 
writing PHP code for media streaming than I do!

I included the various options on the mod_form.php and a few examples just to 
get people who are not very familiar with Moodle modules started. I am not a 
streaming media service expert and there are so many different ways of 
implementing streaming video, making it almost a full-time job so I cannot 
provide support for this.

Since this is an open source project, I welcome contributions from generous, 
helpful individuals. If a patch of code is useful to a large enough number of 
people and can be implemented practically and seamlessly, I'd be happy to 
include it in a future update.

If a patch is only useful in a small number of cases, we could also consider 
making it a custom extension or a new branch of the project.

Would you like to contribute?

Original comment by matbury on 24 Oct 2010 at 11:00