How to use the @iiif/vocabulary.ExternalResourceType.MOVING_IMAGE function in @iiif/vocabulary

To help you get started, we’ve selected a few @iiif/vocabulary examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github UniversalViewer / universalviewer / src / Viewer.ts View on Github external
//     extension.name = Extension.VIRTEX;
            //     return extension;
            // }
        };

        this._extensionRegistry = {};

        this._extensionRegistry[ExternalResourceType.CANVAS] = {
            load: this._extensions[Extension.OSD]
        };

        this._extensionRegistry[ExternalResourceType.IMAGE] = {
            load: this._extensions[Extension.OSD]
        };

        this._extensionRegistry[ExternalResourceType.MOVING_IMAGE] = {
            load: this._extensions[Extension.MEDIAELEMENT]
        };

        this._extensionRegistry[ExternalResourceType.PHYSICAL_OBJECT] = {
            load: this._extensions[Extension.VIRTEX]
        };

        this._extensionRegistry[ExternalResourceType.SOUND] = {
            load: this._extensions[Extension.MEDIAELEMENT]
        };

        this._extensionRegistry[RenderingFormat.PDF] = {
            load: this._extensions[Extension.PDF]
        };

        // presentation 3
github UniversalViewer / universalviewer / src / extensions / uv-mediaelement-extension / Extension.ts View on Github external
const format: AnnotationBody = formats[i];
                const type: MediaType | null = format.getFormat();

                if (type) {
                    if (this.isVideoFormat(type.toString())) {
                        return true;
                    }
                }
            }

        } else {
            const type: ExternalResourceType | null = canvas.getType();

            if (type) {
                return type.toString() === ExternalResourceType.MOVING_IMAGE;
            }
            
        }

        throw(new Error("Unable to determine media type"));
    }
}