My test code:
Code: Select all
async function fire(bp, interval=0, loop=false ) {
let www=0;
await bp.sendPLHead({'cmdType': 4});
await bp.sendPLHead({'cmdType': 5, 'fmtStr':'image/png ! flip=90'});
do {
for (const v of inputArray) {
for (const t of v.files) {
let slices = sliceFile(t);
for (const n of slices) {
if (abort) {
await bp.sendPLHead({'cmdType': 6});
throw new Error('User abort!');
return;
}
let x = await readSlice(n);
let y = new Uint8Array(x);
await bp.sendMedia(y);
}
if (++www%20===0)
console.log("20 frames");
}
}
} while (loop);
await bp.sendPLHead({'cmdType': 6});
}
Portrait png to be tested: PS: If you want to test this feature on 5C/5P, you will need to update a newer firmware. And here is link-->
5C:https://www.nxelec.com/service/download ... 403311.zip
5P:https://www.nxelec.com/service/download ... 314.tar.gz