useMediaMetadataRetriever

Use a MediaMetadataRetriever and release it after the block is executed. Since MediaMetadataRetriever.close() was added in API 29, we need to use close() for lower SDKs.

Return

the result of the block

Parameters

block

- the block to execute on the MediaMetadataRetriever object

<T>

the return type of the block