I'm unclear where to set the maxAllowedDynamicStreamIndex property when i first start a stream. I am implementing the use case of only using the highest quality stream on full screen playback and switching between a set of lower streams otherwise. If I set the maxAllowedDynamicStreamIndex to 1 or 2 based on going to fullscreen or not everything works fine but whenever I try to set it as playback begins I get this error:
Error: MediaPlayer - method called on null media or media that isn't dynamicstream
I've tried waiting to set it I get the MediaTraitType.PLAY event or the MediaPlayerState.PLAYING event but I still get the error.
Found it minutes after I asked:
MediaTraitType.DYNAMIC_STREAM is one of the trait types available from the MediaElementEvent.TRAIT_ADD event.