5 Replies Latest reply on Dec 11, 2009 1:38 PM by Avi Kessner

    Multiple images (thumbnails) and the Mediaplayer

    jerryhamby

      I confused about how to approach the concept of OSMF's Mediaplayer

      working with something like a scrolling list of thumbnail images.

       

      I understand that you can have multiple instances of the Mediaplayer,

      but how do you work with the addEventListeners?

       

      Do you store the instances, inside an Array or ArrayCollection?

       

      I can't find any online docs or code that helps me understand this use case.

       

      I would appreciate any advice.

        • 1. Re: Multiple images (thumbnails) and the Mediaplayer
          bringrags Level 4

          Can you describe a bit more what you're trying to do and how it relates to MediaPlayer?  What can the user do with your list of thumbnail images?  Is that the only media you're trying to set up, or are these images representative of videos that can play when the user clicks on them?

          • 2. Re: Multiple images (thumbnails) and the Mediaplayer
            jerryhamby Level 1

            I may be asking for something OSMF was never intended to do and maybe I should not be thinking of building playlists using OSMF at all.

             

            I want to create some kind of Playlist that has a image  (scrolling list, cover flow, etc...).

             

            I was assuming that the image inside this playlist could be displayed using an MediaPlayer/ImageElement. This palylist does not need to use SerialElement or ParallelElements in this case, I think.

             

            While thinking through this I figured I could store an instance of the MediaPlayer in an Array, for each image. Then my thoughts turned to handling all the possible addEventListeners and it seemed like a nightmare. Now, I can do all this normally without MediaPlayers, I guess I'm just seeing how far OSMF can reach.

             

            To me playlists, in different forms, are companions to a MediaPlayer, right? Even video might need a visual image playlist.

             

            So I guess my question is, where is a good cut off point for using or not using OSMF for displaying images in an application?

            Has anyone built a visual playlist using OSMF to display an image?

            • 3. Re: Multiple images (thumbnails) and the Mediaplayer
              bringrags Level 4

              If the image is simply something to be displayed (as opposed to something that is to be interacted with), then MediaPlayer is probably too heavyweight.  In fact, I'm not sure you would need OSMF at all for this case -- couldn't you just display it in a Loader (or Flex Image control)?

               

              That said, we do want to eventually provide some type of explicit support for playlists, since that's a pretty common use case for media players.  I'd be interested to hear any ideas there.

              • 4. Re: Multiple images (thumbnails) and the Mediaplayer
                jerryhamby Level 1

                I agree this is overkill for just displaying images.

                 

                As for the playlist suggestions:

                 

                 

                I'm in the early stage of learning OSMF so this suggestion may be bogus or already doable in some other form.

                 

                Create a PlaylistElement, it would be like a lite version of ParallelElement.:

                1- You can place items into the list in a serial fashion, as you can now.

                2- All items can be visible at the same time, through one MediaPlayer instance.

                3- Lazy loading for the items that aren't visible

                4- Has click events

                5- Not sure how layout stuff would work.

                6- Bindable

                7- Don't know if it should be treated like a vector, only allowing ImageElements

                     or treated like a SerialElement with everyone welcome.

                8- Allow transitions and effects

                9- User defined Metadata to handle title, description, etc.

                .

                .

                etc...

                 

                 

                It would be good to hear any other suggestions from the members.

                • 5. Re: Multiple images (thumbnails) and the Mediaplayer
                  Avi Kessner Level 1

                  re 7:  You definitly need to allow anybody to join.  Playlists should be able to contain flvs, animated swfs, ads  just about anything.

                   

                  The playlist should be able to dispatch an event telling you which item you clicked on, and all relevant data about that item (such as what it represents),  and it should also be able to receive events saying that X item is now active, so find that item in the playlist and scroll to it, and highlight it as if the user clicked on it.  If the item does not exist in the playlist, just stay put.