Author Topic: Youtube Player Plugin  (Read 555 times)

MrAlicard

  • Newbie
  • *
  • Posts: 11
Youtube Player Plugin
« on: March 15, 2014, 09:17:12 AM »
Hello
This is a youtube video player. Recognize the youtube links and play in a separate window.

In order to function work, must be changed to the following:

From:
Code: [Select]
foreach (Plugin p in  FormMain.Instance.LoadedPlugins)
                            {
                                IceChatPlugin ipc = p as IceChatPlugin;
                                if (ipc != null)
                                {
                                    if (ipc.plugin.Enabled == true)
                                        ipc.plugin.LinkClicked(args);
                                }
                            }

To:
Code: [Select]
  bool linkfound = false;
                            foreach (Plugin p in  FormMain.Instance.LoadedPlugins)
                            {
                                IceChatPlugin ipc = p as IceChatPlugin;
                                if (ipc != null)
                                {
                                    if (ipc.plugin.Enabled == true)
                                    {
                                        ipc.plugin.LinkClicked(args);
                                        linkfound = true;
                                    }
                                    else
                                    {
                                        System.Diagnostics.Process.Start(clickedWord);
                                       linkfound = true;
                                    }
                                }
                            }
                            if (!linkfound)
                            {
                                System.Diagnostics.Process.Start(clickedWord);
                            }


And this must delete(line: 247):
Code: [Select]
System.Diagnostics.Process.Start(clickedWord);
Note:
Adblock must be turned off in the browser, otherwise you will not appear in the results.

Download: https://mega.co.nz/#!DoZgiSJD!TLrfHPLENOWCfDIhRnS4j_WATwPKv55m1LKlrcb1pxQ

(If you have an idea what kind of plugins are supposed to do, you can write a private message. If you find a bug in the plugin can write here. :D The plug-in contains adf.ly link. With this can you help of my pugin development. Banner type of link have.)

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1803
    • IceChat IRC Client
Re: Youtube Player Plugin
« Reply #1 on: March 15, 2014, 10:53:16 AM »
Well, it won't quite work like that, but I know what needs to be done.
You have to always return linkfound = true, where the plugin should return whether it is true or not, and cancel the Process.Start accordingly.

If you can supply the source code to the plugin, I am curious as to what it does.

The IceChat God

MrAlicard

  • Newbie
  • *
  • Posts: 11
Re: Youtube Player Plugin
« Reply #2 on: March 15, 2014, 11:44:05 AM »
Tested by three people and was told that it works. :)
This method does not open the link on two occasions.
When the links to the youtube link will open the custom window. If the link is normal link will open in the browser.
In this case, plus have 2 dll, because flash is installed in the specific window.
Now, I do not know that two plus dll, put in the client root directory or  plugin folder because I have a flash player installed on my computer.  The two dll is only required if you do not have a flash player installed on your computer.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1803
    • IceChat IRC Client
Re: Youtube Player Plugin
« Reply #3 on: March 15, 2014, 12:07:50 PM »
Very cool. Well, the next IceChat update will allow you to stop the links working, by return an empty value.
I should have the source uploaded today sometime.
The IceChat God

MrAlicard

  • Newbie
  • *
  • Posts: 11
Re: Youtube Player Plugin
« Reply #4 on: March 30, 2014, 12:22:57 PM »
Here is the source: https://mega.co.nz/#!b5xRRJKY!G3TeKktvjXWYwaLMSHlP-OHOn3r29lv382Z2HWlMRhQ