Skip navigation
Currently Being Moderated

Unloading current media via JavaScript?

Apr 19, 2011 10:45 AM

Is it possible to unload a piece of media from StrobeMediaPlayback 1.5.1 from JavaScript? In ActionScript, I could do it with the media property and traits, etc, but JavaScript won't let me access the media property, even with "getMedia()". Any thoughts?

 

-Robert

 
Replies
  • Currently Being Moderated
    Apr 21, 2011 11:59 AM   in reply to ROBERT REINHARDT

    As a followup, I added an "unload" handler to the JavaScriptBridge class for SMP 1.5.1 that is mapped to this private method:

     

    private function unloadMedia():void {

         if(mediaPlayer.media){

              if(mediaPlayer.media.hasTrait(MediaTraitType.LOAD)){

                   var trait:LoadTrait = mediaPlayer.media.getTrait(MediaTraitType.LOAD) as LoadTrait;

                   trait.unload();

              }

         }

    }

     

    I thought this was working, but the connection on the server-side (FMS) seems to be active still with RTMP urls. Help!

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points