New WebRTC and Video Player
This commit is contained in:
@@ -125,8 +125,6 @@ const {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { WebRTCPlayer } from "@eyevinn/webrtc-player";
|
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
const videoCardEl = document.getElementById("video-card");
|
const videoCardEl = document.getElementById("video-card");
|
||||||
const videoEl = document.getElementById("live-video");
|
const videoEl = document.getElementById("live-video");
|
||||||
@@ -149,7 +147,7 @@ const {
|
|||||||
async function startPlayer() {
|
async function startPlayer() {
|
||||||
try {
|
try {
|
||||||
if (videoEl)
|
if (videoEl)
|
||||||
player = new WebRTCPlayer({
|
player = new window.WebRTCPlayer({
|
||||||
video: videoEl as HTMLVideoElement,
|
video: videoEl as HTMLVideoElement,
|
||||||
type: "whep",
|
type: "whep",
|
||||||
statsTypeFilter: "^candidate-*|^inbound-rtp",
|
statsTypeFilter: "^candidate-*|^inbound-rtp",
|
||||||
|
|||||||
Vendored
+4
@@ -1,3 +1,6 @@
|
|||||||
|
|
||||||
|
import { WebRTCPlayer } from "@eyevinn/webrtc-player";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
schema: any;
|
schema: any;
|
||||||
@@ -5,6 +8,7 @@ declare global {
|
|||||||
upload: any;
|
upload: any;
|
||||||
myModal_open: any;
|
myModal_open: any;
|
||||||
myModal_close: any;
|
myModal_close: any;
|
||||||
|
WebRTCPlayer: typeof WebRTCPlayer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user