Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

118
Visualizações
Running pixel stream in react component?

question for devs here who have experience with customizing the webpage around a pixel stream.

I’ve followed the Unreal documentation, such as: https://docs.unrealengine.com/4.27/en-US/SharingAndReleasing/PixelStreaming/CustomPlayer/.

I’ve got a pixel stream up and running, I can load the default stream page, customize it here and there, but am stuck on implementing my actual purpose of using pixel in the first place - running my game in a react application.

Question: Does anyone have any guidance on how I can convert my pixel stream web page, with all the functions available in the default vanilla js “app.js” script provided and it’s related essential scripts, to a react component?

Some things I’ve tried:

  1. A very rudimentary formatting the app.js as a react component with the player.html page as the “return()”

But it only resulted in errors as variables in the default app.js script were listed as “undefined” (e.g “j” and “game pad”.

  1. Loading just the player.html file with its scripts in the return() of a react component.

This resulted in the menu, but the game wasn’t loading. I believe this is because “load()”, a key function in the vanilla app.js file wasn’t being called.

Happy to share more details, but don’t want to overload this post at the onset. Would appreciate any help from anyone who has knowledge of/experience with getting pixel to work as a react component.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

For anyone else looking into an updated solution for integrating the existing pixel stream implementation provided by Unreal, MetaEditor provides an open source react pixel streaming framework although you will need to update some of the existing vanilla JavaScript components .

Here's an example of using the component to start a pixel stream from the documentation.

<MetaEditor
       ref={refMetaEditor}
       onLoad={(payload) => {
         // console.warn('loaded', payload);
       }}
       onConnect={() => {
         // console.warn('connected');
       }}
       onRestart={() => {
         // console.warn('onRestart');
       }}
       onError={(payload) => {
         // console.error('error', payload);
       }}
       onClose={(payload) => {
         // console.error('closed', payload);
       }}
       onCommand={(payload => {
         // console.warn('command', payload);
         refContent.current.onCommand(payload)
       })}
       onCallback={(payload => {
         // console.warn('callback', payload);
         refContent.current.onCallback(payload)
       })}
       onProgress={(payload) => {
         // console.warn('progress', payload);
       }}
       autoConnect={autoConnect}
       quality={1}
       isDev={isDev}
       host={serverData.host}
       port={serverData.port} >

       {(payload) => (

         <MetaEditorProvider>
           <ContextProvider>
             <PlayerContent
               ref={refContent}
               setServerData={setServerData}
               autoConnect={autoConnect} />
           </ContextProvider>
         </MetaEditorProvider>
       )}
     </MetaEditor>
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda