You are not logged in.

1

Sunday, February 1st 2015, 7:13am

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.

Source code

1
2
3
4
5
6
7
8
9
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>



2

Tuesday, February 3rd 2015, 10:22am

Hi,

use the 'fully classified' names:

Source code

1
2
3
4
vars:{
  "plugin[video].posterurl" : "poster.jpg",
  "plugin[video].videourl" : "video4.mp4|video.webm"
}

Best regards,
Klaus

3

Wednesday, February 4th 2015, 10:51pm

sub-selectors

Klaus, thank you so much. This worked.

The platform-specific selectors generated errors though:

Source code

1
2
3
4
5
6
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.

4

Saturday, February 14th 2015, 11:40am

Hi,

these device attributes are features of the krpano XML format itself - they will be resolved during XML parsing. Using it when directly setting the values isn't possible.

Best regards,
Klaus