I am creating a social network for some crowd.At there I need to add video calling and voice calling functionalities(like facebook or skype) to this site.I need to do this with PHP.Is there any api or help menu for this?
问题:
回答1:
<a href="callto://+2345634563456">Link will initiate Skype call to number</a>
<a href="skype:username?call">Link will initiate Skype call to username</a>
Easy for Skype. Don't know about Facebook.
回答2:
I'm assuming you mean that you want to run your own private video calls, not simply link to Skype calls or similar. You really have 2 options here: host it yourself, or use a hosted solution and integrate it into your product.
Self-Hosted
This is messy. This can all be accomplished with PHP, but that is probably not the most advisable solution, as it is not the best tool for the job on all sides. Flash is much more efficient at a/v capture and transport on the user end. You can try to do this without flash, but you will have headaches. HTML5 may make your life easier, but if you're shooting for maximum compatibility, flash is the simplest way to go for creating the client. Then, as far as the actual server side that will relay the audio/video, you could write a chat server in php, but you're better off using an open source project, like janenz00's mention of red5, that's already built and interfacing with it through your client (if it doesn't already have one). Or you could homebrew a flash client as mentioned before and hook it up to a flash streaming server on both sides...either way it gets complicated fast, and is beyond my expertise to help you with at all.
Hosted Service
All in, my recommendation, unless you want to administer a ridiculous setup of many complex servers and failure points is to use a hosted service like UserPlane or similar and offload all the processing and technical work to people who are good at that, and then worry about interfacing with their api and getting their client well integrated into your site. You will be a happier developer if you do.
回答3:
For a video call to work, you will need:
- A client program which can detect the webcam and mic from your system and upload (stream) to a server.
- A streaming server, which will capture the uploaded stream and relays it to the other users- red5, Wowza, Fashmedia server etc.
Looks like you are a beginner in this area. If so, try with red5, since it is opensource. They have examples of video calling.