Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:19:06+00:00 2026-06-15T10:19:06+00:00

Maybe what I’m trying is not possible or has no sense but is a

  • 0

Maybe what I’m trying is not possible or has no sense but is a requirement.

The thing is easy.

I’ve used OSMF for writing a video player. All works fine if I create a MediaPlayerSprite and set it’s resource with URLResource. I can play any supported http or rtmp streaming video (flv, mp4, mpeg, etc…).

But now I need to use NetStream class for using some of its methods.

The times that I’ve used NetStream class were for streaming video with the flash Video object but now I want to use it with OSMF instead.

So my question is, is possible to use MediaPlayerSprite (and all of OSMF features) but also have the capability to use NetStream methods (like attachNetStream in particular) to control the video played in the MediaPlayerSprite object?

Yes that’s it…Use attachNetStream with MediaPlayerSprite for handling the video.

Why? I’m using a subclass of NetStream provided by the client that works with flash Video object and of course not with MediaPlayerSprite and if I use any of the client’s class methods, obviously I get a crash.

So how would you guys achieve that? Extending any class? Modifying OSMF build?

Thanks a lot in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:19:07+00:00Added an answer on June 15, 2026 at 10:19 am

    Finally got working.
    I post the anser in case anyone needs to do the same.

    I assuming you will use a MediaPlayer or MediaPlayerSprite for loading a video.
    So we create our video object in stage and then using VideoElement load data.

    var mps:MediaPlayerSprite = new MediaPlayerSrpite();
    var resource:URLResource = new URLResource("http://example.com");
    mps.media = new VideoElement(resource, new NetLoader());
    

    But for using your custom NetStream and NetConnection in the OSMF fwk you need to obviously override createNetStream method of NetLoader class and the create method of the NetConnectionFactoryBase.

    • NetConnectionFactoryBase will create the NetConnection object and pass it to createNetStream as a param.
    • NetLoader will create and return to player the NetStream object.

    Then you could use any MediaPlayer event or method to control the playback like

    mps.mediaPlayer.play();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Maybe it has been asked somewhere, but I am trying to find my question
Maybe my title is not the best but here is what I really want.I
maybe this is an old question but i'm trying as a personal experiment to
Maybe I am being stupid, but this isn't making sense to me... I have
Maybe not really big, but a hundred frames or something. Is the only way
Maybe there is a package to do this, but I have not been able
Maybe that's only possible with SQLITE but is there also a trick to let
Maybe this is a very simple question, but I just can not figure out.
Maybe I am just blind, but I do not see how to use Guice
Maybe I'm not using the right key words, but all my searches are coming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.