Forum Discussion
AmitGoyal-917a2
4 years agoCommunity Member
Update custom variable in ExecuteScript(strId) from user.js
Hi,
I am using clappr player into storyline 360 and it's working properly. But I've help popup into the structure which will be opened on a button click. So my requirement is to pause clappr ...
AmitGoyal-917a2
4 years agoCommunity Member
My code is:
var vidurl1 = "abc";
var _value = "NO";
var player = new Clappr.Player({
source: vidurl1,
autoPlay: true,
parentId: "#player",
plugins: {
container: [ResponsiveContainer]
}
});
player.on(Clappr.Events.PLAYER_PLAY, videoPlay)
player.on(Clappr.Events.PLAYER_PAUSE, videoPause)
player.on(Clappr.Events.PLAYER_TIMEUPDATE, timeupdate)
function timeupdate(e) {
console.log(_value);
};
function calledFun(){
return _value;
}
function videoPause(e) {
};
function videoPlay(e) {
};
function customFunction(){
}
//Clappr Ended
function ExecuteScript(strId)
{
_value = "RS"; //this value is not updating.
switch (strId)
{
case "6AOjn0bN2Mg":
break;
}
};
function Script1()
{
};