Feature #5171
closed[Flash player] Being able to embed swf files
0%
Description
The request is:
being able to embed swf files(to wiki pages, issues, etc.)
like it is now for images.
Files
Related issues
Updated by Andrew Chaika over 14 years ago
I use this simple plugin for embedding flash player into wiki/issues/blog
Usage:
{{video(<name of attachement>)}}
Updated by Nikolay Kotlyarov over 14 years ago
Andrew Chaika wrote:
I use this simple plugin for embedding flash player into wiki/issues/blog
Usage:
{{video(<name of attachement>)}}
Wow, thanks a lot!:)
It definitely should reside at least on plugins page!
Would like to have this macro in 1.0, as far as it's rather lightweight.
Updated by Nikolay Kotlyarov over 14 years ago
Andrew Chaika wrote:
I use this simple plugin for embedding flash player into wiki/issues/blog
Usage:
{{video(<name of attachement>)}}
The macro returns error
Error executing the video macro (undefined method `attachments' for #)
Redmine version: 0.9.3.
Don't know how to make it work:(
Updated by Andrew Chaika over 14 years ago
I'm using it on Redmine 0.9.3.devel.3525 (MySQL) now and on 0.8.x.devel in the past without such problem.
I'll check it on 0.9.3 version.
Updated by Andrew Chaika over 14 years ago
PS Sorry, the purpose of this plugin is to embedding flash video with player into redmine wiki, but it can be changed or modified (added new macro) to embed swf files
Updated by mythos mint over 14 years ago
I tried this plugin in these redmine versions and got the same error:
Error executing the video macro (undefined method `attachments' for #)
Here is the code I used:
{{video(vid.swf)}}
Redmine 0.8.7.stable (MySQL)
Redmine 0.9.3.stable (MySQL)
Updated by Patrick Fratczak over 14 years ago
Hello,
I have made a modification to be allowed to specify the size of the embedded video player.
And also to have your plugin registered to the plugin list ...
Redmine::Plugin.register :redmine_embedded_video do name 'Redmine Embedded Video' author 'Nikolay Kotlyarov' description 'This is a plugin for embedding flv video' version '0.0.1' end Redmine::WikiFormatting::Macros.register do desc "Wiki video embedding" macro :video do |o, args| @width = args[1] if args[1] @height = args[2] if args[2] @width ||= 400 @height ||= 300 @num ||= 0 @num = @num + 1 attachment = o.attachments.find_by_filename(args[0]) if attachment video_file = url_for (:controller => 'attachments', :action => 'download', :id => attachment, :filename => attachment.filename) file_url = "#{Setting.protocol}://#{Setting.host_name.split('/').first}#{video_file}" else file_url = args[0].gsub(/<[^\>]+>/,'') end <<END <p id='video_#{@num}'>PLAYER</p> <script type='text/javascript' src='#{Setting.protocol}://#{Setting.host_name}/plugin_assets/redmine_embedded_video/swfobject.js'></script> <script type='text/javascript'> var s1 = new SWFObject('#{Setting.protocol}://#{Setting.host_name}/plugin_assets/redmine_embedded_video/player.swf','player','#{@width}','#{@height}','9'); s1.addParam('allowfullscreen','true'); s1.addParam('allowscriptaccess','always'); s1.addParam('flashvars','file=#{file_url}'); s1.write('video_#{@num}'); </script> END end end
Updated by Patrick Fratczak over 14 years ago
Patrick Fratczak wrote:
Hello,
I have made a modification to be allowed to specify the size of the embedded video player.
And also to have your plugin registered to the plugin list ...[...]
You just now have to specify the size
video(my_video.flv,640,480) for example
Updated by Paul Adarr over 14 years ago
Does this plugin work?
I added it to the plugins folder .. do i need to restart redmine service or the server itself?
It do't get a button like the add image or link button.
Updated by mythos mint over 14 years ago
Worked for me. The plugin wasn't registering because it was missing this line at the very top
require 'redmine'
Updated by Paul Adarr over 14 years ago
What folder do I put the "Init.rb" and the "Assets" folder in.
Currently I have them C:\Program Files\BitNami Redmine Stack\apps\redmine\lib\plugins
Is this the correct folder?
If this is working correctly will it automatically show up in the Admin pages under Plugins?
or are there additional steps that i'm not finding?
Updated by Nikolay Kotlyarov over 14 years ago
Paul Adarr wrote:
Currently I have them C:\Program Files\BitNami Redmine Stack\apps\redmine\lib\plugins
Is this the correct folder?
http://www.redmine.org/wiki/redmine/Plugins
use /vendor/plugins instead of \lib\plugins
Updated by mythos mint over 14 years ago
Just FYI: This plugin only worked for me on Version 1 or above.
On redmine 0.9.6 I still get the error:
Error executing the video macro (undefined method `attachments' for #)
Updated by Paul Adarr over 14 years ago
OK i had it working but ended up needing to reinstall Redmine to fix another issue.
I'm using ver. 1.0.0 of redmine and 0.8.7 Ruby stack
I can't remember what folder i'm supposed to "cd" to for running the command
rake db:migrate_plugins RAILS_ENV=production
I thought it was the ../vendor/plugins
I tried that and ../vendor/plugins/embedded_video_player
Updated by mythos mint over 14 years ago
In the redmine folder. See the upgrade instructions @ RedmineUpgrade
Updated by Anonymous over 13 years ago
Hello. I have a problem with using this plugin.
I get the error in log. Can you help me, where is mistake?
Processing ApplicationController#index (for 10.8.0.117 at 2011-04-08 11:48:23) [GET] ActionController::RoutingError (No route matches "/plugin_assets/redmine_embedded_video/swfobject.js" with {:method=>:get}): /usr/lib/ruby/1.8/action_controller/routing/recognition_optimisation.rb:66:in `recognize_path' /usr/lib/ruby/1.8/action_controller/routing/route_set.rb:441:in `recognize' /usr/lib/ruby/1.8/action_controller/routing/route_set.rb:436:in `call' /usr/lib/ruby/1.8/action_controller/dispatcher.rb:87:in `dispatch' /usr/lib/ruby/1.8/action_controller/dispatcher.rb:121:in `_call' /usr/lib/ruby/1.8/action_controller/dispatcher.rb:130:in `build_middleware_stack' /usr/lib/ruby/1.8/active_record/query_cache.rb:29:in `call' /usr/lib/ruby/1.8/active_record/query_cache.rb:29:in `call' /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' /usr/lib/ruby/1.8/active_record/query_cache.rb:9:in `cache' /usr/lib/ruby/1.8/active_record/query_cache.rb:28:in `call' /usr/lib/ruby/1.8/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' /usr/lib/ruby/1.8/action_controller/string_coercion.rb:25:in `call' /usr/lib/ruby/1.8/rack/head.rb:9:in `call' /usr/lib/ruby/1.8/rack/methodoverride.rb:24:in `call' /usr/lib/ruby/1.8/action_controller/params_parser.rb:15:in `call' /usr/lib/ruby/1.8/action_controller/session/cookie_store.rb:93:in `call' /usr/lib/ruby/1.8/action_controller/failsafe.rb:26:in `call' /usr/lib/ruby/1.8/rack/lock.rb:11:in `call' /usr/lib/ruby/1.8/rack/lock.rb:11:in `synchronize' /usr/lib/ruby/1.8/rack/lock.rb:11:in `call' /usr/lib/ruby/1.8/action_controller/dispatcher.rb:106:in `call' /usr/lib/ruby/1.8/rack/content_length.rb:13:in `call' /usr/lib/ruby/1.8/rack/handler/fastcgi.rb:57:in `serve' public/dispatch.fcgi:24 Rendering /usr/share/redmine/public/404.html (404 Not Found)
Updated by Jun Gao over 12 years ago
anyone managed to make it work on redmine 1.3.0? I extract it under vendor\plugins, and I got this error
Error executing the video macro (undefined method `attachments' for nil:NilClass)
Updated by Daniel Morgan over 12 years ago
Attaching a copy of the plugin I have working under 1.3.x.
Make sure you run rake db:migrate_plugins RAILS_ENV=production
.
Updated by Jun Gao over 12 years ago
Hi Daniel, thanks, mine's working now. really appreciate.
Daniel Morgan wrote:
Attaching a copy of the plugin I have working under 1.3.x.
Make sure you runrake db:migrate_plugins RAILS_ENV=production
.
Updated by Claire Quillien over 12 years ago
Hello,
I installed the plugin. This installation seems to work (a screen appears in my wiki page), but the video never loads (I have the round shape still turning).
Do you have any idea what this could come from?
Updated by Chris L over 12 years ago
Having some issues as well. I am on 1.3.3. I installed the pluging. Go to my wiki page, add
Cert renewal
{{video(History.flv)}}
then attach my file but all i get is ....
__________________________________________________________
Cert renewal
PLAYER
History.flv (4.9 MB) Admin, 05/09/2012 09:47 am
New file
_________________________________________________
Updated by Chris L over 12 years ago
OK so now I am getting
Error executing the video macro (undefined method `attachments' for nil:NilClass)
How do you upload the video file?
Updated by Chris Lockwood over 12 years ago
Curiously I'm having the same issue in Redmine 1.2.1
Error executing the video macro (undefined method `attachments' for nil:NilClass)
Updated by Chris Lockwood over 12 years ago
Chris Lockwood wrote:
Curiously I'm having the same issue in Redmine 1.2.1
Error executing the video macro (undefined method `attachments' for nil:NilClass)
Admittedly I was failing an intelligence test here by assuming everything would work fine after hitting Preview (i.e. before the upload of my SWF attachement).
That said I am experiencing another frustrating stumbling block, after going through all the motions and then reviewing my newly create Issue I'm finding that JWPlayer does't display any content ...it just sits there, with one of those circular loading content type symbols centred on a black background!
Meanwhile my production.log file looks pretty good:
Processing AttachmentsController#download (for 192.168.16.27 at 2012-07-11 11:43:00) [GET] Parameters: {"action"=>"download", "id"=>"183", "filename"=>"CreateProject.swf", "controller"=>"attachments"} Completed in 10ms (View: 1, DB: 1) | 200 OK [http://MaskedURL.co.uk/attachments/download/183/CreateProject.swf]
Has anyone come across (or have a workaround for) this particular scenario?
UPDATE: code-behind excerpt from issue view:
<div class="wiki">
<p><p id='video_1'>PLAYER</p>
<script type='text/javascript' src='http://MaskedURL.co.uk/plugin_assets/redmine_embedded_video/swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('http://MaskedURL.co.uk/plugin_assets/redmine_embedded_video/player.swf','player',' 640',' 480','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=http://MaskedURL.co.uk/attachments/download/183/CreateProject.swf');
s1.write('video_1');
</script>
</p>
</div>
Updated by Claire Quillien over 12 years ago
I'm experiencing the same. Havn't found any solution yet...
Updated by PhobosK (Dev) over 12 years ago
- File redmine_embedded_video-0.0.2.tar.bz2 redmine_embedded_video-0.0.2.tar.bz2 added
- Assignee deleted (
Jean-Philippe Lang)
Hi all,
This is a lovely plugin. Thanks all.
Will be good to be in official redmine installation...
Anyway I took the liberty to modify it a bit and update it to latest SWFObject 2 and latest JW Player 5.10
This way it now supports even Youtube urls.
Changelog is:
- SWFObject updated to v2
- JW Player updated to 5.10
- Some extra cleanup on all the arguments
- Fixed the error of "undefined method `attachments' ..." when using the video macro without an actual attachment existing
Probably it will be a good idea all this to be moved to the redmine plugins here, but i will leave that to the original author of the plugin...
Besides it will require some changes in the assets folder anyway..
For those of you that have problems running the plugin, please make sure you have a writable for Redmine folder: /usr/share/redmine/public/plugin_assets . In this folder there should be a subfolder named redmine_embedded_video that has everything from the PLUGIN_FOLDER/assets... If you do not have it, you may just symlink the plugin's assets folder to /usr/share/redmine/public/plugin_assets/redmine_embedded_video
Thanks.
The proposed new version has been tested and working on debian squeeze (Redmine 1.0.1), but should work on all redmine versions
Updated by Fabien Crespel almost 12 years ago
The original issue was about embedding .swf files in wiki, issues, etc. Since I had the same requirement, I just published a redmine_embedded_flash plugin loosely inspired by the video plugin posted here.
Note that this plugin is not for videos, which are usually .flv or .mp4 files and not .swf files. My particular use case was for embedding Wink tutorials exported in .swf format.
Updated by Jan Pilz almost 12 years ago
Made it work with Redmine 2.1.4, and updated JWPlayer also to version 6, now supports MP4, FLV, WEBM, should also work with mobile versions and html5.
Updated by Terence Mill almost 12 years ago
in `require': /home/redmine/plugins/redmine_embedded_video/init.rb:25: syntax error, unexpected tASSOC, expecting ')' (SyntaxError) ...ile_url = url_for (:only_path=>false,:controller =>'attachme... ... ^ /home/redmine/plugins/redmine_embedded_video/init.rb:25: Can't assign to false ...l = url_for (:only_path=>false,:controller =>'attachments',:... ... ^ /home/redmine/plugins/redmine_embedded_video/init.rb:25: syntax error, unexpected tASSOC, expecting tCOLON2 or '[' or '.' ...only_path=>false,:controller =>'attachments',:action =>'down... ... ^ /home/redmine/plugins/redmine_embedded_video/init.rb:25: syntax error, unexpected ',', expecting keyword_end
Would be great if you create a github.com plugin repo and maintain this.
Updated by Jan Pilz almost 12 years ago
Updated by Jan Pilz almost 12 years ago
Which version you use? init.rb line 25 was not touched by me.
Updated by Terence Mill almost 12 years ago
Jan Pilz wrote:
Which version you use? init.rb line 25 was not touched by me.
Now i tested http://www.redmine.org/attachments/download/9145/redmine_embedded_video-0.0.3.tar.bz2 you just uploaded again?
Im am using redmine 2.2.3.
Error still there!
Updated by Jan Pilz over 11 years ago
Okay, i assume you are using ruby >= 1.9, there is a space between "...url_for (:only_path=>false...", ruby 1.8.7 only throw warning, ruby 1.9 throw error.
I made a fixed version.
I tested redmine 2.1.4 and 2.2.3, with ruby 1.8.7 and ruby 1.9.3.
- copy redmine_embedded_video-0.0.3.1.tar.bz2 to plugins directory
- tar xjf redmine_embedded_video-0.0.3.1.tar.bz2
- rake redmine:plugins:migrate RAILS_ENV=production
- restart redmine
syntax: {{video(<ATTACHEMENT>|<URL>|<YOUTUBE_URL>[,<width>,<height>])}}
feel free to create github repository and register it for redmine plugins :)
Updated by Terence Mill over 11 years ago
feel free to create github repository and register it for redmine plugins :)
Done.
Updated by Christine Anderssen over 11 years ago
I have just installed the plugin from Github and it works when I try and play external videos such as Youtube videos, however, it does not want to play an attached SWF file
When I view the source, I can see the URL to the attached SWF file is correct, but I still get the message
Error loading player:
No playable sources found
I have tried to play the SWF file in a standalone SWF player and it does play. The attachements folder is writeable.
Redmine and Ruby versions:
Redmine version - 2.3.1.stable
Ruby version - 1.9.3 (i386-mingw32)
Rails version - 3.2.13
Updated by em tv over 11 years ago
hi,
plugin version 0.0.3.1 works fine with youtube video here (Redmine 2.3.2.stable,Ruby 1.9.3-p448 [i686-linux], Rails 3.2.13) but not with vimeo urls.
would it be possible to add this feature please ?
thanks a lot, great work anyway !
Updated by Christine Anderssen over 11 years ago
Christine Anderssen wrote:
I have just installed the plugin from Github and it works when I try and play external videos such as Youtube videos, however, it does not want to play an attached SWF file
When I view the source, I can see the URL to the attached SWF file is correct, but I still get the message
Error loading player:
No playable sources foundI have tried to play the SWF file in a standalone SWF player and it does play. The attachements folder is writeable.
Redmine and Ruby versions:
Redmine version - 2.3.1.stable
Ruby version - 1.9.3 (i386-mingw32)
Rails version - 3.2.13
No-one else has this problem?
Updated by Richard Rauch about 11 years ago
Hi all,
I installed the plugin on current redmine version too and encountered the same problem with SWF files :-(
The plugin is playing external youtube videos and internal .mp4 videos well.
In my opinion the plugin works well only, when JWPlayer is invoked, not the SWF player.
BUT...whith JWPlayer I am afraid of another problem. The Logo/Link to JWPlayer website is displayed in each video window. if you follow this window, you will find a legale notice, that the free version is only for "non commercial sites" !
So it seems, that everyone, who uses this plugin, is walking into a legal trap? Has anyone another opinion?
Who is able to clarify this license issue?
Updated by Andriy Lesyuk over 10 years ago
Video embedding can be implemented with custom macros using WikiNG plugin (no Ruby development needed) - see this page.
Updated by Go MAEDA over 6 years ago
- Status changed from New to Closed
- Resolution set to Wont fix
Adobe will stop updating and distributing the Flash Player at the end of 2020. This feature is no longer needed. I am closing this issue.
https://theblog.adobe.com/adobe-flash-update/
Given this progress, and in collaboration with several of our technology partners – including Apple, Facebook, Google, Microsoft and Mozilla – Adobe is planning to end-of-life Flash. Specifically, we will stop updating and distributing the Flash Player at the end of 2020 and encourage content creators to migrate any existing Flash content to these new open formats.