Open geourjoa opened 6 days ago
I use React Player to read video from external source.
On one issue i find someone that have haved PeerTube support
https://github.com/cookpete/react-player/pull/1544
He published his custom package : https://www.npmjs.com/package/@celluloid/react-player
And used it in this project : https://github.com/celluloid-camp/celluloid
Usage https://github.com/search?q=repo%3Acelluloid-camp%2Fcelluloid%20react-player&type=code
The production app https://celluloid.huma-num.fr/project/4878b2b9-706b-46b7-af9b-b2a0eb23eae7
The app read video from MSH Paris Nord PeerTube instance https://video.mshparisnord.fr/w/5GPbYsxX97Kxo8uLviWG4i
When reading the video from Celluloid
I faced ORB issue.
When examinating Request headers
Fetching from Mirador Video
Fetching from Celluloid
https://celluloid.huma-num.fr/project/4878b2b9-706b-46b7-af9b-b2a0eb23eae7
One way to explore is : Sec-Fetch-mode
I have cloned and run Celluloid/ReactPlayer
I was able to run some video from peertube inside the react demo app.
When reading source code from demo of Celluloird/ReactPlayer
I suspect reading directly from IFrame
I need to investigate that way
I resolve ORB issue by using right config for ReactPlayer
Afterward i Have issue from ref management. I have been able to solve it with playerRef.current.getInternalPlayer to get the ref on the video element.
Now I'm facing positionning issue and scale issue. Basically css must be the way
When fixing annotation I discover issue on Youtube video playing.
VideoViewer include two main components : ReactPlayer and AnnotationOverlayVideo
AnnotationOvelrayVideo use a ref to communicate with the video element. At this moment, it's not so clear why AnnotationOverlayVideo need to control video on ComponentDidUpdate.
i discover different comportment between classic file and Youtube playing. It seems the videoRef object is not exactly the same.
With classique file I can use video.paused or video.play(). With Youtube I can use video.playVideo(). All the logic in AnnotationOverlayVideo:componentDidUpdate is concerned y this issue.
Some explication come from ReactPlayer Docs.
https://github.com/cookpete/react-player
Two way to go further :
Not exhaustive list of bug :