Package org.openhab.model.sitemap

Examples of org.openhab.model.sitemap.Video


 
  /**
   * {@inheritDoc}
   */
  public EList<Widget> renderWidget(Widget w, StringBuilder sb) throws RenderException {
    Video videoWidget = (Video) w;
    String snippet = null;
   
    String widgetId = itemUIRegistry.getWidgetId(w);   
    String sitemap = w.eResource().getURI().path();
   
    if(videoWidget.getEncoding() !=null && videoWidget.getEncoding().contains("mjpeg")) {
      // we handle mjpeg streams as an html image as browser can usually handle this
      snippet = getSnippet("image");
      snippet = StringUtils.replace(snippet, "%setrefresh%", "");
      snippet = StringUtils.replace(snippet, "%refresh%", "");
    } else {
View Full Code Here


              bean.refresh = imageWidget.getRefresh();
            }
            bean.url = imageWidget.getUrl();
          }
          else if (widget instanceof Video) {
            Video videoWidget = (Video) widget;
            if(videoWidget.getEncoding() != null) {
              bean.encoding = videoWidget.getEncoding();
            }
            bean.url = videoWidget.getUrl();
          }
          else {
        Webview webViewWidget = (Webview) widget;
        bean.height = webViewWidget.getHeight();
        bean.url = webViewWidget.getUrl();
View Full Code Here

      Widget widget = itemUIRegistry.getWidget(sitemap, widgetId);
      if(widget instanceof Image) {
        Image image = (Image) widget;
        uriString = baseUrl + image.getUrl();
      } else if(widget instanceof Video) {
        Video video = (Video) widget;
        uriString = baseUrl + video.getUrl();
      } else if(widget instanceof Webview) {
        Webview webview = (Webview) widget;
        uriString = baseUrl + webview.getUrl();
      } else {
        if(widget==null) {
View Full Code Here

TOP

Related Classes of org.openhab.model.sitemap.Video

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.