Hi,
iOS and html5-video is a topic by its own...
I don't know why captureStream don't work, but there is an easier solution for using a canvas without the need for videos.
Instead of using a video, the canvas can be added 'videoDOM' element to a krpano plugin element.
Then krpano then thinks this is a video-element and updates its texture every time when its currentTime value changes.
These settings would need to be done, they 'fake' a video-element:
|
Source code
|
1
2
3
4
5
6
7
|
plugin.videoDOM = canvas;
plugin.videowidth = canvas_width;
plugin.videoheight = canvas_height;
canvas.readyState = 4;
canvas.videoWidth = canvas_width;
canvas.videoHeight = canvas_height;
canvas.currentTime = 1;
|
and every time the canvas changes or should be redrawn, modify the currentTime somehow:
|
Source code
|
1
|
canvas.currentTime++;
|
Here a whole plugin source example:
https://krpano.com/viewsource.html?examp…awing/canvas.js
and here the example for trying - click the canvas and draw something:
https://krpano.com/krpano.html?xml=examp…wing/canvas.xml
The example xml:
https://krpano.com/viewsource.html?examp…wing/canvas.xml
Best regards,
Klaus