jphillipsCrestron / ch5-react-ts-template

Minimal demonstration of turning a Vite project with React + TypeScript acting as a single page application into a Crestron HTML5 project, along with PWA support
10 stars 3 forks source link

RTSP Video #4

Open jredbart opened 8 months ago

jredbart commented 8 months ago

Hi There,

Thank you for publishing this repo, It's very useful. I have a use case where we would like to be able to stream RTSP video to the touch panels/Crestron One App. I believe the ch5-video component available from the cr-com-lib is able to do this, and wondered if you have any way to integrate this component into the react app?

nathan-hello commented 3 months ago

@jredbart

late response but did you get it working?

<ch5-video> is just a webcomponent, so you should be able to use it just like any other html element as long as you have it imported

jredbart commented 3 months ago

Hi @nathan-hello,

No I never managed to get the ch5-video component to render correctly in a standalone react project. I have a feeling the Crestron-template project adds some imports in the build process in order to get the component to render correctly. But haven't had a chance to prove that yet.

If you have any success, please do let me know?

nathan-hello commented 3 months ago

Sure thing! If I get into the web component stuff, I'll let you know.

I couldn't get the proper ch5 library to be imported at all, so I had to use a fork by pepperdash that unfortunately doesn't have any web component stuff in it. This repo's suggestion of having vite copy the ch5 js file into the client and leveraging that didn't work for me, and I was just trying to get to the subscribeEvent and publishEvent for join numbers and that's it.

But again, if there's something I find I'll let you know.

There's also a discord, maybe someone there can help. https://discord.gg/PASdAju

(if this link doesn't work then you can reply here and i'll try to get a new one)