Hi all
Little casparcg-connection (js library) question
how do i load a html page in the background to play it later.
I dont want to load it as a template.
just like
LOADBG 1-10 [HTML] "url" sometransition
love the lib but for some reason i can’t get this figured out
Thanks in front
Use the CG ADD command with autoplay set to false.
Thanks Didi
Normally i would do that but i have to fade in a external/thirdparty html which needs time to load but does not have a intro animation.
i want to transition it in with a mix but i have no control on the HTML
The template controls don’t have transitions as they should be in the template.
So i wanted to use the caspar transitions which you have with LOADBG [html]
grt
Maurice
I see. I usually do this kind of stuff using a MIXER OPACITY command. Set the opacity to full transparency, then load and play the template and at the end fade it away an stop it.
1 Like
Thanks
not exatly the way i want to go in my application but certainly a option.
Something like below
//use "casparcg-connection": "^5.1.0",
const { CasparCG, Options, AMCP } = require('casparcg-connection');
var myCaspar = new CasparCG("127.0.0.1", 5250)
myCaspar.queueMode = Options.QueueMode.SEQUENTIAL;
const sendCommand = str => {
myCaspar.do(new AMCP.CustomCommand(str)).then((casparResponse) => {
console.log(casparResponse.response.raw);
}).catch((casparError) => console.log('Error:', casparError.response.raw));
}
sendCommand(`loadbg 1-1 [html] "file:///C:/Users/Administrator/Desktop/aa.html" mix 100`);
setTimeout(() => {
sendCommand(`play 1-1`);
}, 10000);
using v6 of the library, you can do something like:
1 Like
Thanks Vimlesh & Julian.
@Vimlesh
i guess i should have mentioned that i was using version 6.
@Julusian
Thanks that did the trick
grt
Maurice