filter_rtmp broken by Flowplayer changes

filter_rtmp broken by Flowplayer changes

by Fred Woolard -
Number of replies: 4

The weekly release for 2.8.8+ today contained a commit that changed the way Flowplayer is used. With these changes, the filter_rtmp plugin will not work. I'll set about to learn how things changed, and correct the plugin.

Checking the forums there was no mention of it, and checking Moodle tracker, I can't access the issue (MDL-48085), presumably because it's a security issue.

Average of ratings: -
In reply to Fred Woolard

Re: filter_rtmp broken by Flowplayer changes

by Will Taylor -

thanks - anxious to have it back in operation.

In reply to Fred Woolard

Re: filter_rtmp broken by Flowplayer changes

by Simey Lameze -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Fred Woolard, 
You're correct, there was a security bug related with Flowplayer (MDL-48085) which got fixed last week.
There was many proposed solutions, but we have decided to change the Flowplayer handling, making the php responsible to filter inappropriate content and get the flowplayer data.

The responsible method for calling the Flowplayer is:

flowplayer_send_flash_content($filename)

I guess you will need to change your plugin to call that method instead of using the swf file directly.
Looking the source code of your plugin I've found this line, In this specific case you may need to change that line to:
'swf'  => $flowlibpath . "/flowplayer-[0-9].[0-9].?*.swf.php
The same applies for all the flowplayer swf files (audio and controls). Please let me know if I can assist with any other questions! Thanks.
In reply to Simey Lameze

Re: filter_rtmp broken by Flowplayer changes

by Fred Woolard -

Thank you for the information Simey. There are several additional .swf plugins I use to enable RTMP streams (with captions) to be played; the binary for each I downloaded directly from Flowplayer's site. Will any additional code changes need to be made to those .swf files in order to use them in the same manner as the main flowplayer .swf? I have not yet looked to see why there is a *.swf and *.swf.bin file, can you briefly explain that?

If changes are necessary to the ActionScript, the source is available for the flowplayer.rtmp-{version}.swf, flowplayer.captions-{version}.swf, and flowplayer.content-{version}.swf files; is there any documentation available for changes needed specific to Moodle?

In reply to Simey Lameze

Re: filter_rtmp broken by Flowplayer changes

by Fred Woolard -

Simey, I have had an opportunity to look at the changes, and can fix my issue easily, as you suggested, by changing the path to the base flowplayer .swf files. It would also be easy to add the same usage pattern to the other .swf files located in the filter/rtmp directory except for the hard-coding of the directory name in lib/flowplayer/lib.php (line 55). I think it would be better to not assume the only .swf files used in the application are in that one directory.