Ejemplo n.º 1
0
        protected override Type GetPlayerUIContributorType(IPlayer player, MediaWorkflowStateType stateType)
        {
            // First check if the player provides an own UI contributor.
            IUIContributorPlayer uicPlayer = player as IUIContributorPlayer;

            if (uicPlayer != null)
            {
                return(uicPlayer.UIContributorType);
            }

            // Return the more specific player types first
            if (player is IImagePlayer)
            {
                return(typeof(ImagePlayerUIContributor));
            }

            if (player is IDVDPlayer)
            {
                return(typeof(DVDVideoPlayerUIContributor));
            }

            if ((player is IVideoPlayer))
            {
                return(typeof(DefaultVideoPlayerUIContributor));
            }

            if ((player is IAudioPlayer))
            {
                return(typeof(DefaultAudioPlayerUIContributor));
            }

            return(null);
        }
Ejemplo n.º 2
0
        protected override Type GetPlayerUIContributorType(IPlayer player, MediaWorkflowStateType stateType)
        {
            if (!(player is IAudioPlayer))
            {
                return(null);
            }

            // First check if the player provides an own UI contributor.
            IUIContributorPlayer uicPlayer = player as IUIContributorPlayer;

            if (uicPlayer != null)
            {
                return(uicPlayer.UIContributorType);
            }

            // TODO: Specific UI contributor implementations for specific players
            return(typeof(DefaultAudioPlayerUIContributor));
        }