摘要 |
The present invention belongs to the field of network technology, and in particular, relates to a method for implementing p2p video communication on webpage, which includes the following steps: a user accessing a webpage, loading a flash, and a webpage script calling the flash interface to connect to a socket server; the flash connecting to a stratus server to acquire a key and monitoring received messages; the flash sending the user name and the key to the socket server to store; the flash of the source user and the flash of the target user establishing a direct connection by using the key; the source user and the target user acquiring a video source of a local camera respectively, sending the video source to the counterpart through the established connection, and meanwhile, acquiring and displaying the video stream from the counterpart. The method can realize p2p based video communication on webpage, which not only largely saves the bandwidth cost of the operator, but also greatly improves the smoothness of the video communication between users.
|