0

When using a custom built player, I included an option to stop receiving video using NetStream.receiveVideo(false). It helps if you're only interested in hearing the audio, you want to keep the player in a different tab, or you don't have enough bandwidth for both audio and video.

I'm looking to do the same thing with OSMF, bug I can't quite figure out how to get hold of the NetStream object.

Got any clues? Thanks.

evilpenguin
  • 5,448
  • 6
  • 41
  • 49

1 Answers1

0

OSMF essentially just plays video by using NetStream.appendBytes. The data (flv file) is being pulled over http. In case of NetStream.receiveVideo(false), when the video is being played back over rtmp, flash player simply informs FMS to not to send video frames. But there's no such things for data being pulled over http. Which is why OSMF doesn't expose it.

catholicon
  • 1,165
  • 2
  • 8
  • 15
  • 1
    Actually, OSMF has an option to use RTMP as well. And I was using RTMP, otherwise yes, it would not be applicable and you would be right. – evilpenguin May 24 '13 at 19:45
  • oh... i didn't know that... btw, that osmf plays http might still be the reason that this API isn't exposed... just to make underlying access transparent to API client.. – catholicon May 26 '13 at 05:29
  • Might be. The other reason might be because of excessive abstraction. One does not simply have access to the NetStream instance because it's generated by a factory and hidden under 10 other layers of classes that extend one another. I remember a team member actually solving this, I'll ask him and close the question when I get the time. Thanks for your input, though! – evilpenguin May 27 '13 at 08:37