web: Break out all the Flash identifier strings into a separate module and make `plugin-polyfill.ts` only import that.

This commit is contained in:
David Wendt 2023-02-15 00:02:39 -05:00 committed by kmeisthax
parent 4e25a4fcae
commit 85f544a6cc
5 changed files with 15 additions and 9 deletions

View File

@ -0,0 +1,6 @@
export const FLASH_MIMETYPE = "application/x-shockwave-flash";
export const FUTURESPLASH_MIMETYPE = "application/futuresplash";
export const FLASH7_AND_8_MIMETYPE = "application/x-shockwave-flash2-preview";
export const FLASH_MOVIE_MIMETYPE = "application/vnd.adobe.flash.movie";
export const FLASH_ACTIVEX_CLASSID =
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";

View File

@ -8,6 +8,7 @@ export * from "./ruffle-embed";
export * from "./ruffle-imports";
export * from "./ruffle-object";
export * from "./ruffle-player";
export * from "./flash-identifiers";
export * from "./shadow-template";
export * from "./version";
export * from "./version-range";

View File

@ -3,7 +3,7 @@ import {
FUTURESPLASH_MIMETYPE,
FLASH7_AND_8_MIMETYPE,
FLASH_MOVIE_MIMETYPE,
} from "./ruffle-player";
} from "./flash-identifiers";
/**
* Replacement object for `MimeTypeArray` that lets us install new fake mime

View File

@ -1,5 +1,4 @@
import {
FLASH_ACTIVEX_CLASSID,
isBuiltInContextMenuVisible,
isFallbackElement,
isScriptAccessAllowed,
@ -9,6 +8,7 @@ import {
workaroundYoutubeMixedContent,
RufflePlayer,
} from "./ruffle-player";
import { FLASH_ACTIVEX_CLASSID } from "./flash-identifiers";
import { registerElement } from "./register-element";
import type { URLLoadOptions, WindowMode } from "./load-options";
import { RuffleEmbed } from "./ruffle-embed";

View File

@ -15,13 +15,12 @@ import type { MovieMetadata } from "./movie-metadata";
import type { InternalContextMenuItem } from "./context-menu";
import { swfFileName } from "./swf-file-name";
import { buildInfo } from "./build-info";
export const FLASH_MIMETYPE = "application/x-shockwave-flash";
export const FUTURESPLASH_MIMETYPE = "application/futuresplash";
export const FLASH7_AND_8_MIMETYPE = "application/x-shockwave-flash2-preview";
export const FLASH_MOVIE_MIMETYPE = "application/vnd.adobe.flash.movie";
export const FLASH_ACTIVEX_CLASSID =
"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000";
import {
FLASH_MIMETYPE,
FUTURESPLASH_MIMETYPE,
FLASH7_AND_8_MIMETYPE,
FLASH_MOVIE_MIMETYPE,
} from "./flash-identifiers";
const RUFFLE_ORIGIN = "https://ruffle.rs";
const DIMENSION_REGEX = /^\s*(\d+(\.\d+)?(%)?)/;