Package com.bramosystems.oss.player.util.client

Examples of com.bramosystems.oss.player.util.client.BrowserPlugin


    }-*/;

    protected static class PluginManagerImpl {

        public PluginInfo getPluginInfo(Plugin plugin) throws PluginNotFoundException {
            BrowserPlugin plug = null;
            PluginInfo.PlayerPluginWrapperType pwt = PluginInfo.PlayerPluginWrapperType.Native;
            PluginVersion pv = new PluginVersion();

            if (plugin.equals(Plugin.Native) || plugin.equals(Plugin.WinMediaPlayer)) {
                switch (plugin) {
                    case WinMediaPlayer:
                        boolean found = false;
                        MimeType mt = MimeType.getMimeType("application/x-ms-wmp");
                        if (mt != null) {   // firefox plugin present...
                            found = true;
                            pwt = PluginInfo.PlayerPluginWrapperType.WMPForFirefox;
                        } else {   // firefox plugin not found check for generic..
                            mt = MimeType.getMimeType("application/x-mplayer2");
                            if (mt != null) {
                                try {
                                    plug = mt.getEnabledPlugin(); // who's got the mime ? (WMP / VLC)
                                    if (plug.getName().contains("Windows Media Player")) {
                                        found = true;
                                    }
                                } catch (PluginNotFoundException ex) {
                                }
                            }
                        }

                        if (found) {
                            updateWMPVersion(pv);
                            plug = mt.getEnabledPlugin();
                            if (plug.getFileName().toLowerCase().contains("totem")
                                    || plug.getDescription().toLowerCase().contains("totem")) {
                                pwt = PluginInfo.PlayerPluginWrapperType.Totem;
                            }
                        } else {
                            throw new PluginNotFoundException(plugin);
                        }
View Full Code Here


    private void doPlugins() {
        addPluginRow("Name", "Plugin filename", "Description", EntryType.header);
        JsArray<BrowserPlugin> plugins = BrowserPlugin.getPlugins();
        for (int row = 1; row < plugins.length(); row++) {
            BrowserPlugin bp = plugins.get(row);
            addPluginRow(bp.getName(), bp.getFileName(), bp.getDescription(),
                    row % 2 != 0 ? EntryType.even : EntryType.odd);
        }
    }
View Full Code Here

TOP

Related Classes of com.bramosystems.oss.player.util.client.BrowserPlugin

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.