You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

San7

Professional

  • "San7" started this thread

Posts: 594

Occupation: coding in krpano

  • Send private message

1

Monday, June 7th 2021, 7:26am

Element "input", type = "range"

Hello, I have created a slider_input.js file.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
var krpanoplugin = function()
{	
	var local = this;
	var krpano = null;
	var plugin = null;
	
	var slaid = null;

	local.registerplugin = function(krpanointerface, pluginpath, pluginobject)
	{
		krpano = krpanointerface;
		plugin = pluginobject;
 
		slaid = document.createElement("input");
		slaid.type = "range";  

		plugin.sprite.appendChild(slaid);
		
	} 
 
};

this is how it is included in the xml:

Source code

1
<layer name="slider" url="slider_input.js" align="center" y="150" />

And the video layer is included:

Source code

1
<layer name="video" url.html5="videoplayer.js" videourl="video.mp4" align="center" width="500" height="prop" loop="true" onclick="togglepause()" />

But when I press and release the slider, there is a duplicate audio from the video, regardless of whether it is running or not. I did not make any connection with the video and the slider.
Here's an example

Tell me, what am I doing not so? *confused*