CN114928595B - System for realizing WebRTC function based on applet platform - Google Patents

System for realizing WebRTC function based on applet platform Download PDF

Info

Publication number
CN114928595B
CN114928595B CN202210410462.5A CN202210410462A CN114928595B CN 114928595 B CN114928595 B CN 114928595B CN 202210410462 A CN202210410462 A CN 202210410462A CN 114928595 B CN114928595 B CN 114928595B
Authority
CN
China
Prior art keywords
applet
webrtc
layer
streaming media
base library
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210410462.5A
Other languages
Chinese (zh)
Other versions
CN114928595A (en
Inventor
杨涛
吴志豪
徐鹏
王滔
肖禹
钟伟光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Fantai Geek Technology Co ltd
Original Assignee
Shenzhen Fantai Geek Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Fantai Geek Technology Co ltd filed Critical Shenzhen Fantai Geek Technology Co ltd
Priority to CN202210410462.5A priority Critical patent/CN114928595B/en
Publication of CN114928595A publication Critical patent/CN114928595A/en
Application granted granted Critical
Publication of CN114928595B publication Critical patent/CN114928595B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Multimedia (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of WebRTC web instant messaging, and particularly discloses a system for realizing WebRTC functions based on an applet platform, which comprises: the system comprises an applet code layer, an applet base library and an applet mobile terminal SDK, wherein the applet base library comprises an applet base library logic layer and an applet base library view layer. The system for realizing the function of the WebRTC based on the small program platform provided by the invention provides a small program environment capable of directly running the codes of the WebRTC based on the WebRTCAPI standard and provides two standard interfaces of a Media API and an RTCPeerconnection in the WebRTC, thereby realizing the direct running of the codes of the standard WebRTC by the small program platform, supporting point-to-point communication and realizing the function of audio and video communication.

Description

System for realizing WebRTC function based on applet platform
Technical Field
The invention relates to the technical field of WebRTC web instant messaging, in particular to a system for realizing WebRTC functions based on an applet platform.
Background
WebRTC, an abbreviation for name from Web instant messaging (english: web Real-Time Communication), is an interface that supports Web browsers for Real-time voice conversations or video conversations. The bottom layer is based on SRTP (secure real-time transmission protocol) and UDP (user datagram protocol), the weak network condition optimization space is large, functions of video and audio acquisition, encoding and decoding, data transmission, audio and video display and the like are included, point-to-point communication can be achieved, delay time of two communication parties is low, and an audio and video communication application can be quickly constructed through related technologies.
In the web, the prior art scheme is based on three types of WebRTC standard APIs, namely Media API (multimedia interface), rtcp eerconnection (instant messaging connection), and Peer-to-Peer Data API (point-to-point Data interface), so that a developer can easily develop a web application similar to network video chat.
The prior art scheme is that a mobile phone client uses a conventional webpage loading mode to render a webpage by generating Webview (a container for loading the webpage), and uses WebRTC (instant messaging connection function) to establish communication on the webpage so as to connect to a remote client. The current prior art adopts webview limited by mobile phone system version, and higher version is needed to support at the iOS end, and more fragmentation problems exist at An Zhuoduan due to serious fragmentation.
On the applet platform, the interface of the WebRTC standard cannot be directly used, the implementation of the audio and video application is limited to a certain extent, and WebRTC codes on the web page cannot be run in the applet.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention provides a system for realizing the function of the WebRTC based on the applet platform, which solves the problems that the interface of the WebRTC standard cannot be directly used on the applet platform, the implementation of the audio and video application is limited to a certain extent, and the WebRTC code on the webpage cannot run in the applet in the prior art.
As a first aspect of the present invention, there is provided a system for implementing WebRTC functions based on an applet platform, including: the system comprises an applet code layer, an applet base library and an applet mobile terminal SDK, wherein the applet base library comprises an applet base library logic layer and an applet base library view layer;
the applet code layer is used for storing WebRTC codes input by a user;
the applet base logic layer is configured to, when receiving a WebRTC function call request input by a user, call the WebRTC code from the applet code layer, package a WebRTC function related parameter, a server address, and a WebRTC code call method name input by the user into a WebRTC function call data block, and send the WebRTC function call data block to the applet mobile terminal SDK;
the small program mobile terminal SDK is used for generating a WebRTC function connection when receiving the WebRTC function call data block; executing corresponding interface logic according to the name of the WebRTC code calling method in the WebRTC function calling data block, inputting relevant parameters of the WebRTC function and a server address, creating a WebRTC function, and then establishing a binding relation with the connection of the WebRTC function; and returning the streaming media data and streaming media ID to the applet base logic layer;
the applet base logic layer is used for returning the streaming media data and the streaming media ID to the applet code layer;
the applet code layer is used for acquiring the streaming media ID and sending the streaming media ID to the applet base library view layer;
the applet base library view layer is used for creating a video and audio applet component according to the streaming media ID and transmitting the video and audio applet component and the streaming media ID to the applet mobile terminal SDK;
and the applet mobile terminal SDK is used for rendering and displaying the video and audio applet components on the applet code layer according to the streaming media ID when receiving the component rendering request sent by the applet code layer, and playing corresponding streaming media data until the applet code layer realizes audio and video display.
Further, the WebRTC code includes related methods of rtcp eerconnection and MediaDevices interfaces.
Further, two API interfaces, rtcp oerconnection and MediaDevices, are implanted in the applet base library.
Further, the WebRTC function-related parameters include a server account password and whether to open an audio or video.
Further, the applet base library logic layer comprises a JSBridge module, and information is transferred between the applet base library logic layer and the applet mobile terminal SDK through the JSBridge module.
Further, the streaming media data includes a video stream and an audio stream.
The system for realizing the WebRTC function based on the applet platform has the following advantages: based on the WebRTC API standard, an applet environment capable of directly running the WebRTC codes is provided, and two standard interfaces of a Media API and an RTCPeerconnection in the WebRTC are provided, so that the applet platform can directly run the codes of the standard WebRTC, support point-to-point communication and realize the function of audio and video communication.
Drawings
The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate the invention and together with the description serve to explain, without limitation, the invention.
Fig. 1 is a schematic structural diagram of a system for implementing WebRTC function based on a applet platform according to the present invention.
Detailed Description
In order to further describe the technical means and effects adopted by the invention to achieve the preset aim, the following detailed description refers to the specific implementation, structure, characteristics and effects of the system for realizing WebRTC function based on the applet platform according to the invention, which are provided by the invention, with reference to the accompanying drawings and the preferred embodiments. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the invention herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the explanation of the present invention, it should be noted that the terms "mounted," "connected," and "connected" are to be construed broadly, unless otherwise indicated. For example, the connection may be a fixed connection, or may be a connection through a special interface, or may be an indirect connection via an intermediary. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art.
In this embodiment, a system for implementing WebRTC function based on a small program platform is provided, and fig. 1 is a schematic structural diagram of the system for implementing WebRTC function based on a small program platform provided by the present invention, as shown in fig. 1, where the system for implementing WebRTC function based on a small program platform includes: the system comprises an applet code layer, an applet base library and an applet mobile terminal SDK, wherein the applet base library comprises an applet base library logic layer and an applet base library view layer;
the applet code layer is used for storing WebRTC codes input by a user;
the applet base logic layer is configured to, when receiving a WebRTC function call request input by a user, call the WebRTC code from the applet code layer, package a WebRTC function related parameter, a server address, and a WebRTC code call method name input by the user into a WebRTC function call data block, and send the WebRTC function call data block to the applet mobile terminal SDK;
the small program mobile terminal SDK is used for generating a WebRTC function connection when receiving the WebRTC function call data block; executing corresponding interface logic according to the name of the WebRTC code calling method in the WebRTC function calling data block, inputting relevant parameters of the WebRTC function and a server address, creating a WebRTC function, and then establishing a binding relation with the connection of the WebRTC function; and returning the streaming media data and streaming media ID to the applet base logic layer;
it should be noted that, the applet mobile terminal SDK is an applet environment running in the APP, and based on google WebRTC standard library (google web instant messaging processing library), standard WebRTC interfaces such as Media API and rtcp eerconnection are implemented.
The applet base logic layer is configured to return the streaming media data and streaming media ID (unique identification) to the applet code layer;
the applet code layer is used for acquiring the streaming media ID and sending the streaming media ID to the applet base library view layer;
the applet base library view layer is used for creating a video and audio applet component according to the streaming media ID and transmitting the video and audio applet component and the streaming media ID to the applet mobile terminal SDK;
and the applet mobile terminal SDK is used for rendering and displaying the video and audio applet components on the applet code layer according to the streaming media ID when receiving the component rendering request sent by the applet code layer, and playing corresponding streaming media data until the applet code layer realizes audio and video display.
Preferably, the WebRTC code includes a related method of rtcp eerconnection and MediaDevices interfaces.
Preferably, two API interfaces, rtcp oerconnection and MediaDevices, are implanted in the applet base library. The applet base library is an execution environment of applet codes, in which all WebRTC codes are run, and based on this execution environment, two APIs (interfaces) of rtcp connection and MediaDevices are implanted in the global (applet base library).
It should be noted that an rtcp connection object allows a user to directly communicate between two browsers.
Preferably, the WebRTC function related parameters include a server account password and whether to turn on an audio or video.
Preferably, the applet base library logic layer comprises a JSBridge module, and information is transferred between the applet base library logic layer and the applet mobile terminal SDK through the JSBridge module.
It should be understood that the JSBridge module is a communication module between the applet mobile terminal SDK and the applet base library.
Preferably, the streaming media data includes a video stream and an audio stream.
Specifically, applet code layer: applet code representing the user; applet base library view layer: the module for managing the view assembly is responsible for generating, updating and destroying the view assembly; applet base library logic layer: the system is used for maintaining the state, data and the like of the WebRTC instance, and processing the call and the forwarding of the interface; applet mobile terminal SDK: and the method is responsible for generating the WebRTC instance, processing the event sent by the base library and maintaining the connection logic.
The system for realizing the WebRTC function based on the small program platform provided by the invention provides a small program environment capable of directly running WebRTC codes based on the WebRTC API standard, provides two standard interfaces of a Media API and an RTCPeerconnection in the WebRTC, and realizes the WebRTC communication at an APP end by using a small program mobile terminal SDK, thereby realizing the direct running of the standard WebRTC codes of the small program platform, supporting point-to-point communication and realizing the audio and video communication function.
The present invention is not limited to the above-mentioned embodiments, but is not limited to the above-mentioned embodiments, and any simple modification, equivalent changes and modification made to the above-mentioned embodiments according to the technical matters of the present invention can be made by those skilled in the art without departing from the scope of the present invention.

Claims (6)

1. A system for implementing WebRTC functionality based on an applet platform, comprising: the system comprises an applet code layer, an applet base library and an applet mobile terminal SDK, wherein the applet base library comprises an applet base library logic layer and an applet base library view layer;
the applet code layer is used for storing WebRTC codes input by a user;
the applet base logic layer is configured to, when receiving a WebRTC function call request input by a user, call the WebRTC code from the applet code layer, package a WebRTC function related parameter, a server address, and a WebRTC code call method name input by the user into a WebRTC function call data block, and send the WebRTC function call data block to the applet mobile terminal SDK;
the small program mobile terminal SDK is used for generating a WebRTC function connection when receiving the WebRTC function call data block; executing corresponding interface logic according to the name of the WebRTC code calling method in the WebRTC function calling data block, inputting relevant parameters of the WebRTC function and a server address, creating a WebRTC function, and then establishing a binding relation with the connection of the WebRTC function; and returning the streaming media data and streaming media ID to the applet base logic layer;
the applet base logic layer is used for returning the streaming media data and the streaming media ID to the applet code layer;
the applet code layer is used for acquiring the streaming media ID and sending the streaming media ID to the applet base library view layer;
the applet base library view layer is used for creating a video and audio applet component according to the streaming media ID and transmitting the video and audio applet component and the streaming media ID to the applet mobile terminal SDK;
and the applet mobile terminal SDK is used for rendering and displaying the video and audio applet components on the applet code layer according to the streaming media ID when receiving the component rendering request sent by the applet code layer, and playing corresponding streaming media data until the applet code layer realizes audio and video display.
2. The applet platform based system according to claim 1 wherein the WebRTC code comprises related methods of rtc connection and MediaDevices interfaces.
3. The system for implementing WebRTC functions based on an applet platform according to claim 1, wherein the applet base library is embedded with two API interfaces, rtcp eerconnection and MediaDevices.
4. The system for implementing WebRTC functions based on the applet platform according to claim 1, wherein the WebRTC function related parameters include a server account password and whether to turn on an audio-video.
5. The system for implementing WebRTC functions based on an applet platform according to claim 1, wherein the applet base library logic layer comprises a JSBridge module through which information is transferred between the applet base library logic layer and the applet mobile side SDK.
6. The system for implementing WebRTC functionality based on the applet platform of claim 1, wherein the streaming media data includes a video stream and an audio stream.
CN202210410462.5A 2022-04-19 2022-04-19 System for realizing WebRTC function based on applet platform Active CN114928595B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210410462.5A CN114928595B (en) 2022-04-19 2022-04-19 System for realizing WebRTC function based on applet platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210410462.5A CN114928595B (en) 2022-04-19 2022-04-19 System for realizing WebRTC function based on applet platform

Publications (2)

Publication Number Publication Date
CN114928595A CN114928595A (en) 2022-08-19
CN114928595B true CN114928595B (en) 2024-04-02

Family

ID=82806194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210410462.5A Active CN114928595B (en) 2022-04-19 2022-04-19 System for realizing WebRTC function based on applet platform

Country Status (1)

Country Link
CN (1) CN114928595B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200482A (en) * 2018-01-16 2018-06-22 威创集团股份有限公司 A kind of cross-platform high resolution audio and video playback method, system and client
CN110535871A (en) * 2019-09-09 2019-12-03 焦点教育科技有限公司 A kind of classroom real-time video projecting method and system based on WebRTC
CN111356024A (en) * 2020-03-11 2020-06-30 厦门亿合恒拓信息科技有限公司 Online video communication method and storage medium for webpage end and wechat applet end

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108200482A (en) * 2018-01-16 2018-06-22 威创集团股份有限公司 A kind of cross-platform high resolution audio and video playback method, system and client
CN110535871A (en) * 2019-09-09 2019-12-03 焦点教育科技有限公司 A kind of classroom real-time video projecting method and system based on WebRTC
CN111356024A (en) * 2020-03-11 2020-06-30 厦门亿合恒拓信息科技有限公司 Online video communication method and storage medium for webpage end and wechat applet end

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于WebRTC的视频会议系统开发;石芮;成洪豪;孙立民;;智能计算机与应用(第06期);全文 *

Also Published As

Publication number Publication date
CN114928595A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
CN111479121B (en) Live broadcasting method and system based on streaming media server
CN102754387B (en) The system and method for multimedia conferencing is carried out between the telephone plant allowing UPnP and WAN equipment
KR102148046B1 (en) Calling an unready terminal
CN105407369A (en) Web application based terminal communication method and device
US20130067559A1 (en) INSTANT INTERNET BROWSER BASED VoIP SYSTEM
WO2020177698A1 (en) Inter-mini program platform communication method and device, and computer storage medium
CN103533460A (en) Method, device, terminal and system for sharing television service
US20070136449A1 (en) Update notification for peer views in a composite services delivery environment
CN108696899B (en) SIP message transmitting and receiving method and transmitting and receiving device
CN103069755A (en) Instant messaging using multiple instances of a client
US8005934B2 (en) Channel presence in a composite services enablement environment
US9560681B2 (en) Method and device for establishing a communication
CN105516935A (en) Platform integrated decision method and device of RCS (Rich Communication Suite) and traditional information service and terminal
US20070133511A1 (en) Composite services delivery utilizing lightweight messaging
CN1984373A (en) System and method for providing multimedia contents in a communication system
CN110113298B (en) Data transmission method, device, signaling server and computer readable medium
CN114928595B (en) System for realizing WebRTC function based on applet platform
CN108337306A (en) Equipment finding method, device, system, terminal and storage medium
CN112839192A (en) Audio and video communication system and method based on browser
CN112714131A (en) Cross-platform microphone connecting method and device, storage medium and electronic equipment
US20140375746A1 (en) Platform, device and method for enabling micro video communication
CN103973656A (en) Method and system for judging terminal states, and RCS-e (rich communication suite-e) server
US11456983B2 (en) Interactive operation method, and transmitter machine, receiver machine and interactive operation system using the same
CN115361364B (en) Data transmission method of communication protocol based on WebRTC
CN115174552B (en) Local area network communication and file transmission method and system based on WEB operating system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant