Class MediaApi


  • public final class MediaApi
    extends Object
    Behaviour pertaining to the media items in the list.
    • Method Detail

      • add

        public boolean add​(String mrl,
                           String... options)
        Add a new item to the list for a media resource locator.

        The list must not be read-only.

        Parameters:
        mrl - media resource locator
        options - options to add to the media
        Returns:
        true if successful; false if error
      • add

        public boolean add​(CallbackMedia callbackMedia,
                           String... options)
        Add a new item to the list for native callback media.

        The list must not be read-only.

        Parameters:
        callbackMedia - callback media component
        options - options to add to the media
        Returns:
        true if successful; false if error
      • add

        public boolean add​(MediaRef mediaRef,
                           String... options)
        Add a new item to the list for a MediaRef.

        The list must not be read-only.

        Parameters:
        mediaRef - media reference
        options - options to add to the media
        Returns:
        true if successful; false if error
      • insert

        public boolean insert​(int index,
                              String mrl,
                              String... options)
        Insert an item into the list for a media resource locator.

        The list must not be read-only.

        Parameters:
        index - index at which to insert the item
        mrl - media resource locator
        options - options to add to the media
        Returns:
        true if successful; false if error
      • insert

        public boolean insert​(int index,
                              CallbackMedia callbackMedia,
                              String... options)
        Insert an item into the last for native callback media.

        The list must not be read-only.

        Parameters:
        index - index at which to insert the item
        callbackMedia - callback media component
        options - options to add to the media
        Returns:
        true if successful; false if error
      • insert

        public boolean insert​(int index,
                              MediaRef mediaRef,
                              String... options)
        Insert an item into the list for a MediaRef.

        The list must not be read-only.

        Parameters:
        index - index at which to insert the item
        mediaRef - media reference
        options - options to add to the media
        Returns:
        true if successful; false if error
      • remove

        public boolean remove​(int index)
        Remove an item from the list.
        Parameters:
        index - index of the item to remove
        Returns:
        true if successful; false if error
      • clear

        public boolean clear()
        Clear the entire list.
        Returns:
        true if successful; false if error
      • count

        public int count()
        Get the number of items currently in the list.
        Returns:
        item count
      • mrls

        public List<String> mrls()
        Get a list of media resource locators for the items in the list.
        Returns:
        media resource locators
      • mrl

        public String mrl​(int index)
        Get the media resource locator for a particular item in the list.
        Parameters:
        index - item index
        Returns:
        media resource locator
      • newMediaRef

        public MediaRef newMediaRef​(int index)
        Get a new MediaRef for an item in the list.

        The caller must release the returned MediaRef when it no longer has any use for it.

        Parameters:
        index - item index
        Returns:
        media reference
      • newMedia

        public Media newMedia​(int index)
        Get a new Media for an item in the list.

        The caller must release the returned Media when it no longer has any use for it.

        Parameters:
        index - item index
        Returns:
        media
      • isReadOnly

        public boolean isReadOnly()
        Is the list read-only?
        Returns:
        true if the list is read-only; false if it is not
      • newMediaList

        public MediaList newMediaList()
        Create a new MediaList from this list.

        The caller must release the returned MediaList when it no longer has any use for it.

        Returns:
        media list
      • newMediaListRef

        public MediaListRef newMediaListRef()
        Create a new MediaListRef from this list.

        The caller must release the returned MediaListRef when it no longer has any use for it.

        Returns:
        media list reference