示例#1
0
        /// <summary>
        /// Loads needed settings from their repository.
        /// </summary>
        private void LoadSettings()
        {
            //siteRoot = WebUtils.GetSiteRoot();
            //if (SiteUtils.IsSecureRequest())
            //{
            //    siteRoot = siteRoot.Replace("http:", "https:");
            //}
            //Load the player.
            thePlayer = MediaPlayer.GetForModule(ModuleId);
            if (thePlayer == null)
            {
                thePlayer            = new MediaPlayer();
                thePlayer.ModuleGuid = ModuleGuid;
                thePlayer.ModuleId   = ModuleId;
                thePlayer.PlayerType = MediaType.Video;
                if (IsEditable)
                {
                    SiteUser currentUser = SiteUtils.GetCurrentSiteUser();
                    if (currentUser != null)
                    {
                        thePlayer.UserGuid = currentUser.UserGuid;
                        MediaPlayer.Add(thePlayer);
                    }
                }
            }

            config = new VideoPlayerConfiguration(Settings);

            if (config.DisableShuffle)
            {
                ShuffleControl.Visible    = false;
                ShuffleOffControl.Visible = false;
            }

            if (config.InstanceCssClass.Length > 0)
            {
                pnlOuterWrap.SetOrAppendCss(config.InstanceCssClass);
            }
        }
示例#2
0
        /// <summary>
        /// Loads needed settings from their repository.
        /// </summary>
        private void LoadSettings()
        {
            //siteRoot = WebUtils.GetSiteRoot();
            //if (SiteUtils.IsSecureRequest())
            //{
            //    siteRoot = siteRoot.Replace("http:", "https:");
            //}
            //Load the player.
            thePlayer = MediaPlayer.GetForModule(ModuleId);
            if (thePlayer == null)
            {
                thePlayer = new MediaPlayer();
                thePlayer.ModuleGuid = ModuleGuid;
                thePlayer.ModuleId = ModuleId;
                thePlayer.PlayerType = MediaType.Video;
                if (IsEditable)
                {
                    SiteUser currentUser = SiteUtils.GetCurrentSiteUser();
                    if (currentUser != null)
                    {
                        thePlayer.UserGuid = currentUser.UserGuid;
                        MediaPlayer.Add(thePlayer);
                    }
                }
            }

            config = new VideoPlayerConfiguration(Settings);

            if (config.DisableShuffle)
            {
                ShuffleControl.Visible = false;
                ShuffleOffControl.Visible = false;
            }

            if (config.InstanceCssClass.Length > 0)
            {
                pnlOuterWrap.SetOrAppendCss(config.InstanceCssClass);
            }
        }