示例#1
0
 private VideoInputConfigBase RebuildInputSource_Lovense(string id, StreamerRebuildContext rebuildContext)
 {
     if (PluginContextSetup.IsLoaded())
     {
         return(new VideoInputConfigFull(new InputSetup(Type: PluginContext.PluginName, Input: "", ObjectInput: GetWebBrowserObjectInput(0, 0)))); // h, w set in ClientStreamer
     }
     else
     {
         return(GetFailedInputSource(id, rebuildContext, InputIssueDesc.PluginIsNotInstalled, $"Lovense plugin is not installed or failed to load"));
     }
 }
示例#2
0
        public LovensePage(SceneEditingModel model, ISceneItem editedItem)
        {
            _model      = model;
            _editedItem = editedItem;

            RefreshState();

            Refresh = () =>
            {
                PluginContextSetup.TryToLoad();
                if (editedItem == null && IsInstalled(_model))
                {
                    AddPlugin(model);
                }
                else
                {
                    RefreshState();
                }
            };

            Download = () => model.Environment.OpenUrl("https://streamster.io/how-to-install-the-lovense-streamster-toolset");

            HowToUseIt = () => model.Environment.OpenUrl("https://streamster.io/how-to-install-the-lovense-streamster-toolset");
        }
 public static void Shutdown()
 {
     PluginContextSetup.Unload();
     CefServer.Shutdown();
 }
        public static void Init()
        {
            PluginContextSetup.TryToLoad();

            ScreenCaptureManager.Instance.Init(new ExtensionLogger("sc: "), MainThreadExecutor);
        }
示例#5
0
 internal static bool IsLovenseVisible()
 {
     PluginContextSetup.TryToLoad();
     return(PluginContextSetup.IsLoaded() || PluginContextSetup.IsInstalledForOthers());
 }
示例#6
0
 public static bool IsInstalled(SceneEditingModel model)
 {
     return(model.SceneState.IsLocal ?
            PluginContextSetup.IsLoaded() :
            (model.SceneState.Device.PluginFlags & ((int)PluginFlags.Lovense)) > 0);
 }
        private void UpdatePluginModel()
        {
            bool lovense = PluginContextSetup.IsLoaded();

            _coreData.ThisDevice.PluginFlags = lovense ? (int)PluginFlags.Lovense : 0;
        }