Git Product home page Git Product logo

peer-stream's Introduction

inveta

peer-stream's People

Contributors

1tsuka avatar g0415shenw avatar xosg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

peer-stream's Issues

Unable to stream out of local network using ngrok

I tried running the signal.js using the commands provided in this repo for demo. But when I tried to stream to external network using ngrok, the URL would only display black screen with no video or audio. Is there anything that can be done to fix this problem? Or I am doing something wrong

在vue3中组件引入的问题

这里是vue的代码

<!-- eslint-disable vue/no-deprecated-html-element-is -->
<template>
  <div class="container">
    <div ref="ueDemo" class="ue-demo">
      <!-- <video is="peer-stream" id="ws://5.5.5.31:80/"></video> -->
    </div>
  </div>
</template>

<route>
{
  meta:{
    title:'UEDemo',
    keepAlive:true,
    tabbar:true
  }
}
</route>

<script setup>
import '@/utils/peer-stream'
import { ref, onMounted } from 'vue'
const ueDemo = ref(null)

onMounted(() => {
  const ps = document.createElement('video', { is: 'peer-stream' })
  ps.id = 'ws://5.5.5.31:80/'
  // ps.signal = 'ws://5.5.5.31:80/'
  console.log(' ps.id', ps.id)
  ueDemo.value.append(ps)
})
</script>

<style lang="scss" scoped>
.container {
  width: 100vw;
  background: #ccc;
  padding: 20px;
  box-sizing: border-box;
  .ue-demo {
    height: 80vh;
    background: #999;
    border-radius: 8px;
  }
}
</style>

这里是 部分 peer-stream.js 代码

// setupWebsocket
  connectedCallback() {
    // This will happen each time the node is moved, and may happen before the element"s contents have been fully parsed. may be called once your element is no longer connected
    if (!this.isConnected) return

    let signal = this.getAttribute('signal')   //  这里是null

    if (!signal) {
      const ip = this.getAttribute('ip') || location.hostname || 'localhost'
      const port = this.getAttribute('port') || 88
      const token = this.getAttribute('token') || 'hello'
      signal = this.getAttribute('id') // 这里直接取id 可以 
      // signal = `ws://${ip}:${port}/${token}`  // 这里就会变成 localhost:88/hello 结果一直链接不了
    }
    this.ws.close(1000, 'Infinity')
    this.ws = new WebSocket(signal)

    this.ws.onerror = e => {
      console.log(e)
    }

拿到dom 后进行添加video实例 ,此时 peer-stream.js 拿不到signal的参数,直接在里面写id 是可以的,请问是我用的有问题吗?我该如何不更改peer-stream.js 才能正常使用呀

你好对不起打扰了关于网页方面的

我打包了一个ue4.26包启动参数
set publicIp=%1
set streamerPort=%2
start MyGame426.exe -PixelStreamingIP=%publicIp% -PixelStreamingPort=%streamerPort% -RenderOffScreen -Unattended -ForceRes -windowed -ResX=1920 -ResY=1080 -AudioMixer -graphicsadapter=0 -AllowPixelStreamingCommands -PixelStreamingEncoderRateControl=VBR

启动的信令服务器bat
node signal.js player=77 engine=7777 token=hello limit=4

但是我不清楚访问哪个网页才可以看见画面

关于UE应用程序自动关闭

你好,在博客介绍中提到无人访问时经过一段时间自动关闭UE5
请问现在的库中包含这部分功能吗?
或者能提供相关的思路吗?

请问如何在一台完全不联网的机器上使用流推送?

在完全不联网的机器上(不插网线,Wifi 不连),流推送会显示黑屏,看 log 是只进行到了 ↑↑ answer 这一步
7@ B9DTWVM_HR95RLCQH~(G
当我打开网络后后续的 log 立马就会出现了 ↓↓ candidate
8X2B569E8A8RG@O5)BVHH4K
我也有试过让电脑直接连接我的手机热点,但手机不开网络,流送是正常的,说明也不需要能够连接外网
我想请教一下这个问题是流送服务器的问题还是 UE 端的问题呢?如果能获得解答真的会非常感谢!

性能问题

大佬好,谢谢提供这么好的脚本供使用。
我使用了脚本内存池,开了三个空闲UE5进程,使用的是UE5.1的默认第三人称场景。

GPU使用的是 4080

开启脚本和打开浏览器之后。才三个人就卡得不行了。GUU占用率直接100%,请问有什么优化的方法吗

你好 怎么实现服务器端自启动ue程序啊

如题。
ue5.03
我目前的使用流程如下:
启用像素流插件,
在编辑器偏好-播放-额外启动参数中配置-AudioMixer -PixelStreamingIP=localhost -PixelStreamingPort=8888。
打包后在exe应用的快捷方式后添加-AudioMixer -PixelStreamingIP=localhost -PixelStreamingPort=8888。
node signal.js 启动信令服务器。
打开写好的html前端,信令服务器会提示已连接。

这时只能跟官方的像素流插件一样,我手动在服务器端启动一下ue的应用程序快捷方式,我的前端才能看到。如何实现自动在websocket链接时启动ue程序呢?
是我配置时漏了哪里吗?

UE not streaming

Hi! First of all: thanks for work. this is so much better than Epic's code.

Question:
In UE I'm trying this parameters now, like your documentation says:
-PixelStreamingURL="ws://localhost:8888" -windowed resx=1280 resy=720
But before, with Epic's code/template, I was using this:
PixelStreamingIP=localhost -PixelStreamingPort=8888 -windowed resx=1280 resy=720

It seems that my old parameters brakes the app when I try to run it now.
and the new parameters don't break the app, but also, doesn't show anything in the index.html

I ran the index.html with the unreal simulator and it worked. I could see myself in the index.html
Can you send me what are the parameters you used in your Unreal project?

no Connection over Internet.

Hello, thanks for your lightweight WebRTC.
I have a problem when I want to connect via internet.
unfortunately no connection is established.
with the heavy sdk kit from Unreal it works without any problems, I use the same stun server in each case.

do you have any ideas ?

The signal service has been reset. Why

this is very unnormal style:
❌ signaler closed: 1
index.js:7 ✅ connected to ws://localhost:8989/
peer-stream.js:187 ↓↓ ❌ Engine:8888 stopped
peer-stream.js:187 ↓↓ ✅ Engine:8888 started
index.js:7 ❌ signaler closed: 1

ue5像素流蓝图和前端网页的事件交互流程

麻烦详细的讲解一下ue5像素流蓝图和前端网页的事件交互流程,文章、截图、代码最好都有。
本人目前的水平:已经可以创建hello world ue5程序并打包,启动信令服务,前端访问像素流了。
问题:例如前端发送一个事件,ue蓝图接收到消息后执行某个操作(打印hello、创建物体、移动角色位置等)。

怎么输入中文?

在PIXSEL STREAMING环境下,点击文本框,无法调动输入法,只能打英文,请问老铁们是怎么解决的

stun server,but test.html is black

  1. signal
    const iceServers = [{ urls: [ //"stun:XX.XX.XX.1XX81" "stun:XX.XX.XXXX:88" ], },]
    // sent to UE5 as initial signal ue.send( JSON.stringify({ type: "config", peerConnectionOptions: { iceServers }, }) );

  2. peer-stream.js
    const iceServers = [ { urls: [ //"stun:XX.XX.XXXX4:81" "stun:XX.XXXX.XX:88" ], }, ]

setupPeerConnection() { this.pc.close(); this.pc = new RTCPeerConnection({ sdpSemantics: "unified-plan", bundlePolicy: "balanced", iceServers });

如何集成到VUE框加中?

在集成过程过报错:[Vue warn]: Unknown custom element: pixel-stream - did you register the component correctly? For recursive components, make sure to provide the "name" option.

如何在云服务器上部署?

把代码上传至服务器,在服务器上打开正常,在其它电脑上打开黑屏,需要如何设置可以在公网进行使用呢?

Tried to send command or UIINteractions

Hello there,

Sending UI Interactions or commands doesnt seem to work

// Generic Input Messages. Range = 50..59.
UIInteraction: 50,
Command: 51,

any advice?

没声音

你好,使用这个浏览器没有声音

同时维护4.27和UE5最新版本

考虑到好多朋友都在用UE4的像素流
建议维护一套功能全面的UE4.27版本
另外UE5的话,就跟着官方版本进行迭代
@xosg 你觉得咋样

那关于ue4像素流的信令服务重写

那关于ue4像素流的信令服务怎么重写就是有点不理解,我想从他的demo的插件调用视频流,例如127.0.0.1:xxxx这个地址的视频流,用在其他网页上,我是主要写cpp的能给一点思路吗,谢谢。

Turn Server

How to add a turn server to this? most people cannot connect without a turn server !

PLAYER.clients.size数量只会增加不会减少

步骤如下:
1、启动one2one模式
2、配置5个gpu实例
3、打开3个网页,再打开第四个网页 此时无法打开
4、然后关闭第三个网页,之后再打开第三个和第四个网页 就可以打开4个了。

像素流网页鼠标,跟UE鼠标 偏移很大的问题

如题,网页上的鼠标跟UE的鼠标偏移很大的问题,导致隐藏UE鼠标之后,用网页鼠标去点击UE里面的POI点位的时候位置偏移两个鼠标位置偏移比较大,点不到。请问有碰到过类似的问题吗,或者相关解决思路

Engine not ready

使用demo测试。
start demo.exe -PixelStreamingUrl... 可以打开
node signal.js PORT=88 可以打开

输入地址,浏览器会卡主,exe窗口提示 Engine not read

image

How to lock the mouse?

I am wondering how do I lock the mouse with peer-stream? I want to lock the mouse to the when the player clicks into the video container. When the player wants their mouse cursor back they will need to click the Esc key. I believe this functionality already exists in Epic's original code but I can not figure out how to enable it with peer-stream. I appreciate that the work you have done here to simplify the solution. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.