peervideo.vue 427 B

123456789101112131415161718192021222324252627
  1. <template>
  2. <div class="" style="float:left">
  3. <video class="box" ref="video" autoplay />
  4. </div>
  5. </template>
  6. <script>
  7. export default {
  8. props: ["videoStream"],
  9. data: function () {
  10. return {
  11. video: null,
  12. };
  13. },
  14. mounted: function () {
  15. this.$refs.video.srcObject = this.videoStream;
  16. },
  17. beforeDestroy: function () {},
  18. };
  19. </script>
  20. <style scoped>
  21. .box {
  22. width: 400px;
  23. height: 380px;
  24. }
  25. </style>