AMCP CG STOP command


#1

I use HTML templates with 2.2. version and after i type (send) CG 2-100 STOP command, the stop JS function has been called, animation in this function is performed, but the template is not removed from the channel 2 layer 100, as can bee seen from the INFO 2 command.
Any idea?
Thanks
Jarda


#2

That is the normal behavior of the HTML producer.


#3

Use window.close();


#4

Did You try it?
I obtain this error message: “Scripts may close only the windows that were opened by it” when I try it in Chrome browser.


#5

I get the same error. My solution was to setup a network connection from the template to the client and have the client send a remove command for the layer in question.


#6

Chrome doesn’t allow it, but it works in CCG.


#7

Unfortunately, it doesn’t work for me.
What I am doing wrong?

function stop() {

console.log('stop');
titleAnimateYOut();
}

 function titleAnimateYOut() {
  console.log('titleAnimateOut');
  animationObject.css({transform: 'translateY(' + titleHeight + 'px)'});
  animationObject.css({transitionDuration: titDurationOut}); 
  animationObject.css({transitionTimingFunction: 'ease-in-out'}); 
  setTimeout(function(){
  window.close();
  console.log('window.close');
  },parseInt(titDurationOut.slice(0,-2)) + 100); 
  }

CasparCG 2.2

window.close has been logged, but the template remains in the layer


#8

Your doing it ok but it’s broken on the moment


#9

So I am bad luck…:frowning:
Thakns for explanation Maurice78.