Interface MediaItemConverter

  • All Known Implementing Classes:
    DefaultMediaItemConverter

    @Deprecated
    public interface MediaItemConverter
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Converts between MediaItem and the Cast SDK's MediaQueueItem.
    • Method Detail

      • toMediaQueueItem

        com.google.android.gms.cast.MediaQueueItem toMediaQueueItem​(MediaItem mediaItem)
        Deprecated.
        Converts a MediaItem to a MediaQueueItem.
        Parameters:
        mediaItem - The MediaItem.
        Returns:
        An equivalent MediaQueueItem.
      • toMediaItem

        MediaItem toMediaItem​(com.google.android.gms.cast.MediaQueueItem mediaQueueItem)
        Deprecated.
        Converts a MediaQueueItem to a MediaItem.
        Parameters:
        mediaQueueItem - The MediaQueueItem.
        Returns:
        The equivalent MediaItem.