Erwin
2011-Sep-27 06:41 UTC
Rails 3.1 assets path for video player Flash script ''player.swf''
I was using a Flash video player within a previous Rails version app Moving to Rails 3.1.0 , I dob''t know where I should put the script ... I tried to move it into an app asset sub-directory assets - jwplayer - - player.swf but this raises an error "NetworkError: 406 Not Acceptable - http://localhost:3000/assets/jwplayer/player.swf" player.swf the flash script is given as a parameter within an ''fw_player.js.erb'' partial : jwplayer(''containerLocker'').setup({ ''id'': ''containerLocker'', ''width'': ''480'', ''height'': ''270'',''logo.hide'' : ''false'', ''logo.position'' : ''top-right'', ''file'': "<%escape_javascript( first_valid_clip_url(@clips) ) -%>", ''type'' : ''video'', ''streching'' : ''uniform'' , ''smoothing'' : ''true'', ''controlbar.position'' : ''bottom'', ''controlbar.autohide'' : ''true'', ''image'' : ''/assets/splash_image.jpg'', ''modes'': [ {''type'' : ''html5''}, {''type'' : ''flash'', ''src'' : ''/assets/ jwplayer/player.swf''},{''type'' : ''download''}], ''logo.file'' : ''/assets/logos/myapp_outline.png'' }); thanks for you suggestions -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Erwin
2011-Sep-27 06:52 UTC
Re: Rails 3.1 assets path for video player Flash script ''player.swf''
SOLVED I tried to move the folder jwplayer into images , and used {''type'' : ''flash'', ''src'' : "<%escape_javascript( asset_path(''jwplayer/player.swf'')) -%>"} and it rocks ... I thought I could create it one level above .. but seems assets pipeline is using only /images /javascripts and / stylesheets On 27 sep, 08:41, Erwin <yves_duf...-ee4meeAH724@public.gmane.org> wrote:> I was using a Flash video player within a previous Rails version app > Moving to Rails 3.1.0 , I dob''t know where I should put the script ... > > I tried to move it into an app asset sub-directory > assets > - jwplayer > - - player.swf > but this raises an error > > "NetworkError: 406 Not Acceptable -http://localhost:3000/assets/jwplayer/player.swf" > player.swf > > the flash script is given as a parameter within an > ''fw_player.js.erb'' partial : > > jwplayer(''containerLocker'').setup({ > ''id'': ''containerLocker'', ''width'': ''480'', ''height'': ''270'',''logo.hide'' : > ''false'', > ''logo.position'' : ''top-right'', ''file'': "<%> escape_javascript( first_valid_clip_url(@clips) ) -%>", > ''type'' : ''video'', ''streching'' : ''uniform'' , ''smoothing'' : ''true'', > ''controlbar.position'' : ''bottom'', ''controlbar.autohide'' : ''true'', > ''image'' : ''/assets/splash_image.jpg'', > ''modes'': [ {''type'' : ''html5''}, {''type'' : ''flash'', ''src'' : ''/assets/ > jwplayer/player.swf''},{''type'' : ''download''}], > ''logo.file'' : ''/assets/logos/myapp_outline.png'' }); > > thanks for you suggestions-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.