---
title: "MediaSource | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Variable MediaSource

MediaSource: {  
    canConstructInDedicatedWorker: boolean;  
    prototype: [MediaSource](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaSource/);  
    isTypeSupported(type: string): boolean;  
    new (): [MediaSource](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaSource/);  
}

#### Type Declaration

-   -   new (): [MediaSource](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaSource/)
    -   #### Returns [MediaSource](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaSource/)
        
-   ##### `Readonly`canConstructInDedicatedWorker: boolean
    
    The **`canConstructInDedicatedWorker`** static property of the MediaSource interface returns true if MediaSource worker support is implemented, providing a low-latency feature detection mechanism.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/canConstructInDedicatedWorker_static)
    
-   ##### prototype: [MediaSource](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.MediaSource/)
    
-   ##### isTypeSupported: function
    
    -   isTypeSupported(type: string): boolean[](#istypesupported-1)
        
        The **`MediaSource.isTypeSupported()`** static method returns a boolean value which is true if the given MIME type and (optional) codec are likely to be supported by the current user agent.
        
        [MDN Reference](https://developer.mozilla.org/docs/Web/API/MediaSource/isTypeSupported_static)
        
        #### Parameters
        
        -   type: string
        
        #### Returns boolean
