This interface provides several utility APIs required for developing web content elements.

log()

  • Description

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

  • Syntax

    function log(“message”);

  • Parameter

    message: string

  • Return value

    Type: void

  • Code example

    $wp.utility.log(“Hello World!”);

  • Others

    Import logs remotely. Refer to the following: ▶ Importing logs

getApiVersion()

  • Description

    View the version of W Player API Library supported by the Web Player on which web content is run.

  • Syntax

    function getApiVersion();

  • Parameter

    None

  • Return value

    Success: string (version), fail: Always successful

  • Code example

    $wp.utility.getApiVersion();

  • Others

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