ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.3k stars 636 forks source link

videojs-webrtc-plugin - videojs-webrtc-plugin.min.js #6642

Open fabiox23 opened 2 months ago

fabiox23 commented 2 months ago

Short question. Where can I find the file "videojs-webrtc-plugin.min.js"? It doesn't seem to be in the videojs-webrtc-plugin repository. Thanks.

rahul78275 commented 2 months ago

@fabiox23

Short Answer :

  1. Clone Repo

  2. npm install

  3. npm run build

😄

fabiox23 commented 2 months ago

Thanks, I found the js file after doing "npm install" and copied it to the server. However, the html sample code in the README.md file doesn't seem to work for me. Apart from the video id which should be "my-video" and not "video-player", when I publish a stream with id "stream1", I get the following errors in the log console:

Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME WebSocket connection to 'ws://localhost:5080/LiveApp/websocket?target=edge' failed: initWebSocketConnection @ videojs-webrtc-plugin.min.js:2

Any help please?

rahul78275 commented 2 months ago

Thanks @fabiox23 for pointing out the typo 👍 (anyone from AMS team will update it).

Did you installed AMS on your local system ? Let me reproduce this at my end and will revert you soon.

fabiox23 commented 2 months ago

Yes, I have AMS installed on the same server where the html sample code is running. The stream "stream1" definitely exists as I can play it with play.html

This is the code:

<html>
<head>
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.21.6/video.min.js"></script>
<script src="/coachye/js/videojs-webrtc-plugin.min.js"></script>
<div id="video_container">
    <video id="my-video" width="960" height="540" class="video-js vjs-default-skin" controls>
        <source
           src="ws://localhost:5080/LiveApp/stream1.webrtc" iceServers = '[ { "urls": "stun:stun1.l.google.com:19302" } ]'
           >
      </video>
</div>
<script>
  var player = videojs('my-video');
</script>
</body>
</html>
rahul78275 commented 2 months ago

image

I can play at my end, however i don't have ams installed on my local system.

If you are available and comfortable with a google meet call now. Please share the meeting url. We can resolve this together.

fabiox23 commented 2 months ago

How do I send you a private message?

rahul78275 commented 2 months ago

Here: rahul78275@gmail.com