fixes #2257
fix #2237 for webm and flash