Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Currently, the SM2 path is configured manually with a Drupal variable variable_get('sm2_path', 'sites/all/libraries/soundmanager2')
. Implementing hook_library_info() would autodetect the library path and generally make the library setup more robust.
This is particularly useful when the location of the library is outside the sites/all/libraries path, such as an install profile path: profiles/profile_name/libraries.