GithubHelp home page GithubHelp logo

Comments (7)

AlexxIT avatar AlexxIT commented on May 23, 2024

MSE will work anyway. There is no reason to use it with more priority than WebRTC.
https://github.com/AlexxIT/go2rtc/tree/master/api#javascript-api

I don't see the point of setting a manual priority.

Some tablets can play only few video on same page.

// Video+Audio > Video, H265 > H264, Video > Audio, WebRTC > MSE
let rtcPriority = 0, msePriority = 0;
/** @type {MediaStream} */
const stream = video2.srcObject;
if (stream.getVideoTracks().length > 0) rtcPriority += 0x220;
if (stream.getAudioTracks().length > 0) rtcPriority += 0x102;
if (this.mseCodecs.indexOf('hvc1.') >= 0) msePriority += 0x230;
if (this.mseCodecs.indexOf('avc1.') >= 0) msePriority += 0x210;
if (this.mseCodecs.indexOf('mp4a.') >= 0) msePriority += 0x101;
if (rtcPriority >= msePriority) {

from webrtc.

gvillo avatar gvillo commented on May 23, 2024

Yeah @AlexxIT, it's not about how many videos a tablet can play. It's about the black blink that is doing, so that's why I cannot just set RTC to avoid that one second black screen (RTC is working on most of the scenarios, except when I am using my phone hotspot or in some WiFis).

The actual behavior (if RTC is working) is: connects using MSE, and then switches to RTC.

If RTC doesn't work, it just connects using MSE which is ok

from webrtc.

AlexxIT avatar AlexxIT commented on May 23, 2024

I don't understand. Is black screen constant or it shows during few seconds?

from webrtc.

gvillo avatar gvillo commented on May 23, 2024

@AlexxIT I recorded a video, basically it's the black blinking when the stream switches from MSE to RTC (at the beginning), I've refreshed the page a few times, sometimes it's very fast that you don't notice, and sometimes is really bad, specially if you have like 3 cameras on the same Home Assistant page, even for my Pixel 7 Pro.

Video: https://drive.google.com/file/d/1oHV-gwe64aTICj3iMsjsAIaKZOAFaYte/view?usp=sharing

My card config for that example was the default, just adding camera name.

from webrtc.

AlexxIT avatar AlexxIT commented on May 23, 2024

You can enable only webrtc mode without switching

from webrtc.

gvillo avatar gvillo commented on May 23, 2024

yeah, I've tried that, the issue of doing that, RTC is not working in some scenarios (ports forwarded correctly), such as using mobile hotspot, some wifi networks using double nat, etc, that's why I need both set.

from webrtc.

AlexxIT avatar AlexxIT commented on May 23, 2024

Well. Blinking while technology change is a "normal" behaviour...

from webrtc.

Related Issues (20)

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.