Files
go2rtc/www
Sergey Krashevich 5f2d523242 feat(logging): enhance log visualization with level-specific colors
- Add CSS classes for log levels (info, debug, error, trace, warn) in main.js to color-code log messages based on their severity.
- Modify log.html to include the log level as a class in each log entry's table row for applying the corresponding color styles.
2024-04-29 15:03:22 +03:00
..
2024-04-27 11:40:59 +03:00
2024-04-29 11:54:00 +03:00
2023-07-11 15:03:27 +03:00

Browser support

ECMAScript 2019 (ES10) supported by iOS 12 (iPhone 5S, iPad Air, iPad Mini 2, etc.).

But ECMAScript 2017 (ES8) almost fine (es6 + async) and recommended for React+TypeScript.

Known problems

  • Autoplay doesn't work for WebRTC in Safari read more.

HTML5

1. Autoplay video tag

Video auto play is not working

Recently many browsers can only autoplay the videos with sound off, so you'll need to add muted attribute to the video tag too


<video id="video" autoplay controls playsinline muted></video>

2. [Safari] pc.createOffer

Don't work in Desktop Safari:

pc.createOffer({offerToReceiveAudio: true, offerToReceiveVideo: true})

Should be replaced with:

pc.addTransceiver('video', {direction: 'recvonly'});
pc.addTransceiver('audio', {direction: 'recvonly'});
pc.createOffer();

3. pc.ontrack

TODO

pc.ontrack = ev => {
    const video = document.getElementById('video');

    // when audio track not exist in Chrome
    if (ev.streams.length === 0) return;

    // when audio track not exist in Firefox
    if (ev.streams[0].id[0] === '{') return;

    // when stream already init
    if (video.srcObject !== null) return;

    video.srcObject = ev.streams[0];
}

Chromecast 1

2023-02-02. Error:

InvalidStateError: Failed to execute 'addTransceiver' on 'RTCPeerConnection': This operation is only supported in 'unified-plan'. 'unified-plan' will become the default behavior in the future, but it is currently experimental. To try it out, construct the RTCPeerConnection with sdpSemantics:'unified-plan' present in the RTCConfiguration argument.

User-Agent: Mozilla/5.0 (X11; Linux armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.47 Safari/537.36 CrKey/1.36.159268

https://webrtc.org/getting-started/unified-plan-transition-guide?hl=en