I have a problem with embedded files in moodle. The files aren't publicly aviable and are served using x-sendfile like this:
if(has_capacity(...))
{
sendfile(...);
}
It works fine for files in avi but for files with mpeg the player decides to do a second request to the server which fails on the capability check. To make things worse files that work or don't work differ from between computers and players. I'm interested in making it work in ie10 mostly.
It seems others have found this problem before ("Some media players will not accept the media file if it comes via the script which guards the course files") but I have not yet seen a player that would work in every case.
Things I have tried:
- Forcing moodle to send other mimetype by changing information in the database (
update mdl_files set mimetype='video/x-ms-wm' where mimetype='video/mpeg';
)/file extension/extension=>mimetype configuration. It works for some files but not for most. - Changing configuration for moodle players to force it to use WMP instead of quicktime. It works for a few files but not for most.
Things I would rather avoid: - sessions in url - running a script to convert every uploaded file to a diffrent video format periodicaly
A flash player plugin would probably work but it would be nice if it could play the files which already are on the site.