16

I used to be able to drag .swf files into Chromium, and they would play just fine.

Recently, that stopped working. Doesn't work in Chromium or Iceweasel. Both browsers instead prompt to download the .swf file. Both have Flash Player enabled, and the .swf MIME-type listed on their plugins pages. I tried drag-and-drop and Ctrl+O, neither work. Is there something I can change to get the browsers to recognize the MIME-type?

Using Chromium 32 and Iceweasel 24 on Debian Jessie.

4 Answers 4

23

These two links might help:

Apparently, the problem is with the MIME type used by the browser to open the files. The workaround to resolve this is to edit the /usr/share/mime/packages/freedesktop.org.xml file from:

<mime-type type="application/vnd.adobe.flash.movie">

to:

<mime-type type="application/x-shockwave-flash">

and then run:

sudo update-mime-database /usr/share/mime

Some users needed to reinstall the flash player and/or restart their browser as well.

9
  • 1
    Wow, that worked! Thanks! I'm glad I happened to wander back on to Super User and find this.
    – soren121
    Aug 2, 2014 at 3:04
  • 1
    Worked for Ubuntu 14.04 with google-chrome 40.0 - thanks!
    – Jeff Ward
    Mar 4, 2015 at 15:34
  • 1
    Worked with Ubuntu 14.04, and fixed both chrome 46.02.2490.86, and Firefox 42.0 Dec 1, 2015 at 16:24
  • 2
    No need to restart Google Chrome afterwards.
    – pts
    Jan 25, 2016 at 9:35
  • 2
    Heh glad to see my fix from the arch forums is helping people this much, sad to see this hasn't been actually fixed over at chromium yet (I created a bug report almost 2 bloody years ago! and this is NOT hard to fix...) bugs.chromium.org/p/chromium/issues/detail?id=369015
    – Cestarian
    Feb 21, 2016 at 1:11
1

The mime fix used to work for me -- but on a fresh install of Ubuntu 16.04.1 and Chrome 60, it didn't work anymore. So after I tried that and did more googling, I found a note about Chrome's new "Flash sunset" / ask before running settings. In short, go to:

chrome://settings/content/flash?search=flash

And ensure that:

  • "Allow sites to run flash" is on
  • "Ask first" is off

If you're accessing localhost or 127.0.0.1, you might also enter those in the Allow sites list.

Worked for me -- good luck!

0

Ok, it's 2019, and I'm using Ubuntu 18.04.2 and Chrome 73+, aaaand the other fixes are not working. :(

So, another possible workaround is to create a simple .html file that loads your .swf file.

For example, if I have test.swf in a directory, and I create test.html in the same directory, containing:

<!DOCTYPE>
<html>
  <body style="width:100%;height:100%">
    <object width="100%" height="100%" data="./test.swf"></object>
  </body>
</html>

Then load the .html file in Chrome, and it asks if I want to play the file (see screenshot), and then it plays the swf:

Chrome Flash Allow Dialog

0

use the HTML object tag to serve the file. Create a html website with this code and call it wrapper.html:

<!DOCTYPE html>
<html>
<head>
    <title></title>
</head>
<body>
<object type="application/x-shockwave-flash" data="flashfile.swf" width="900" height="800"></object>

</body>
</html>

Then put the file in the same folder as the html website. Now serve the folder on localhost (for example with chrome server). Then browse to http://localhost:8887/wrapper.html with Chrome browser. Chrome browser will play the swf if you allow flash in Chrome.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .