If you want to limit the switching to a certain index and above, for example, disable switching to 720 and higher streams if the player is playing embedded at 640x360, but enable all streams when the user goes to full screen mode. To do that, set the maxAllowedDynamicStreamIndex property on the MediaPlayer. It won't switch up past the index you specify.
If you want to enable/disable individual streams on the fly and setting the max index is not going to work for you, then I think you are going to need to write some custom code to do this. I haven't tried this and this is off the top of my head, but I would start with:
1) Extend RTMPDynamicStreamingNetLoader and override createNetStreamSwitchManager to return your custom switch manager.
2) Extend NetStreamSwitchManager and override canAutoSwitchNow to check a property you've set on your custom DynamicStreamingItem class (such as "enabled")
Another thought would be to create a custom switching rule for this. OSMF is designed to allow you to replace all the rules and/or add to them.
Thanks for the reply Charles. I'll give it a try and seem if it works. :-)
Hey Charles, what steps would I take to create a custom switching rule? and integrate it into the mediaPlayer?
Take a look at RTMPDynamicStreamingNetLoader. You'll need to create a custom class that extends that class and overrides createNetStreamSwitchManager to add your own rules.
Hope that points you in the right direction.