Allow viewing Flash posts with the Ruffle emulator. Known issues: * Many flash files aren't fully supported. * In development it sometimes spazzes out and starts triggering random keyboard shortcuts when you press any key. This doesn't happen with the browser extension. * We have to put the .wasm file in the public/packs/js directory because Ruffle is hardcoded to search for it there. * If you're running Nginx, you need to make sure you're serving the right MIME type for .wasm files or it won't work. * We're using Some Random Guy's unofficial NPM package for Ruffle, since the Ruffle project doesn't publish an official package themselves. We should build our own package. References: * https://github.com/ruffle-rs/ruffle * https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-webassembly-mime-type * https://www.npmjs.com/package/ruffle-mirror
9 lines
431 B
Plaintext
9 lines
431 B
Plaintext
<%= content_tag(:object, :width => post.image_width, :height => post.image_height) do %>
|
|
<%= tag :params, :name => "movie", :value => post.tagged_file_url %>
|
|
<%= tag :embed, :src => post.tagged_file_url, :width => post.image_width, :height => post.image_height, :allowScriptAccess => "never" %>
|
|
<% end %>
|
|
|
|
<p><%= link_to "Save this flash (right click and save)", post.tagged_file_url %></p>
|
|
|
|
<%= javascript_pack_tag "flash" %>
|