Most appropriate sub-area of p5.js?
p5.js version
2.3.2
Web browser and version
firefox 155.0.0
Operating system
Fedora WS
Steps:
- Create a sketch using
createCapture(VIDEO) and createCapture(AUDIO).
- Store the resulting
MediaStreamTracks and verify that their readyState is live.
- Call
p.remove() and check the tracks again.
Snippet:
new p5(p => {
p.setup = () => {
p.createCanvas(1, 1).hide();
p.createCapture(p.VIDEO, videoStream => {
p.createCapture(p.AUDIO, async audioStream => {
const tracks = [
...videoStream.getTracks(),
...audioStream.getTracks()
];
console.log(
'before remove:',
tracks.map(track => `${track.kind}: ${track.readyState}`)
);
await p.remove();
console.log(
'after remove:',
tracks.map(track => `${track.kind}: ${track.readyState}`)
);
});
});
};
});
Expected behavior:
After p.remove(), the MediaStreamTracks created by createCapture() should be stopped, with their readyState changing from live to ended.
Actual behavior:
After p.remove(), the tracks remain live.
Most appropriate sub-area of p5.js?
p5.js version
2.3.2
Web browser and version
firefox 155.0.0
Operating system
Fedora WS
Steps:
createCapture(VIDEO)andcreateCapture(AUDIO).MediaStreamTracks and verify that theirreadyStateislive.p.remove()and check the tracks again.Snippet:
Expected behavior:
After
p.remove(), theMediaStreamTracks created bycreateCapture()should be stopped, with theirreadyStatechanging fromlivetoended.Actual behavior:
After
p.remove(), the tracks remainlive.