You are not logged in.

vothanhbinh

Beginner

  • "vothanhbinh" started this thread

Posts: 6

Location: Vietnam

  • Send private message

1

Wednesday, October 31st 2018, 10:47am

Add start-button for video-plugin.

Hello Klaus, I have seen an example here:https://krpano.com/examples/119/krpano.h…ideohotspot.xml

I would like to add a play-button(a distorted hotspot) which aligns center of the video(a distorted hotspot), and the video has the edge that is "lefttop".

I try many ways, but the button has not aligned center.

This post has been edited 3 times, last edit by "vothanhbinh" (Nov 6th 2018, 11:20am)


vothanhbinh

Beginner

  • "vothanhbinh" started this thread

Posts: 6

Location: Vietnam

  • Send private message

2

Tuesday, November 6th 2018, 9:53am

Please! Anyone help me pls!

vothanhbinh

Beginner

  • "vothanhbinh" started this thread

Posts: 6

Location: Vietnam

  • Send private message

3

Tuesday, November 6th 2018, 11:18am

Hello, This is my codes

Source code

1
2
3
4
5
6
7
8
9
<hotspot name="video221" edge="lefttop"
	videohs="video221-vd"
	type="image"
	atv="-5.9981544701659" ath="19.240575312617"
width="300" height="200"
distorted="true" rx="-60" ry="60" rz="0"
onloaded="videoLoadComplete()"
url="https://s3.amazonaws.com/dhd-films-live/krpano/plugins/videoplayer.js"
/>



Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<action name="videoLoadComplete">
def(selfName, string, get(name));

//Add playbutton.
//Create button name
def(newHotspotName, string, calc(selfName + "-playbutton"));
addhotspot(get(newHotspotName));
set(hotspot[get(newHotspotName)],
url:string='/images/play-button.svg',
width:int=40,
height:int=40,
ath:number=get(ath),
atv:number=get(atv),
zoom:string=get(zoom),
scale:number=get(scale),
distorted:boolean=get(distorted),
rx:number=get(rx),
ry:number=get(ry),
rz:number=get(rz),
videohs:string=get(videohs),
onclick:string=get(onclick)
);
js(setVideoHotSpotButton(get(newHotspotName),get(width),get(height),get(rx),get(ry),get(rz),get(scale)));
);
	</action>

This post has been edited 2 times, last edit by "vothanhbinh" (Nov 6th 2018, 11:28am)