getMusicDurationInMS abstract method

int getMusicDurationInMS(
  1. String path
)

Getting the Total Length (ms) of Background Music

This API is used to retrieve the total length of a background music file.

  • Parameters:
    • path(String):
      • Path of the music file.

Return Description: The length of the specified music file is returned in milliseconds. -1 indicates failure to get the length.

Implementation

int getMusicDurationInMS(String path);