[svn:osmf:] 11341: Added some unit tests to get the metadata package above 80%

Revision: 11341
Author:   [email protected]
Date:     2009-10-30 16:24:35 -0700 (Fri, 30 Oct 2009)
Log Message:
Added some unit tests to get the metadata package above 80%
Modified Paths:
    osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/metadata/TestTemporalFacet.as

The nature of the Media class is that it accesses it asynchronously. This means that when you create an instance of it, and then immediately query it, the data you want may not be available yet. This is all in the Javadoc, see the doc for Media:
The media information is obtained asynchronously and so not necessarily available immediately after instantiation of the class. All information should however be available if the instance has been associated with a MediaPlayer and that player has transitioned to MediaPlayer.Status.READY statusSo you could associate the Media with a MediaPlayer, and then wait until it goes to the Status READY, and then read the length of the Media.
As for your 2nd question, getMetadata() returns a Map. You can just loop through it:
  for(Map.Entry<String, Object> entry : media.getMetadata()) {
    // etc
  }However, the same restrictions apply as with Media -- you will probably need to wait before the information is available -- that's why the Listener approach works, because it will notify you as soon as the information is added to the map.

Similar Messages

  • [svn:osmf:] 13003: Update some unit tests to reflect that LayoutContextSprite now returns 0 ( not NaN) for uninitialized values to be consistent with ViewTrait.

    Revision: 13003
    Revision: 13003
    Author:   [email protected]
    Date:     2009-12-16 13:12:08 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Update some unit tests to reflect that LayoutContextSprite now returns 0 (not NaN) for uninitialized values to be consistent with ViewTrait.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/layout/TestLayoutContextSprite.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/proxies/TestListenerProxyElementAsSu bclass.as

    Revision: 13003
    Revision: 13003
    Author:   [email protected]
    Date:     2009-12-16 13:12:08 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Update some unit tests to reflect that LayoutContextSprite now returns 0 (not NaN) for uninitialized values to be consistent with ViewTrait.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/layout/TestLayoutContextSprite.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/proxies/TestListenerProxyElementAsSu bclass.as

  • [svn:osmf:] 14780: FMTA work + unit tests.

    Revision: 14780
    Revision: 14780
    Author:   [email protected]
    Date:     2010-03-16 09:55:23 -0700 (Tue, 16 Mar 2010)
    Log Message:
    FMTA work + unit tests.  Added NetNegotiator unit test support.  Fixed bug in constructor of Streaming URL resource. 
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetNegotiator.as
        osmf/trunk/framework/OSMF/org/osmf/net/StreamingURLResource.as
        osmf/trunk/framework/OSMFTest/org/osmf/OSMFTests.as
    Added Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/net/TestNetNegotiator.as

  • [svn:osmf:] 10703: Extending regions unit tests some more.

    Revision: 10703
    Author:   [email protected]
    Date:     2009-09-29 16:35:07 -0700 (Tue, 29 Sep 2009)
    Log Message:
    Extending regions unit tests some more.
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/gateways/TestRegionSprite .as

  • [svn:osmf:] 14907: Adding comments, removing test URL.

    Revision: 14907
    Revision: 14907
    Author:   [email protected]
    Date:     2010-03-22 05:50:23 -0700 (Mon, 22 Mar 2010)
    Log Message:
    Adding comments, removing test URL.
    Modified Paths:
        osmf/trunk/apps/samples/framework/OSMFPlayer/html-template/index.template.html
        osmf/trunk/apps/samples/framework/OSMFPlayer/src/OSMFPlayer.as

    Thanks for the architecture comments. I'm interested in this topic because ALARM brought me to arch (although I've replaced the raspberry pi with an Intel-based machine now).
    Well, I'm afraid of starting some kind of flame war by suggesting this officially as a lowly arch noob. I'll leave it up to the people who might profit by something like this (i.e. ALARM – or maybe they don't care and are fine with the current solution, in which case the change is not required at all). For the record, I like the glob solution. It's more flexible than just 'all' and it's easier to memorize the difference between 'any' and '*' compared to 'any' and 'all'.
    It turned out the "adding users" topic is not an issue, because I realized I can simply set "User=nobody / Group=audio" in the systemd unit file to get rid of root privileges while keeping the permission to play audio without logging in. I also set up a minimal Arch VM to test if gnome-icon-theme can be dropped. I found no problems without that package, so I think I'm now ready to upload the modified PKGBUILD (and related files) to the AUR.
    I'll flag this topic as solved. Feel free to add more comments though. Thanks everyone

  • [svn:osmf:] 15299: Fixing build: unit tests expect the seek to complete over a timer.

    Revision: 15299
    Revision: 15299
    Author:   [email protected]
    Date:     2010-04-09 03:04:45 -0700 (Fri, 09 Apr 2010)
    Log Message:
    Fixing build: unit tests expect the seek to complete over a timer. Adding this behavior on signaling the seek completion event from the newly added path.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/NetStreamSeekTrait.as

    In general theory, one now has the Edit button for their posts, until someone/anyone Replies to it. I've had Edit available for weeks, as opposed to the old forum's ~ 30 mins.
    That, however, is in theory. I've posted, and immediately seen something that needed editing, only to find NO Replies, yet the Edit button is no longer available, only seconds later. Still, in that same thread, I'd have the Edit button from older posts, to which there had also been no Replies even after several days/weeks. Found one that had to be over a month old, and Edit was still there.
    Do not know the why/how of this behavior. At first, I thought that maybe there WAS a Reply, that "ate" my Edit button, but had not Refreshed on my screen. Refresh still showed no Replies, just no Edit either. In those cases, I just Reply and mention the [Edit].
    Also, it seems that the buttons get very scrambled at times, and Refresh does not always clear that up. I end up clicking where I "think" the right button should be and hope for the best. Seems that when the buttons do bunch up they can appear at random around the page, often three atop one another, and maybe one way the heck out in left-field.
    While I'm on a role, it would be nice to be able to switch between Flattened and Threaded Views on the fly. Each has a use, and having to go to Options and then come back down to the thread is a very slow process. Jive is probably incapable of this, but I can dream.
    Hunt

  • [svn:osmf:] 10987: Refactor MediaPlayer unit tests to make them injectable by MediaElement.

    Revision: 10987
    Author:   [email protected]
    Date:     2009-10-13 20:54:31 -0700 (Tue, 13 Oct 2009)
    Log Message:
    Refactor MediaPlayer unit tests to make them injectable by MediaElement.  Add additional unit tests for injecting various MediaElements into a MediaPlayer.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/audio/SoundAdapter.as
        osmf/trunk/framework/MediaFramework/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/MediaFramework/org/osmf/net/dynamicstreaming/NetStreamSwitchableTrai t.as
        osmf/trunk/framework/MediaFramework/org/osmf/proxies/TemporalProxyElement.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SwitchableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/MediaFrameworkTests.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/audio/TestAudioElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/proxies/TestTemporalProxyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/utils/NetFactory.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/utils/TestConstants.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockDynamicNetStream.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockNetStream.as
    Added Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithAudioElemen t.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithAudioElemen tWithSoundLoader.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithBeaconEleme nt.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithDynamicStre amingVideoElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithProxyElemen t.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithTemporalPro xyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithVideoElemen t.as

    Revision: 10987
    Author:   [email protected]
    Date:     2009-10-13 20:54:31 -0700 (Tue, 13 Oct 2009)
    Log Message:
    Refactor MediaPlayer unit tests to make them injectable by MediaElement.  Add additional unit tests for injecting various MediaElements into a MediaPlayer.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/audio/SoundAdapter.as
        osmf/trunk/framework/MediaFramework/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/MediaFramework/org/osmf/net/dynamicstreaming/NetStreamSwitchableTrai t.as
        osmf/trunk/framework/MediaFramework/org/osmf/proxies/TemporalProxyElement.as
        osmf/trunk/framework/MediaFramework/org/osmf/traits/SwitchableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/MediaFrameworkTests.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/audio/TestAudioElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayer.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/proxies/TestTemporalProxyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/utils/NetFactory.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/utils/TestConstants.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockDynamicNetStream.as
        osmf/trunk/libs/adobe/NetMocker/org/osmf/netmocker/MockNetStream.as
    Added Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithAudioElemen t.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithAudioElemen tWithSoundLoader.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithBeaconEleme nt.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithDynamicStre amingVideoElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithProxyElemen t.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithTemporalPro xyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/media/TestMediaPlayerWithVideoElemen t.as

  • [svn:osmf:] 15010: Add f4f unit tests, more to come.

    Revision: 15010
    Revision: 15010
    Author:   [email protected]
    Date:     2010-03-24 17:05:36 -0700 (Wed, 24 Mar 2010)
    Log Message:
    Add f4f unit tests, more to come.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/f4f/AdobeSegmentRunTable.as
        osmf/trunk/framework/OSMFTest/org/osmf/net/httpstreaming/HTTPStreamingTestsHelper.as
        osmf/trunk/framework/OSMFTest/org/osmf/net/httpstreaming/f4f/TestAdobeBootstrapBox.as
        osmf/trunk/framework/OSMFTest/org/osmf/net/httpstreaming/f4f/TestAdobeSegmentRunTable.as
    Added Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/net/httpstreaming/f4f/TestAdobeSegmentRunTableInte gration.as

    Abuse reported.

  • [svn:osmf:] 10581: Integration VAST unit tests into mediaframework unit tests

    Revision: 10581
    Author:   [email protected]
    Date:     2009-09-24 17:09:59 -0700 (Thu, 24 Sep 2009)
    Log Message:
    Integration VAST unit tests into mediaframework unit tests
    Modified Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/.actionScriptProperties
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
    Added Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/VASTTestConstants.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/loader/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/loader/TestVASTLoade r.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestDefaultVAS TMediaFileResolver.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTImpres sionProxyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTMediaG enerator.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/media/TestVASTTracki ngProxyElement.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/parser/
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/vast/parser/TestVASTParse r.as

  • [svn:osmf:] 12421: Extending CompositeMetadata unit tests.

    Revision: 12421
    Revision: 12421
    Author:   [email protected]
    Date:     2009-12-03 01:28:37 -0800 (Thu, 03 Dec 2009)
    Log Message:
    Extending CompositeMetadata unit tests. Adding null checks to CompositeMetadata.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/metadata/CompositeMetadata.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/metadata/TestCompositeMetadata.as

  • [svn:osmf:] 17080: Add basic unit tests for MulticastNetLoader

    Revision: 17080
    Revision: 17080
    Author:   [email protected]
    Date:     2010-07-27 16:03:01 -0700 (Tue, 27 Jul 2010)
    Log Message:
    Add basic unit tests for MulticastNetLoader
    Modified Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/OSMFTests.as
    Added Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/net/multicast/
        osmf/trunk/framework/OSMFTest/org/osmf/net/multicast/TestMulticastNetLoader.as

  • [svn:osmf:] 10425: Add initial unit tests for VASTParser.

    Revision: 10425
    Author:   [email protected]
    Date:     2009-09-18 17:35:58 -0700 (Fri, 18 Sep 2009)
    Log Message:
    Add initial unit tests for VASTParser.  Minor changes to parsing code.
    Modified Paths:
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/model/VASTAd.as
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/model/VASTAdPackageBase.as
        osmf/trunk/libs/VAST/org/openvideoplayer/vast/parser/VASTParser.as
        osmf/trunk/libs/VASTTest/org/openvideoplayer/vast/VASTTests.as
    Added Paths:
        osmf/trunk/libs/VASTTest/org/openvideoplayer/vast/parser/
        osmf/trunk/libs/VASTTest/org/openvideoplayer/vast/parser/TestVASTParser.as

  • [svn:osmf:] 10137: Dynamic streaming unit tests now pass.

    Revision: 10137
    Author:   [email protected]
    Date:     2009-09-10 16:01:37 -0700 (Thu, 10 Sep 2009)
    Log Message:
    Dynamic streaming unit tests now pass.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/net/dynamicstreaming/NetStreamSwi tchableTrait.as
        osmf/trunk/framework/MediaFramework/org/openvideoplayer/traits/SwitchableTrait.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/MediaFrameworkTests.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/traits/TestISwitchable.as

    Hello!
    1) Given the string plugin is loaded from (file:///C:/alex/PlayerCDN/lib/PlugIN_junio.swf) application loads it from file system that "involves complex security" (our app can't load local files - we don't need it but nevertheless).
    You may want to try directing your Flex builder run configuration to use http://localhost/yourappwrapper.html as a "URL or path to launch" parameter.
    Try to set full path to plugin also (including host).
    2) As I can see, you don't have
    Security.allowDomain('*');
    in your plugin constructor.
    Although it is being loaded from the same host - do try to insert it
    Here is our plugins main file - everything works fine:
    package {
    import flash.display.Sprite;
    import flash.system.Security;
    import org.osmf.media.PluginInfo;
    import plugin.ControlBarPlugin;
    public class CBPlugin extends Sprite
      private var _pluginInfo:PluginInfo;
      public function CBPlugin()
       Security.allowDomain('*');
       _pluginInfo = (new ControlBarPlugin).pluginInfo;
      public function get pluginInfo():PluginInfo{
       return _pluginInfo;

  • [svn:osmf:] 14261: Updated DRM unit tests to work with code review feedback .

    Revision: 14261
    Revision: 14261
    Author:   [email protected]
    Date:     2010-02-18 14:15:23 -0800 (Thu, 18 Feb 2010)
    Log Message:
    Updated DRM unit tests to work with code review feedback.
    Modified Paths:
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestParallelElementWithDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/elements/TestSerialElementWithDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/traits/TestDRMTrait.as
        osmf/trunk/framework/OSMFTest/org/osmf/utils/DynamicDRMTrait.as

    Hello Alex,
    I don't have an answer for you.
    But, can you try to use http://drmtest2.adobe.com:8080/Content/anonymous.f4v with locally hosted OSMF player? This content doens't require user/pass info.
    I'm wondering that Google TV's flash player doesn't support prompt dialog.
    http://drmtest2.adobe.com/AccessPlayer/player.html requires flash player 11. That's why it won't be loaded with flash player 10.x.
    Thanks,
    -- Hiroshi

  • [svn:osmf:] 14678: Removal events unit tests.

    Revision: 14678
    Revision: 14678
    Author:   [email protected]
    Date:     2010-03-10 11:34:37 -0800 (Wed, 10 Mar 2010)
    Log Message:
    Removal events unit tests.  Fixed issue w/ autoSwitch.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/media/MediaPlayer.as
        osmf/trunk/framework/OSMFTest/org/osmf/media/TestMediaPlayer.as

Maybe you are looking for

  • Macbook Pro Off-Center on LCD TV

    I am wanting to use my Macbook Pro hooked to a Samsung 32" LCD TV as a secondary display. When I attempt to set the Samsung resolution to 1360x768 in Mac's display preference, the image is off-center with a black band down the left side of the tv. I

  • I need someone who has a lot of information on LTE in Rural America.. this is killing me.

    My first problem: I live in an area that Verizon Wireless does not service. It's in an extended 1X area. The local carrier/roaming partner here is Appalachian Wireless. Verizon signed the LTE in Rural America program with this local carrier. I bought

  • Do i need screeguard for ipad mini retina?

    i got new ipad mini retina and to protect its screen from dust do i need a screen guard or it doesn't need ? if yes please suggest which brand should i buy in Indian market. i am confused.

  • Can't access Portal Server

    Hi, After installation of JSE(Windows Version), I can access the identity admin console with url http://host:port/amconsole But I can't use the url http://host:port/portal or http://host:port/portal/dt to access Portal Server Desktop, the browser rec

  • How to find my windows office 2003 product key?

    Hi,you can try this one: URL Removed by a moderator