Define video and poster URLs in embed tag

  • I have a site that just displays 360 videos. I want to be able to define the video and poster URLs inside the embedpano call, not inside the XML.

    Code
    embedpano({
    			swf:"krpano.swf", 
    			xml:"video.xml", 
    			target:"pano", 
    			html5:"auto", 
    			vars: {
    				posterurl: "poster.jpg",
    				videourl: "video.mp4|video.webm"
    }});

    Obviously the above doesn't work, and I've tried a few different variations. Is there anything like this possible? Right now the posterurl and videourl are only available inside the tags<krpano><plugin name="video" posterurl="xx" videourl="xx"></krpano>


  • Klaus, thank you so much. This worked.

    The platform-specific selectors generated errors though:

    Code
    vars: {
      "plugin[video].posterurl.ios":"<%=@poster%>",
      "plugin[video].videourl.ios":"<%=@video%>",
      "plugin[video].posterurl.no-ios":"<%=@poster%>",
      "plugin[video].videourl.no-ios":"<%=@video%>",
    }

    Is there a different syntax for these types of properties or is it just not supported? It could be easy enough to just do the platform checks in JS.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!