16 Replies Latest reply on Apr 25, 2010 11:08 PM by greg•hamer

    No more MediaPlayerSprite?

    JesterXL Level 1

      Just updated trunk to 14520 and MediaPlayerSprite seems to have disappeared... now what do I use?

        • 1. Re: No more MediaPlayerSprite?
          JesterXL Level 1

          I just read the SVN comment to utilize MediaContainer... but he doesn't have a reference to MediaPlayer anymore... ???

          • 2. Re: No more MediaPlayerSprite?
            bringrags Level 4

            No, it doesn't contain MediaPlayer anymore.  The goal is to adhere to a more strict MVC separation (M = MediaElement, V = MediaContainer, C = MediaPlayer), rather than have a single class that wraps up everything.  So you'd need to create MediaPlayer yourself.  See http://opensource.adobe.com/svn/opensource/osmf/trunk/apps/samples/framework/HelloWorld/He lloWorld.as for an example of how to string these classes together.

            • 3. Re: No more MediaPlayerSprite?
              JesterXL Level 1

              User's don't care about MVC, they care about ease of use, me included.  They either can use the god awful NetStream implementation while longing for Silverlight's MediaPlayer ease of use, or use the simplisitic MediaPlayerSprite with a tincy bit of work setting up the Media properties it needs to get media.

               

              Adobe put a line in the sand with Flash Player 9, and Tinic's multiple blog posts + offline conversations confirmed it.  Adobe will no longer provide high-level media API's directly in the Flash Player.  Instead, they will provide low level access, and Adobe + 3rd party developers + the community can provide high level ActionScript libraries on top.

               

              Repeated cries from the community about video's explosive growth, and Adobe's inability to keep up with a nice API, as well as it's inability to differentiate between the progressive and streaming business model clearly shows itself in NetConnection/NetStream/NetGroup.  OSMF is clearly the remedy to the problem.

               

              I'm not going to lie; OSMF, even with docs, has a high learning curve compared to video players of the past.  4 lines of code to play video vs. the increase it requires now, as well as the swath of new code will put a bad taste in developers' mouths who had to swim through the mess that was the previous Flash FLVPlayer.  That said, in the past 3 weeks, she works.  I may not know every nook and cranny, but I can see why you made certain decisions, and that you all have clearly written video players before.  You're on the right track.

               

              Making things more MVC, however, is the wrong decision.  That is akin to "making things harder to ensure we have our ivory OOP tower all gleaming".  You're code is great, guys... what's wrong with supporting a simple class that DOES implement MVC to bring 'em all together so we can... you know... actually get **** done?  Are you SERIOUSLY going to point to that example when someone asks how to build an AS3 video player?

               

              I recognize you all are put in a tough position; abstract all the weirdness of progressive/httpstreaming/streaming, as well as supporting a unified API FOR ALL 3 in the SAME PLAYER.  You've clearly succeeded in my tests the past few weeks (Zeri non-withstanding).  ...however, making things harder for the community to adopt OSMF is always a bad choice.  To me, anything your team can do to make OSMF easier to use is in turn easier for people like me to evangelize it.

               

              ...otherwise, everyone and their mom will basically build their own wrapper like the one you pointed to. 99% of the use cases I encounter are "we have a URL, where's the source property", not "we have a love of design patterns, let's do this right".  I like your idealism, but it isn't helping here.  I urge your team to reconsider MediaPlayerSprite.  Pretty please!!!!

              • 4. Re: No more MediaPlayerSprite?
                RyanOConnell Level 2

                I appreciate the community support for the MPS, but we are actually going to design something better than the MPS, which includes much more functionality than the MPS had.   If you'll take a look at the API redesign we've implemented in the last sprint (final API lockdown BTW), you'll notice that the MPS doesn't gain much over using a MediaPLayer combined with a Mediacontainer.  The MPS historically was very useful before we fixed the layout APIs on MediaContainer to be more useful for the novice developer.  Now that it's a fairly short 1 or 2 line diference between having the MPS and not, we decided it would be too confusing to have duplicate UI classes.  

                 

                The said we are working on a top level application type component which will combine media player, media containers, and probably a media factory, and configuration parameter parsing as well.   We don't have a name for it, and are still in the process of designing it.   If this sounds like something you need please open a feature request, and have the community vote, we are listening.

                 

                -Ryan

                • 5. Re: No more MediaPlayerSprite?
                  JesterXL Level 1

                  1 class vs 3 to play video is always a good thing.  Those who know what they are doing can make the conscious decision to duplicate what you did their own way, and utilize the base classes for their own ends.

                   

                  A master blastah class sounds pimp; bring it.  Where does one open a feature request?

                  • 6. Re: No more MediaPlayerSprite?
                    bringrags Level 4

                    I definitely hear the concern, and this was one area where we expected some pushback, given the ease of use of the old class. We absolutely want to make that 4-line use case possible, we just felt that MediaPlayerSprite wasn't the best way to do so.  You make a good argument that perhaps we should provide the replacement that Ryan alludes to sooner than later.  Here's a prototype of one possible replacement:

                     

                    http://opensource.adobe.com/svn/opensource/osmf/trunk/apps/samples/plugins/ControlBarPlugi nSample/src/OSMFConfiguration.as

                    • 7. Re: No more MediaPlayerSprite?
                      RyanOConnell Level 2

                      Both bugs and feature requests can be opened here:

                      http://bugs.adobe.com/

                       

                      Click, flex, then create a new issue for Strobe. 

                      • 8. Re: No more MediaPlayerSprite?
                        JesterXL Level 1

                        Bleh, just extend Sprite instead of this View Composition insanity; NO ONE will use that crap if they know what they are doing.  If they don't know what they are doing, it's extra coding.

                         

                        The rest is a good start.

                        • 9. Re: No more MediaPlayerSprite?
                          Edwin van Rijkom Level 2

                          Hi Jesse,

                           

                          Thanks for all your feedback!

                           

                          In regards to being Sprite derived, wouldn't it be just as good if the configuration would expose the MediaContainer that it constructs internally as a property? The usage code would read something like this in that case:

                           

                          var config:OSMFConfiguration = new OSMFConfiguration();

                          ...

                          addChild(config.container);

                           

                          Not much of a difference with using addChild(config); that one would use if the config was Sprite derived, but still keeping things seperated for those who do like it that way?

                           

                          Cheers,

                          Edwin

                          • 10. Re: No more MediaPlayerSprite?
                            Bob Wohl

                            I'm with Jesse on this one. Most of my customer supported issues come

                            from people who aren't exactly Flash OOP gangsters and are using what

                            ever info they can find on the web to create their video players. All

                            of the code and documentation I've written, I have to keep in mind

                            that developers are not my target audience. The less I expose to them,

                            the less hand holding I have to do in the end. A four line "git er

                            dun" is exactly what this needs to help those people get started. It

                            shouldn't take some one a week to learn about how to make a video

                            player with a frame work before they start, it should take a few

                            minutes pointing to that frame work, copying self explanatory code and

                            adding their "source" to see it work. After that its all peaches. They

                            can poke and prod w/o spending an hour figuring out how to add a swc

                            to their project and looking for the timeline in flex. For those with

                            the OOP blackbelt, it's now a lot easier. Maybe a simple solution

                            would be to have a simple wrapper that exposes all methods but not

                            having to use them?

                             

                            my two cents

                            Bob

                            • 11. Re: No more MediaPlayerSprite?
                              smarcus99 Level 1

                              For what it's worth, we've delayed integrating sprint9, and will stay on sprint8 until sprint10 because of the issues raised in this thread, and the issue over at http://forums.adobe.com/thread/588302?tstart=0. (And the rework required as per http://forums.adobe.com/thread/588869?tstart=0).

                               

                              The latest changes do not in anyway make things easier for me as a framework user. One of the appeals of the Flex framework is that it allows a fairly direct expression of what you want to do in terms of the components it provides. If the osmf team feels the need to abstract/decompose and make various parts orthogonal... that's great... but I hope you can keep it under a facade that framework clients find easy and natural to use...

                               

                              thx

                              • 12. Re: No more MediaPlayerSprite?
                                jtomasino Level 1

                                First, in OSMFConfiguration.as, there's no need to call the getter on "container" here. Just add on the underscore.
                                
                                public function set view(value:DisplayObjectContainer):void
                                {
                                     if (_view)
                                     {
                                          _view.removeChild(_container);
                                     }
                                     _view = value;
                                     if (_view)
                                     {
                                          _view.addChild(container);
                                     }
                                }

                                 

                                 

                                Second, has anyone bothered to update the sample projects with these changes? The HelloWorld examples fail because of this change, and the updated HelloWorld tutorial in the PDF documentation similarly fails because of the use of LayoutUtils which also disappeared. Are there any working examples of a simple implementation of the framework?

                                • 13. Re: No more MediaPlayerSprite?
                                  bringrags Level 4

                                  All samples have been updated to use MediaContainer or MediaContainerUIComponent as a base, including all HelloWorld variations.  You're right that the docs are not up-to-date with the changes, but hopefully we can remedy that soon.

                                   

                                  What error are you seeing with HelloWorld?

                                  • 14. Re: No more MediaPlayerSprite?
                                    jtomasino Level 1

                                    Ahha, it looks like I was dealing with sprint cross-over issues. My docs were from Sprint 10 and my example files were from Sprint 9. HelloWorld's are working properly for me again. Whew, Thanks!

                                    • 15. Re: No more MediaPlayerSprite?
                                      bringrags Level 4

                                      For those just coming across this thread, I've posted a quick tutorial on switching over from MediaPlayerSprite to MediaContainer:

                                       

                                      http://opensource.adobe.com/wiki/display/osmf/Quick+Tip+-+MediaPlayerSprite+API+Change

                                      • 16. Re: No more MediaPlayerSprite?
                                        greg•hamer Level 1

                                        MediaPlayerSprite - We heard your feedback, and brought back a streamlined, improved version of this useful display class.  For those just getting started with OSMF, MediaPlayerSprite (as seen in our HelloWorld example) is the easiest-to-use introduction class.

                                         

                                        SOURCE: 

                                        April 21, 2010
                                        Blog Post:  OSMF FC1 released By Brian Riggs

                                        http://blogs.adobe.com/osmf/2010/04/osmf_fc1_released.html

                                         

                                        API Doc page:
                                        http://help.adobe.com/en_US/OSMF/1.0/AS3LR/org/osmf/media/MediaPlayerSprite.html