Gambit Posted October 26, 2020 Share Posted October 26, 2020 Hi all I'm new to the Any platform but so far it's great. I'm looking to build my own custom player, could anyone direct me on how to get the WebRTC feed from my server. The iframe tags work but I'd like a little more control on the way the player looks. Thanks G Link to comment Share on other sites More sharing options...
0 Selim Emre Posted October 26, 2020 Share Posted October 26, 2020 Hi Gambit, Welcome to our community! You can build your own player. Here are the details: 1- Create an HTML file according to this URL -> https://raw.githubusercontent.com/ant-media/StreamApp/master/src/main/webapp/player.html 2- Change WebSocket URL parameter in your HTML file according to your server and application name. Here is the WSS example: websocketURL = "wss://domain.com:5443/WebRTCAppEE/websocket"; 3- Change webrtc_adaptor.js and fetch.stream.js file path according to your server domain. For example: import {WebRTCAdaptor} from "https://domain.com:5443/WebRTCAppEE/js/webrtc_adaptor.js" import {getUrlParameter} from "https://domain.com:5443/WebRTCAppEE/js/fetch.stream.js" Now, your player is ready to use. You can play WebRTC stream in your WebRTCAppEE application. I hope, it's clear. Best Regards, Selim Link to comment Share on other sites More sharing options...
0 Gambit Posted October 29, 2020 Author Share Posted October 29, 2020 Hi, thanks very much for your help. Looks like a really nice community here and I'm sure I'm going to be needing a lot of help. I'll give it a bash and get back to you. G Link to comment Share on other sites More sharing options...
0 Gambit Posted October 29, 2020 Author Share Posted October 29, 2020 I'm getting a console error The requested module 'https://mydomain:5443/WebRTCAppEE/js/webrtc_adaptor.js' does not provide an export named 'WebRTCAdaptor' I've checked that the js file is there and I can access it via the browser. I've also looked and there is a WebRTCAdaptor function inside. Not sure why I'm getting this error? Thanks Link to comment Share on other sites More sharing options...
0 Gambit Posted October 29, 2020 Author Share Posted October 29, 2020 I should not that I'm adding the player to my website which is hosted in a different place to my ant server Link to comment Share on other sites More sharing options...
0 Selim Emre Posted October 29, 2020 Share Posted October 29, 2020 Hi, I sent instructions for Ant Media Server 2.2 version. Are you sure, you are using Ant Media Server 2.2 version? Best Regards, Selim Link to comment Share on other sites More sharing options...
Question
Gambit
Hi all
Link to comment
Share on other sites
Top Posters For This Question
4
2
Popular Days
Oct 29
4
Oct 26
2
Top Posters For This Question
Gambit 4 posts
Selim Emre 2 posts
Popular Days
Oct 29 2020
4 posts
Oct 26 2020
2 posts
5 answers to this question
Recommended Posts