Package com.bramosystems.oss.player.core.client

Examples of com.bramosystems.oss.player.core.client.PluginInfo


                            pv = PluginVersion.get(5, 0, 0);
                        } else {
                            throw new PluginNotFoundException(plugin);
                        }
                }
                return new PluginInfo(plugin, pv, pwt);
            }

            PluginMimeTypes pt = PluginMimeTypes.none;
            switch (plugin) {
                case DivXPlayer:
                    pt = PluginMimeTypes.divx;
                    break;
                case FlashPlayer:
                    pt = PluginMimeTypes.flash;
                    break;
                case QuickTimePlayer:
                    pt = PluginMimeTypes.quicktime;
                    break;
                case VLCPlayer:
                    pt = PluginMimeTypes.vlc;
                    break;
            }

            MimeType mt = MimeType.getMimeType(pt.mime);
            if (mt != null) {   // plugin present...
                try {
                    String desc = mt.getEnabledPlugin().getDescription();
                    String name = mt.getEnabledPlugin().getName();
                    if (name.toLowerCase().contains(pt.whois)) { // who has it?
                        RegExp.RegexResult res = RegExp.getRegExp(pt.regex, "").exec(pt.versionInName ? name : desc);
                        pv = new PluginVersion(Integer.parseInt(res.getMatch(1)),
                                Integer.parseInt(res.getMatch(2)), res.getMatch(3) != null ? Integer.parseInt(res.getMatch(4)) : 0);
                        if (mt.getEnabledPlugin().getFileName().toLowerCase().contains("totem")
                                || desc.toLowerCase().contains("totem")) {
                            pwt = PluginInfo.PlayerPluginWrapperType.Totem;
                        }
                    }
                } catch (RegexException ex) {
                }
            } else {
                throw new PluginNotFoundException(plugin);
            }
            return new PluginInfo(plugin, pv, pwt);
        }
View Full Code Here


                    }
            }
            if (pv.compareTo(new PluginVersion()) <= 0) {
                throw new PluginNotFoundException(plugin);
            }
            return new PluginInfo(plugin, pv, PluginInfo.PlayerPluginWrapperType.Native);
        }
View Full Code Here

TOP

Related Classes of com.bramosystems.oss.player.core.client.PluginInfo

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.