Affected by GO-2024-3052
and 2 other vulnerabilities
GO-2024-3052 : gotortc vulnerable to Cross-Site Request Forgery in github.com/AlexxIT/go2rtc
GO-2024-3053 : gotortc Cross-site Scripting vulnerability in github.com/AlexxIT/go2rtc
GO-2024-3055 : gotortc Cross-site Scripting vulnerability in github.com/AlexxIT/go2rtc
Discover Packages
github.com/AlexxIT/go2rtc
www
package
Version:
v1.0.1
Opens a new window with list of versions in this module.
Published: Jan 24, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
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];
}
Useful links
Expand ▾
Collapse ▴
Documentation
¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.