This interface provides APIs required for obtaining information about the local environment in which web content elements are run.

getApiVersion()

  • Description

    Find the version of W Player API Library imported by web content.

  • Syntax

    function getApiVersion();

  • Parameter

    None

  • Return value

    Success: string (Version), fail: Always successful

  • Code example

    $wp.local.getApiVersion();

  • Others

    Version management is possible through use along with $wp.utility.getApiVersion();.

getRootDirectory()

  • Description

    Find the root directory to which web content was loaded.

  • Syntax

    function getRootDirectory();

  • Parameter

    None

  • Return value

    Success

    string (Root Directory), fail: Always successful

  • Code example

    $wp.local. getRootDirectory();

  • Others

    Assets added to web content are saved under the root directory obtained through getRootDirectory().