Skip to content

Vue exampe #157

Answered by k-yle
kmg100 asked this question in Q&A
Mar 7, 2022 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

This works well for me:

<template>
  <canvas ref="canvas" />
</template>

<script setup>
import { ref, onMounted } from "vue";
import { loadPlayer } from "rtsp-relay/browser";

const canvas = ref(null);

onMounted(() => {
  loadPlayer({
    url: "ws://localhost:2000/api/stream/2",
    canvas: canvas.value,
  });
});
</script>

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by k-yle
Comment options

You must be logged in to vote
5 replies
@k-yle
Comment options

k-yle Nov 1, 2022
Maintainer

@Dryices
Comment options

@k-yle
Comment options

k-yle Nov 2, 2022
Maintainer

@Dryices
Comment options

@k-yle
Comment options

k-yle Nov 2, 2022
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants