Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第一帧和第二帧间隔太长无法正常播放 #812

Open
songbiaoself opened this issue Jan 31, 2024 · 1 comment
Open

第一帧和第二帧间隔太长无法正常播放 #812

songbiaoself opened this issue Jan 31, 2024 · 1 comment

Comments

@songbiaoself
Copy link

在对接海康威视RTSP流媒体的时候,出现后端数据拥塞的情况,导致第一帧和第二帧会间隔10多秒后返回给前端(后续帧时间正常),这时,前端会一直卡在这个页面转圈,还请给一个解决方案。
5C341529-BF21-4f83-B02A-AF655FB1021C

前端代码:

function toPlay() {
        if (!mpegts.isSupported()) {
            alert("不支持flvjs");
            return;
        }
        let path = document.getElementById("rtspPath").value;
        this.player = mpegts.createPlayer({
            type: "flv",
            isLive: true,
            url: "ws://127.0.0.1:8080/rtsp/1"
        });
        this.player.attachMediaElement(videDoc);
        try {
            this.player.load();
            this.player.play();
        } catch (error) {
            console.log(error);
        }
    }
@Richard-Choooou
Copy link

@songbiaoself 请问找到解决方案了吗,我好像也遇到了同样的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants