CN103702238B - A kind of multi-screen video sharing method and terminal, server - Google Patents

A kind of multi-screen video sharing method and terminal, server Download PDF

Info

Publication number
CN103702238B
CN103702238B CN201310719853.6A CN201310719853A CN103702238B CN 103702238 B CN103702238 B CN 103702238B CN 201310719853 A CN201310719853 A CN 201310719853A CN 103702238 B CN103702238 B CN 103702238B
Authority
CN
China
Prior art keywords
terminal
video
server
address information
sent
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
CN201310719853.6A
Other languages
Chinese (zh)
Other versions
CN103702238A (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.)
Honor Device Co Ltd
Original Assignee
Huawei Device 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 Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN201310719853.6A priority Critical patent/CN103702238B/en
Publication of CN103702238A publication Critical patent/CN103702238A/en
Application granted granted Critical
Publication of CN103702238B publication Critical patent/CN103702238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Embodiment of the invention discloses that a kind of multi-screen video sharing method and terminal, server, are related to communication technical field.Methods described includes:First terminal establishes websocket data transmission channels with server, and obtains the address information that at least one second terminal that websocket is connected is established with the server;The first terminal receives the video address information that at least one second terminal is sent via the server by the websocket data transmission channels;The first terminal obtains the video according to the video address information from the server.Terminal obtains video address information by establishing websocket data transmission channels with server, and the terminal receives Media Stream by browser, plays video so that terminal no longer needs to install client software, improves the video sharing efficiency between each equipment.

Description

A kind of multi-screen video sharing method and terminal, server
Technical field:
Communication technical field of the present invention, more particularly to a kind of multi-screen video sharing method and terminal, server.
Background technology:
The progress of Internet technology and the diversified development of terminal electronic device, the work life of great convenience people It is living.Such as in our Working Life, it is sometimes desirable to which the video frequency program played in an equipment is pushed directly to Played on miscellaneous equipment, the video frequency program for sometimes needing play on miscellaneous equipment again, which is moved to return in this equipment, to be broadcast Put.In the prior art, to realize the mutual push-and-pull of video frequency program between multiple this equipment, the end in various forms is generally required The client software specified is installed on end, then carries out the operation of multi-screen interactive.Such as in DLNA(DIGITAL LIVING NETWORK ALLIANCE)In technology, if realizing the video push-and-pull between mobile phone and TV by multi-screen interactive accessory WiPlug, Need to download WiPlug clients on mobile phone, projected the screen of mobile phone on TV by WiPlug clients, and control The video playback of TV.
But due to the operating system of terminal(Operating System, OS), hardware etc. it is widely different, client software Developer often develops the client software of variform, client of the user plane to variform for the application needs of adaptation terminal Hold software often at a loss as to what to do, be able to can not also be installed because client software is more complicated, and then can not realize between each equipment Video share.
The content of the invention:
The invention provides a kind of multi-screen video sharing method and terminal, server, to improve the video between each equipment Sharing efficiency.
In a first aspect, the invention provides a kind of one embodiment of multi-screen video sharing method.
In the first possible implementation, methods described includes:First terminal establishes webpage socket with server Agreement websocket data transmission channels, and obtain at least one second end established websocket with the server and be connected The address information at end;
The first terminal receives at least one second terminal warp by the websocket data transmission channels The video address information sent by the server;The video address information is used to indicate that at least one second terminal is worked as Position of the video of preceding broadcasting on the server;
The first terminal obtains the video according to the video address information from the server.
The first possible implementation with reference to first aspect, in second of possible implementation, described first eventually End establishes websocket data transmission channels with server and is specially:
First terminal sends websocket handshake requests to server;
The first terminal receives the handshake response that the server is sent;The handshake response is the server to institute State the response to the websocket handshake requests of first terminal transmission;The handshake response is included and built with the server The address information of at least one second terminal of vertical websocket connections.
With reference to first aspect the first or second of possible implementation, in the third possible implementation, It is described before the first terminal receives the video address information that at least one second terminal is sent via the server Method also includes:
The first terminal is according to the address information, by the websocket data transmission channels, via the clothes Device be engaged in the request of second terminal transmission first, to ask the second terminal to send out the address information of currently playing video It is sent to the first terminal;
The first terminal receives the agreement described first that at least one second terminal is sent via the server The response message of request.
With reference to first aspect the first or second or the third possible implementation, the 4th kind of possible realization side In formula, the video address information that the first terminal receives is URL(Uniform Resource Locator, URL);According to the video address information, obtain the video from the server is specially the first terminal:
The first terminal establishes video link according to the URL and the server, receives what the server was sent The video flowing of the video.
With reference to first aspect the first or second or the third or the 4th kind of possible implementation, in the 5th kind of possibility Implementation in, after the broadcasting that the first terminal completes the video, methods described also includes:
The first terminal closes the websocket data transmission channels established with the server.
Second aspect, the invention provides a kind of one embodiment of multi-screen video sharing method.
In the first possible implementation, methods described includes:First terminal establishes websocket numbers with server According to transmission channel, and obtain the address information that at least one second terminal that websocket is connected is established with the server;
The first terminal is by the websocket data transmission channels, via the server to described at least one Individual second terminal sends video address information;The video address information is used to indicate the currently playing video of the first terminal In the position of the server.
The first possible implementation with reference to second aspect, in second of possible implementation, described first eventually End establishes websocket data transmission channels with server and is specially:
First terminal sends websocket handshake requests to server;
The first terminal receives the handshake response that the server is sent;The handshake response is the server to institute State the response to the websocket handshake requests of first terminal transmission;The handshake response includes to be connected with the server The address information of at least one second terminal connect.
With reference to second aspect the first or second of possible implementation, in the third possible implementation, The first terminal is whole to described at least one second via the server by the websocket data transmission channels Before end sends video address information, methods described also includes:
The first terminal is according to the address information, by the websocket data transmission channels, via the clothes Device of being engaged in sends the second request at least one second terminal, with request by the first terminal by currently playing video Address information is sent at least one second terminal;
The first terminal receives the response message for agreement second request that at least one second terminal is sent.
With reference to second aspect the first or second or the third possible implementation, the 4th kind of possible realization side In formula, after the transmission that the first terminal completes the video address information, methods described also includes:
The first terminal closes the websocket data transmission channels established with the server.
The third aspect, the invention provides a kind of one embodiment of multi-screen video sharing method.
In the first possible implementation, methods described includes:Server establishes websocket numbers with first terminal According to transmission channel, and at least one second end established websocket with the server and be connected is sent to the first terminal The address information at end;
The server receives the video address information that at least one second terminal is sent, and to the first terminal Send video address information;The video address information is used to indicate that the currently playing video of at least one second terminal exists The position of the server;
The server receives request of the first terminal according to the video address acquisition of information video, to described the One terminal sends the video.
The first possible implementation with reference to the third aspect, in second of possible implementation, the server Websocket data transmission channels are established with first terminal, and sends to the first terminal and is established with the server The address information of at least one second terminal of websocket connections is specially:
The server receives the websocket handshake requests that the first terminal is sent;
The server sends handshake response to the first terminal;The handshake response is the server to described the The response to the websocket handshake requests that one terminal is sent;The handshake response includes to be established with the server The address information of at least one second terminal of websocket connections.
With reference to the third aspect the first or second of possible implementation, in the third possible implementation, Before the server receives the video address information that at least one second terminal is sent, methods described also includes:
The server receives the 3rd that the first terminal is sent by the websocket data transmission channels please Ask, and the 3rd request is sent at least one second terminal;Described 3rd ask be used for ask it is described at least one The address information of currently playing video is sent to the first terminal by second terminal;
The server receives the response message for agreement the 3rd request that at least one second terminal is sent, and The response message is sent to the first terminal.
With reference to the third aspect the first or second or the third possible implementation, the 4th kind of possible realization side In formula,
The video address information is URL;The server receives the first terminal according to the video address information The request of video is obtained, sending the video to the first terminal is specially:
The server receives request of the first terminal according to the video address acquisition of information video, with described the One terminal establishes video link corresponding with the URL, and the video flowing of the video is sent to the first terminal.
Fourth aspect, the invention provides a kind of one embodiment of multi-screen video sharing method.
In the first possible implementation, methods described includes:Server establishes websocket numbers with first terminal According to transmission channel, and at least one second end established websocket with the server and be connected is sent to the first terminal The address information at end;
The server receives the video address information that the first terminal is sent, and at least one second terminal Send the video address information;The video address information is used to indicate the currently playing video of the first terminal described The position of server;
The server receives request of at least one second terminal according to the video address acquisition of information video, The video is sent at least one second terminal.
The first possible implementation with reference to fourth aspect, in second of possible implementation, the server Websocket data transmission channels are established with first terminal, and sends to the first terminal and is established with the server The address information of at least one second terminal of websocket connections is specially:
The server receives the websocket handshake requests that the first terminal is sent;
The server sends handshake response to the first terminal;The handshake response is the server to described the The response to the websocket handshake requests that one terminal is sent;The handshake response includes to be established with the server The address information of at least one second terminal of websocket connections.
With reference to fourth aspect the first or second of possible implementation, in the third possible implementation, Before the server receives the video address information that the first terminal is sent, methods described also includes:
The server receives the 4th that the first terminal is sent by the websocket data transmission channels please Ask, and the 4th request is sent at least one second terminal;Described 4th asks to be used to ask described the The address information of the currently playing video of one terminal is sent at least one second terminal;
The server receives the response message for agreement the 4th request that at least one second terminal is sent, and The response message is sent to the first terminal.
With reference to fourth aspect the first or second or the third possible implementation, the 4th kind of possible realization side In formula, the video address information is URL;The server receives at least one second terminal according to the video address The request of acquisition of information video, sending the video at least one second terminal is specially:
The server receives request of at least one second terminal according to the video address acquisition of information video, Video link corresponding with the URL is established with least one second terminal, is sent at least one second terminal The video flowing of the video.
5th aspect, the invention provides a kind of one embodiment of terminal.
In the first possible implementation, the terminal includes:Connection unit, for being established with server Websocket data transmission channels;
Acquiring unit, the ground at least one second terminal that websocket is connected is established with the server for obtaining Location information;According to video address information, video is obtained from the server;
Receiving unit, for by the websocket data transmission channels, receiving at least one second terminal warp The video address information sent by the server;The video address information is used to indicate that at least one second terminal is worked as Position of the video of preceding broadcasting on the server.
With reference to the 5th aspect the first possible implementation, in second of possible implementation, the terminal is also Including:
Transmitting element, for before the receiving unit receives video address information, according to the address information, passing through The websocket data transmission channels, the 5th request is sent to the second terminal via the server, with described in request The address information of currently playing video is sent to the first terminal by second terminal;
The receiving unit is additionally operable to, and receives the sound for agreement the 5th request that at least one second terminal is sent Answer message.
With reference to the 5th aspect the first or second of possible implementation, in the third possible implementation, institute The video address information for stating receiving unit reception is URL;
The connection unit is additionally operable to, and video link is established according to the URL and the server;
According to video address information, obtain video from the server is specially the acquiring unit:
The acquiring unit obtains the video flowing for the video that the server is sent according to the video link.
With reference to the 5th aspect the first or second or the third possible implementation, the 4th kind of possible realization side In formula, the connection unit is additionally operable to, and after the acquiring unit obtains video, closes what is established with the server Websocket data transmission channels.
6th aspect, the invention provides a kind of one embodiment of terminal.
In the first possible implementation, the terminal includes:Connection unit, is used for and server
Establish websocket data transmission channels;
Acquiring unit, the ground at least one second terminal that websocket is connected is established with the server for obtaining Location information;
Transmitting element, for by the websocket data transmission channels, via the server to described at least one Individual second terminal sends video address information;The video address information is used to indicate the currently playing video of the first terminal In the position of the server
With reference to the 6th aspect the first possible implementation, in second of possible implementation, it is described send it is single Member is additionally operable to, and before video address information is sent, according to the address information, is led to by the websocket data transfers Road, the 6th request is sent to the second terminal via the server, will be currently playing by the first terminal with request The address information of video is sent at least one second terminal;
The terminal also includes:
Receiving unit, the response of agreement the 6th request sent for receiving at least one second terminal disappear Breath.
With reference to the 6th aspect the first possible implementation, in the third possible implementation, the connection is single Member is additionally operable to, and after the transmission that the transmitting element completes the video address information, is closed and the server Websocket data transmission channels.
7th aspect, the invention provides a kind of one embodiment of server.
In the first possible implementation, the server includes:Connection unit, for first
Terminal establishes websocket data transmission channels;
Acquiring unit, the ground at least one second terminal that websocket is connected is established with the server for obtaining Location information;
Transmitting element, for sending establish that websocket is connected with server at least one the to the first terminal The address information of two terminals;The video address information is sent to the first terminal;The video address information is used to indicate The currently playing video of at least one second terminal is in the position of the server;Video is sent to the first terminal;
Receiving unit, receive the video address information that at least one second terminal is sent;Receive the first terminal According to the request of the video address acquisition of information video.
With reference to the 7th aspect the first possible implementation, in second of possible implementation, it is described receive it is single Member is additionally operable to, receive the first terminal by the websocket data transmission channels send the 7th request, the described 7th Ask for asking at least one second terminal that the address information of currently playing video is sent into the first terminal; Receive the response message for agreement the 7th request that at least one second terminal is sent;
The transmitting element is additionally operable to, and the 7th request is sent at least one second terminal;To described first Terminal sends the response message.
With reference to the 7th aspect the first or second of possible implementation, in the third possible implementation, institute The video address information for stating transmitting element transmission is URL;
The connection unit is additionally operable to, and video link corresponding with the URL is established with the first terminal;
The transmitting element sends the video to the first terminal:
The transmitting element is by the video link, to the video flowing of the first terminal transmission video.
Eighth aspect, the invention provides a kind of one embodiment of server.
In the first possible implementation, the server includes:Connection unit, for being established with first terminal Websocket data transmission channels;
Acquiring unit, the ground at least one second terminal that websocket is connected is established with the server for obtaining Location information;
Transmitting element, for the first terminal send it is described websocket is established with server and is connected at least one The address information of individual second terminal;The video address information is sent at least one second terminal;The video address Information is used to indicate the currently playing video of the first terminal in the position of the server;To described at least one second eventually End sends the video.
Receiving unit, receive the video address information that the first terminal is sent;Receive at least one second terminal According to the request of the video address acquisition of information video.
The first possible implementation with reference to eighth aspect, it is described to receive list in second of possible implementation Member is additionally operable to, before the video address information that the first terminal is sent is received, receive the first terminal pass through it is described The 8th request that websocket data transmission channels are sent, the described 8th asks to be used to ask to work as the first terminal The address information of the video of preceding broadcasting is sent at least one second terminal;At least one second terminal is received to send Agreement it is described 4th request response message;
The transmitting element is additionally operable to, and the 8th request is sent at least one second terminal;To described first Terminal sends the response message.
With reference to eighth aspect the first or second of possible implementation, in the third possible implementation, institute The video address information for stating transmitting element transmission is URL;
The connection unit is additionally operable to, and video link corresponding with the URL is established with least one second terminal;
The transmitting element sends the video at least one second terminal:
The transmitting element is by the video link, to the video of at least one second terminal transmission video Stream.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.
Brief description of the drawings:
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art The required accompanying drawing used is briefly described, it should be apparent that, drawings in the following description are only some realities of the present invention Example is applied, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to these accompanying drawings Obtain other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of multi-screen video sharing method one embodiment provided by the invention;
Fig. 2 is a kind of schematic flow sheet of multi-screen video sharing method one embodiment provided by the invention;
Fig. 3 is a kind of schematic flow sheet of multi-screen video sharing method one embodiment provided by the invention;
Fig. 4 is a kind of schematic flow sheet of multi-screen video sharing method one embodiment provided by the invention;
Fig. 5 is a kind of structural representation of the embodiment of terminal provided by the invention;
Fig. 6 is a kind of structural representation of the embodiment of terminal provided by the invention;
Fig. 7 is a kind of structural representation of the embodiment of server provided by the invention;
Fig. 8 is a kind of structural representation of the embodiment of server provided by the invention.
Embodiment:
Embodiment one
The embodiments of the invention provide a kind of multi-screen video sharing method, as shown in figure 1, methods described includes:
S101, first terminal and server establish webpage socket protocol websocket data transmission channels, and obtain with The server establishes the address information of at least one second terminal of websocket connections;
The first terminal runs browser, and the browser is supports HTML5 browser, such as chrome browsers Deng.The first terminal is established websocket with server by browser and is connected, and establishes websocket data transmission channels. The first terminal is obtained at least by the websocket data transmission channels established with server at the server The address information of one second terminal.At least one second terminal is equally established websocket with the server and is connected, Establish websocket data transmission channels.The address information of at least one second terminal can be described at least one the The IP address of two terminals, host name etc..The server obtains the information such as the IP address of the first terminal, host name.
S102, the first terminal receive described at least one second eventually by the websocket data transmission channels The video address information that end is sent via the server;The video address information is used to indicate described at least one second eventually Hold position of the currently playing video on the server;
Specifically, at least one second terminal obtains the address information of the first terminal.Described at least one Address information of the currently playing video on the server is sent to described first eventually by two terminals via the server End.At least one second terminal and the server establish websocket data transmission channels, and described at least one second Terminal can be sent the video information to server by the websocket data transmission channels established with server, by taking Business device by the websocket data transmission channels that the server and the first terminal are established by the video information send to First terminal.The video address information can be that the unified resource of at least one second terminal current live video positions Symbol(Uniform Resource Locator, URL)Or channel number information;Or the video information can also be described At least one second terminal is by the URL of current order video;The parameters such as the reproduction time of current video can also be included.
S103, the first terminal obtain the video according to the video address information from the server.
After the first terminal obtains the video address information, the data of the video are obtained from the server, And play the video.The video data can transmit according to http protocol.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the first terminal establishes websocket data with server Transmission channel sends handshake request by first terminal and responds the handshake request realization with server.Specifically, described first Terminal sends websocket handshake requests by browser to the server, and the websocket handshake requests can include The IP address of the first terminal, host name etc..The websocket that the server reception first terminal is sent shakes hands please Ask, obtain IP address, host name of the first terminal etc..The server parses the websocket handshake requests and produced Raw handshake response.The server sends the handshake response to the first terminal, realizes successful handshake, establishes Websocket data transmission channels.The handshake response that the server is sent can include server acquisition and the service The address information of at least one second terminal of device connection, such as IP address, host name.At least one second terminal and institute State server and establish websocket data transmission channels.Specifically, first terminal sends handshake request to server end, described Handshake request can be format.The data format can be according to " protocol header, field one, field seperator, field 2nd, the form arrangement of field seperator ... ".The protocol header, field, field seperator are the ascii character that can be shown. The protocol header is used to distinguish each different pieces of information bag.The field is made up of two parts of field keys and data.It is described The protocol header of the data format of handshake request can be " start " or " begin ", for showing that notebook data form is Handshake request.Field in the embodiment of the present invention can have two kinds of forms:One is the device name " name " of first terminal, if The terminal device does not have title, then without this field.Secondly be device type " device ", such as " PC ", " Pad ", " Phone ", " IPClient " " MediaServer " etc..The field of the data format of the handshake request is added with field seperator To distinguish.The first terminal sends the handshake request comprising the protocol header and the field to server, request and clothes Business device establishes websocket connections.The server receives the handshake request of the first terminal, parses the handshake request After data format, the response message for the handshake request is sent to the terminal.The response message is specific data lattice Formula, the data format can arrange according to the form of " protocol header, field one, field seperator, field two, field seperator ... " Row.The protocol header of the response message data format can be " list ", indicate all devices title for signing in server end List.The protocol header of the response message data format can be " NtDm ", indicate sign in server end all devices name, IP、hostname." list " or " NtDm " protocol header is used to represent that the message of notebook data form to be to the first terminal The response message of handshake request.The response message that the first terminal the reception server is sent, established with the server Websocket connections.Related data is transmitted by the websocket data transmission channels, has saved Internet resources.
In a kind of implementation of the embodiment of the present invention, at least one second terminal is received in the first terminal Before the video address information sent via the server, the first terminal can be according at least one second terminal Address information, by the websocket data transmission channels, sending first to the second terminal via the server please Ask, to ask the second terminal that the address information of currently playing video is sent into the first terminal;Described first eventually End receives the response message for agreement first request that at least one second terminal is sent via the server.
Specifically, the first terminal is by the websocket data transmission channels established with the server, via institute State server at least one second terminal send by the currently playing video push of at least one second terminal to The request of the first terminal, i.e., described first terminal pull described at least one second eventually at least one second terminal Hold the request of currently playing video.Described first request is first passed through websocket data transmission channels hair by the first terminal Server is delivered to, the websocket data transfers established by server by the server with least one second terminal Passage sends the first request at least one second terminal.The protocol header of the data format of the request can be " push ", The first request for showing notebook data form is that request at least one second terminal arrives currently playing video push The first terminal.The field of first request can include four parts, first, field " dest ", represents target device name Claim, i.e. first terminal;Second, field " data ", for representing video information, such as the URL of video flowing id or video;Its Three, field " type ", for representing that the video is live or recorded broadcast;Fourth, field " device ", for representing equipment class Type, such as " device ", such as " PC ", " Pad ", " Phone ", " IP Client " " MediaServer " etc..Specifically, it is described extremely The protocol header of the data format receiveed the response for the first request that a second terminal is sent to the first terminal can be less " recv ", the message for representing notebook data form are the responses to the described first request.The data format receiveed the response Field may include two parts, first, field " data ", for representing the id of the video flowing or URL of the video;Second, Field " type ", for representing that the video is live or recorded broadcast.
After at least one second terminal receives first request, sent out via the server to the first terminal Send the response message for agreeing to first request.
In a kind of implementation of the embodiment of the present invention, the video address information that the first terminal receives provides to be unified Source finger URL(Uniform Resource Locator, URL), the first terminal builds according to the URL and the server Vertical video link, receive the video flowing for the video that the server is sent.Specifically, described in the first terminal obtains After URL, video data request is sent to the server according to the URL.The first terminal establishes video link with server The video stream of video corresponding to the URL to the first terminal, the first terminal are received institute by road, the server State the video flowing of the video of server transmission.The video flowing can be transport stream(Transport Stream, TS).Institute Stating video flowing can be sent by http protocol.After the first terminal receives the video flowing, it is corresponding to play the video flowing Video.
In the above-mentioned implementation of the embodiment of the present invention, after the broadcasting that the first terminal completes the video, institute Stating method also includes:The first terminal closes the websocket data transmission channels with the server.
Embodiment two
The embodiments of the invention provide a kind of multi-screen video sharing method, as shown in Fig. 2 methods described includes:
S201, first terminal establish websocket data transmission channels by browser and server, obtain and the clothes Business device establishes the address information of at least one second terminal of websocket connections;
S202, the first terminal by the websocket data transmission channels, via the server to it is described extremely A few second terminal sends video address information;The video address information is used to indicate that the first terminal is currently playing Video is in the position of the server.
Specifically, the first terminal obtains the address information of at least one second terminal.The first terminal can The video address information is sent to server by the websocket data transmission channels established with server, by servicing Device is by the server and the websocket data transmission channels that at least one second terminal is established by the video information Send at least one second terminal.The video address information can be at least one second terminal current live video URL or channel number information;Or the video information can also be that at least one second terminal regards current program request The URL of frequency;The parameters such as the reproduction time of current video can also be included.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the first terminal establishes websocket data with server Transmission channel sends handshake request by first terminal and responds the handshake request realization with server.Specifically, described first Terminal sends websocket handshake requests by browser to the server, and the websocket handshake requests can include The IP address of the first terminal, host name etc..The websocket that the server reception first terminal is sent shakes hands please Ask, obtain IP address, host name of the first terminal etc..The server parses the websocket handshake requests and produced Raw handshake response.The server sends the handshake response to the first terminal, realizes successful handshake, establishes Websocket data transmission channels.The handshake response that the server is sent can include server acquisition and the service The address information of at least one second terminal of device connection, such as IP address, host name.At least one second terminal and institute State server and establish websocket data transmission channels.
In a kind of implementation of the embodiment of the present invention, passed in the first terminal by the websocket data Defeated passage, before sending video address information at least one second terminal via the server, the first terminal According to the address information of at least one second terminal, by the websocket data transmission channels, via the service Device sends the second request at least one second terminal, with request by the first terminal by the ground of currently playing video Location information is sent at least one second terminal;The first terminal receives the same of at least one second terminal transmission Anticipate it is described second request response message.Specifically, the first terminal passes through the websocket numbers established with the server According to transmission channel, send at least one second terminal via the server and regard the first terminal is currently playing Frequency is pushed to the request of at least one second terminal, i.e., described first terminal pushes institute at least one second terminal State the request of the currently playing video of first terminal.The first terminal is by websocket data transmission channels by the request Send to server, the websocket data established by server by the server with least one second terminal pass Defeated passage sends the request described at least one second terminal.The protocol header of the data format of the request can be " pull ", the first request for showing notebook data form are that request arrives currently playing video push the first terminal At least one second terminal.The video draws the field of request to include two parts:First, field " souce ", is represented First terminal title;Second, field " device ", for representing device type, such as " device ", such as " PC ", " Pad ", " Phone ", " IP Client " " MediaServer " etc..Response of at least one second terminal to the described first request disappears The protocol header of the data format of breath can be " send ", and the message for representing notebook data form is the sound to the described first request Answer message.The data of the response message include two parts every the field of form, first, field " souce ", represents source device name Claim, i.e., the relevant information of described first terminal;Second, field " device ", for representing device type, such as " device ", Such as " PC ", " Pad ", " Phone ", " IP Client " " MediaServer ".
In the above-mentioned implementation of the embodiment of the present invention, the transmission of the video information is completed in the first terminal Afterwards, methods described also includes:The first terminal closes the websocket data transmission channels established with the server.
Embodiment three
The embodiments of the invention provide a kind of multi-screen video sharing method, as shown in figure 3, methods described includes:
S301, server and first terminal establish websocket data transmission channels, and to the first terminal send with The server establishes the address information of at least one second terminal of websocket connections;
Specifically, the server is established websocket with the first terminal and is connected, and establishes websocket data biography Defeated passage.The server is established websocket with least one second terminal and is connected, and establishes websocket data biography Defeated passage.The server establishes the address information of at least one second terminal by described and first terminal Websocket data transmission channels are sent to the first terminal.The address information of at least one second terminal can be The IP address of at least one second terminal, host name etc..
S302, the server receive the video address information that at least one second terminal is sent, and to described the One terminal sends video address information;The video address information is used to indicate that at least one second terminal is currently playing Video is in the position of the server;
Specifically, the server receives at least one second terminal and led to by the websocket data transfers The video address information that road is sent, and the video address information is established by the server and the first terminal Websocket data transmission channels are sent to the first terminal.The first terminal obtains the video address information.It is described Video address information can be the URL or channel number information of at least one second terminal current live video;Or institute It can also be at least one second terminal by the URL of current order video to state video information;Current video can also be included The parameter such as reproduction time.
S303, the server receive request of the first terminal according to the video address acquisition of information video, to The first terminal sends the video.
After the first terminal obtains the video address information, number is sent to server according to the video address information According to request, video data corresponding to video address information described in acquisition request., can be to institute after the server receives the request State first terminal and send data flow.The video flowing can be transport stream.The video flowing can be sent by http protocol.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the server establishes websocket with the first terminal Data transmission channel sends handshake request by first terminal and responds the handshake request realization with server.The server connects Receive the websocket handshake requests that the first terminal is sent;The server sends handshake response to the first terminal;Institute It is the response to the websocket handshake requests that the server is sent to the first terminal to state handshake response.It is described First terminal receives the handshake response, realizes successful handshake, establishes websocket data transmission channels.
In a kind of implementation of the embodiment of the present invention, at least one second terminal hair is received in the server Before the video address information sent, the server receives the first terminal and passes through the websocket data transmission channels The 3rd request sent, and send the 3rd request at least one second terminal;Described 3rd asks to be used to ask The address information of currently playing video is sent to the first terminal by least one second terminal;The server connects The response message for agreement the 3rd request that at least one second terminal is sent is received, and institute is sent to the first terminal State response message.Specifically, the first terminal obtains the address letter at least one second terminal being connected with the server After breath, the first terminal by the websocket data transmission channels established with the server, via the server to At least one second terminal sends the currently playing video push of the first terminal is whole to described at least one second The request at end, i.e., described first terminal push asking for the currently playing video of first terminal at least one second terminal Ask.The server receives the websocket data transmission channels that the first terminal is established by first terminal and server The request of transmission, and the websocket data that the request is established by least one second terminal and server pass Defeated passage is sent at least one second terminal.After at least one second terminal obtains the request, to described the One terminal sends the response message to the request.The server receive at least one second terminal by the terminal with The response message that the websocket data transmission channels that server is established are sent, and the response message is passed through described first The websocket data transmission channels that terminal is established with server are sent to the first terminal.
In a kind of implementation of the embodiment of the present invention, the video address information is URL(URL); The server receives the first terminal according to the request of the video address acquisition of information video, is built with the first terminal Video link corresponding with the URL is found, the video flowing of the video is sent to the first terminal.
Example IV
The embodiments of the invention provide a kind of multi-screen video sharing method, as shown in figure 4, methods described includes:
S401, server and first terminal establish websocket data transmission channels, and to the first terminal send with The server establishes the address information of at least one second terminal of websocket connections;
S402, the server receive the video address information that the first terminal is sent, and to described at least one the Two terminals send the video address information;The video address information is used to indicate the currently playing video of the first terminal In the position of the server;
Specifically, the server receives what the first terminal was sent by the websocket data transmission channels Video address information, and the video address information is established by the server with least one second terminal Websocket data transmission channels are sent at least one second terminal.Described at least one second terminal obtains Video address information.The video address information can be the URL or channel number letter of the first terminal current live video Breath;Or the video information can also be the first terminal by the URL of current order video;It can also include working as forward sight The parameters such as the reproduction time of frequency.
S403, the server receive at least one second terminal according to the video address acquisition of information video Request, the video is sent at least one second terminal.
After at least one second terminal obtains the video address information, according to the video address information to service Device sends request of data, video data corresponding to video address information described in acquisition request.The server receives the request Afterwards, data flow can be sent at least one second terminal.The video flowing can be transport stream.The video flowing can lead to Cross http protocol transmission.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the server establishes websocket with the first terminal Data transmission channel sends handshake request by first terminal and responds the handshake request realization with server.The server connects Receive the websocket handshake requests that the first terminal is sent;The server sends handshake response to the first terminal;Institute It is the response to the websocket handshake requests that the server is sent to the first terminal to state handshake response.It is described First terminal receives the handshake response, realizes successful handshake, establishes websocket data transmission channels.
In a kind of implementation of the embodiment of the present invention, the video of the first terminal transmission is received in the server Before address information, the server receives that the first terminal is sent by the websocket data transmission channels Four requests, and send the 4th request at least one second terminal;Described 4th asks to be used to ask the institute The address information for stating the currently playing video of first terminal is sent at least one second terminal;The server receives institute The response message for agreement the 4th request that at least one second terminal is sent is stated, and the sound is sent to the first terminal Answer message.Specifically, after the first terminal obtains the address information at least one second terminal being connected with the server, The first terminal is by the websocket data transmission channels established with the server, via the server to described At least one second terminal is sent the currently playing video push of at least one second terminal to the first terminal Request, i.e., described first terminal pull the currently playing video of at least one second terminal at least one second terminal Request.The server receives the websocket data transfers that the first terminal is established by first terminal and server The first request that passage is sent, and the described first request is established by least one second terminal and server Websocket data transmission channels are sent at least one second terminal.Described at least one second terminal obtains After request, the response message to the request is sent to the first terminal.The server receives described at least one second The response message that the websocket data transmission channels that terminal is established by the terminal and server are sent, and by the response The websocket data transmission channels that message is established by the first terminal and server are sent to the first terminal.
In a kind of implementation of the embodiment of the present invention, the video address information is URL(URL); The server receives request of at least one second terminal according to the video address acquisition of information video, with it is described extremely A few second terminal establishes video link corresponding with the URL, and the video is sent at least one second terminal Video flowing.
Embodiment five
As shown in figure 5, the embodiments of the invention provide a kind of terminal, the terminal includes:
Connection unit 502, for establishing websocket data transmission channels with server;The connection unit passes through clear Device of looking at is established websocket with server and is connected, and establishes websocket data transmission channels.
Acquiring unit 503, at least one second terminal that websocket is connected is established with the server for obtaining Address information;According to video address information, video is obtained from the server;
After the connection unit and the server establish websocket data transmission channels, the acquiring unit is led to Cross the websocket data transmission channels, from the server obtain with the server establish that websocket is connected to The address information of a few second terminal.At least one second terminal is established websocket with the server and is connected.Institute The address information for stating at least one second terminal can be IP address, host name of at least one second terminal etc..
Receiving unit 505, for by the websocket data transmission channels, receiving described at least one second eventually The video address information that end is sent via the server;The video address information is used to indicate described at least one second eventually Hold position of the currently playing video on the server.The first terminal is obtained at least one second terminal After address information, at least one second terminal is by the video address information of currently playing video via the server push The first terminal is given, the receiving unit receives at least one second terminal via described in the server push Video address information.At least one second terminal can be led to by the websocket data transfers established with the server Road, the information of the video is pushed to the first terminal via the server.
After the receiving unit 505 receives the video address information, the acquiring unit 503 is additionally operable to, according to regarding Frequency address information, video is obtained from the server.
The terminal also includes communication bus 501, for connecting the connection unit 502, information acquisition unit 503, connecing Receive unit 505.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the terminal also includes transmitting element 504, for being connect described Before receiving unit reception video address information, according to the address information, pass through the websocket data transmission channels, warp The 5th request is sent from the server to the second terminal, to ask the second terminal by the ground of currently playing video Location information is sent to the first terminal;The receiving unit 505 is additionally operable to, and receives what at least one second terminal was sent Agree to the response message of the 5th request.At least one second end being connected with the server is obtained in the acquiring unit After the address information at end, the transmitting element is by the websocket data transmission channels established with the server, via institute Server is stated to pull the currently playing video of at least one second terminal at least one second terminal transmission The request of the first terminal., can be by being established with the server after at least one second terminal receives the request Websocket data transmission channels sent via the server to the first terminal and agree to that the response of the request disappears Breath.
In a kind of implementation of the embodiment of the present invention, the video address information that the receiving unit receives is URL;Institute State connection unit to be additionally operable to, video link is established according to the URL and the server;The acquiring unit is according to video address Information, obtaining video from the server is specially:The acquiring unit obtains the server hair according to the video link The video flowing of the video sent.The video flowing can be transport stream(Transport Stream, TS).The video flowing can To be sent by http protocol.After the receiving unit receives the video flowing, the first terminal plays the video flowing pair The video answered.
In a kind of implementation of the embodiment of the present invention, the connection unit is additionally operable to, and is obtained in the acquiring unit After video, the websocket data transmission channels established with the server are closed.
Embodiment six
As shown in fig. 6, the embodiments of the invention provide a kind of terminal, the terminal includes:
Connection unit 602, for establishing websocket data transmission channels with server;
Acquiring unit 603, at least one second terminal that websocket is connected is established with the server for obtaining Address information;
Transmitting element 604, for by the websocket data transmission channels, via the server to it is described extremely A few second terminal sends video address information;The video address information is used to indicate that the first terminal is currently playing Position of the video on the server.
It is described after the address information that the acquiring unit obtains at least one second terminal being connected with the server Transmitting element by the websocket data transmission channels established with the server, via the server to it is described at least One second terminal sends the video address information of the currently playing video of the first terminal.
The terminal also includes communication bus 601, for connecting the connection unit 602, information acquisition unit 603, hair Send unit 604.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the transmitting element is additionally operable to, and is sending video address information Before, according to the address information, by the websocket data transmission channels, via the server to described second Terminal sends the 6th request, with request by the first terminal by the address information of currently playing video be sent to it is described at least One second terminal;The terminal also includes receiving unit, the agreement institute sent for receiving at least one second terminal State the response message of the 6th request.
Connection unit is additionally operable to described in a kind of implementation of the embodiment of the present invention, and institute is completed in the transmitting element After the transmission for stating video information, the websocket data transmission channels with the server are closed.
Embodiment seven
As shown in fig. 7, the embodiments of the invention provide a kind of server, the server includes:
Connection unit 702, for establishing websocket data transmission channels with first terminal;The connection unit and institute State first terminal and establish websocket connections, establish websocket data transmission channels.
Acquiring unit 703, at least one second terminal that websocket is connected is established with the server for obtaining Address information.At least one second terminal is established websocket with the server and is connected, and described at least one second eventually The address information at end can be IP address, host name of at least one second terminal etc..
Transmitting element 704, for the first terminal send with server establish websocket be connected it is at least one The address information of second terminal;
After the address information that the acquiring unit obtains at least one second terminal, the transmitting element is by described in The address information of at least one second terminal is sent to the first terminal.
Receiving unit 705, receive the video address information that at least one second terminal is sent;The video address letter Cease for indicating the currently playing video of at least one second terminal in the position of the server;
The transmitting element 704 is additionally operable to, after the receiving unit 705 receives the video address information, to described First terminal sends the video address information.
The receiving unit 705 is additionally operable to, after transmitting element sends the video address information to the first terminal, Receive request of the first terminal according to the video address acquisition of information video.
The transmitting element 704 is additionally operable to, and video corresponding with the video address information is sent to the first terminal.
The server also includes communication bus 701, for connecting the connection unit 702, acquiring unit 703, sending Unit 704 and receiving unit 705.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the receiving unit is additionally operable to, and is received the first terminal and is led to Cross the 7th request that the websocket data transmission channels are sent, the described 7th asks to be used for ask described at least one the The address information of currently playing video is sent to the first terminal by two terminals;The transmitting element is additionally operable to, described After receiving unit receives the 7th request, the 7th request is sent at least one second terminal;It is described to receive list Member is additionally operable to, and receives the response message for agreement the 7th request that at least one second terminal is sent;It is described to send list Member is additionally operable to, and the response message is sent to the first terminal after the receiving unit receives the response message.
In a kind of implementation of the embodiment of the present invention, the video address information that the transmitting element is sent provides to be unified Source finger URL(URL);The connection unit is additionally operable to, and video link corresponding with the URL is established with the first terminal;Institute State transmitting element is specially to the first terminal transmission video:The transmitting element is by the video link, to institute State the video flowing that first terminal sends the video.
Embodiment eight
As shown in figure 8, the embodiments of the invention provide a kind of server, the server includes:
Connection unit 802, for establishing websocket data transmission channels with first terminal;The connection unit and institute State first terminal and establish websocket connections, establish websocket data transmission channels.
Acquiring unit 803, at least one second terminal that websocket is connected is established with the server for obtaining Address information;At least one second terminal is established websocket with the server and is connected, and described at least one second eventually The address information at end can be IP address, host name of at least one second terminal etc..
Transmitting element 804, for establishing websocket with server and being connected at least described in being sent to the first terminal The address information of one second terminal;
Receiving unit 805, receive the video address information that the first terminal is sent;The video address information is used to refer to Show the currently playing video of the first terminal in the position of the server;
The transmitting element 804 is additionally operable to, after the receiving unit receives the video address information, to it is described at least One second terminal sends the video address information;
The receiving unit 805 is additionally operable to, and is regarded described in the transmitting element at least one second terminal transmission After frequency address information, request of at least one second terminal according to the video address acquisition of information video is received.
The transmitting element 804 is additionally operable to, and the video is sent at least one second terminal.
The server also includes communication bus 801, for connecting the connection unit 802, acquiring unit 803, sending Unit 804 and receiving unit 805.
In embodiment provided by the invention, terminal is obtained by establishing websocket data transmission channels with server Video address information, the terminal receive Media Stream by browser, play video so that terminal no longer needs to install client Software, improve the video sharing efficiency between each equipment.Especially in home network, terminal is established with server Websocket connections, reduce network traffics, have saved Internet resources.
In a kind of implementation of the embodiment of the present invention, the receiving unit is additionally operable to, and is receiving the first terminal Before the video address information of transmission, the first terminal is sent by the websocket data transmission channels the 8th is received Request, the described 8th asks for asking to send the address information of the currently playing video of the first terminal to described At least one second terminal;Receive the response message for agreement the 4th request that at least one second terminal is sent;Institute Transmitting element is stated to be additionally operable to send the 8th request at least one second terminal;To described in first terminal transmission Response message.
In a kind of implementation of the embodiment of the present invention, the video address information that the transmitting element is sent provides to be unified Source finger URL(URL);The connection unit is additionally operable to, and regard corresponding with the URL is established with least one second terminal Frequency link;The transmitting element sends the video at least one second terminal:The transmitting element passes through The video link, the video flowing of the video is sent at least one second terminal.
The terminal also includes processor unit, and the server also includes processor unit.The processor unit is The control centre of electronic equipment, using the various pieces of various interfaces and the whole electronic equipment of connection, by running or holding Row is stored in software program and/or module in memory cell, and calls the data being stored in memory cell, to perform electricity The various functions and/or processing data of sub- equipment.The processor unit can be by integrated circuit (Integrated Circuit, abbreviation IC) composition, such as can be made up of the IC of single encapsulation, can also be by connection more identical functions or not The encapsulation IC of congenerous and form.For example, processor unit can only include central processing unit (Central Processing Unit, abbreviation CPU) or GPU, digital signal processor(Digital Signal Processor, Abbreviation DSP)And the control chip in communication unit(Such as baseband chip)Combination.In embodiments of the present invention, CPU can To be single arithmetic core, multioperation core can also be included.
In one embodiment provided by the invention, terminal can realize the control for providing server video equipment.Such as In home network, the remote control to set top box is realized by the terminal.Specifically, terminal to server sends remote control Request.The remote control notification is used for long-range control of the terminal request realization to the server MediaServer equipment System.The protocol header of the data format of the remote control notification can be " RemoteIPKey ", for showing notebook data form Request is remote control notification.The field of the remote control notification includes field " key ", for representing remote control key assignments.Institute State terminal and receive response of the server to the remote control notification.The server parses the long-range of the terminal transmission Control data, and send the response message for searching book remote control notification to the terminal.The sound of the remote control notification The protocol header for answering the data format of message can be " RIRK ", and the message for representing notebook data form is to the remote control Request is receiveed the response.The field of the response message of the remote control notification includes " key ", for representing remote manipulator key Value.The embodiment of the present invention is realized in home network, and terminal realizes the control to video providing device by browser, carries High terminal manipulation efficiency.
In one embodiment of the invention, terminal can obtain the information for the other terminals being connected with server.Specifically, The terminal sends the request for obtaining the other end messages being connected with the server to the server.The acquisition terminal The protocol header of the data format of information request can be " NetworkDiagram ", and the request for representing notebook data form is to obtain Take the request for the other end messages being connected with the server end.The server parses the request, refreshing and server End connects the network topological diagram of all terminals, obtains the information for all terminals being connected with the server.Described information can be with IP address, host name including the terminal etc..The terminal receives response of the server to the request.The response The protocol header of the data format of message can be " NtDm ", and " NtDm " indicates all devices for signing in MediaServer Name, IP, hostname etc., the message for representing notebook data form are the response messages to the acquisition terminal information request. The server will include described " NtDm " protocol header for the acquisition terminal information request receive the response transmission to The terminal.The terminal obtains the information for the other terminals being connected with the server.
It should be noted that the relevant art feature in above-described embodiment can be referred to mutually.
It should be noted that in the above embodiment of the present invention, disclosed media data playing device can With implementation into an independent table apparatus, or it is integrated in a variety of media data playing devices, such as set top box, mobile electricity Words, tablet personal computer(Tablet Personal Computer), laptop computer(Laptop Computer), multimedia Device, digital camera, personal digital assistant(Personal digital assistant, abbreviation PDA), guider, movement Internet device(Mobile Internet Device, MID)Or wearable device(Wearable Device)Deng.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a computer read/write memory medium In, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage medium can be magnetic Dish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random AccessMemory, RAM) etc..
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although The present invention is described in detail with reference to the foregoing embodiments, it will be understood by those within the art that:It still may be used To be modified to the technical scheme described in foregoing embodiments, or equivalent substitution is carried out to which part technical characteristic; And these modifications or replacement, the essence of appropriate technical solution is departed from the scope of various embodiments of the present invention technical scheme.

Claims (26)

1. a kind of multi-screen video sharing method, it is characterised in that methods described includes:
First terminal establishes webpage socket protocol websocket data transmission channels with server, and obtains and the service Device establishes the address information of at least one second terminal of websocket connections;
The first terminal receives at least one second terminal via institute by the websocket data transmission channels State the video address information of server transmission;The video address information is used to indicate that at least one second terminal is currently broadcast Position of the video put on the server;
The first terminal obtains the video according to the video address information from the server;
The first terminal establishes websocket data transmission channels with server:
First terminal sends websocket handshake requests to server;
The first terminal receives the handshake response that the server is sent;The handshake response is the server to described the The response to the websocket handshake requests that one terminal is sent;The handshake response includes to be established with the server The address information of at least one second terminal of websocket connections.
2. according to the method for claim 1, it is characterised in that receive described at least one second eventually in the first terminal Before video address information of the end via server transmission, methods described also includes:
The first terminal passes through the websocket data transfers according to the address information of at least one second terminal Passage, the first request is sent to the second terminal via the server, to ask the second terminal will be currently playing The address information of video is sent to the first terminal;
The first terminal receives agreement first request that at least one second terminal is sent via the server Response message.
3. method according to claim 1 or 2, it is characterised in that the video address information that the first terminal receives is Uniform resource position mark URL;The first terminal obtains the video tool according to the video address information from the server Body is:
The first terminal establishes video link according to the URL and the server, receives the described of the server transmission The video flowing of video.
4. according to any described method of claim 1 or 2, it is characterised in that complete the video in the first terminal After broadcasting, methods described also includes:
The first terminal closes the websocket data transmission channels established with the server.
5. a kind of multi-screen video sharing method, it is characterised in that methods described includes:
First terminal establishes websocket data transmission channels with server, and obtains and establish websocket with the server The address information of at least one second terminal of connection;
The first terminal is by the websocket data transmission channels, via the server to described at least one Two terminals send video address information;The video address information is used to indicate the currently playing video of the first terminal in institute State the position on server;
The first terminal establishes websocket data transmission channels with server:
First terminal sends websocket handshake requests to server;
The first terminal receives the handshake response that the server is sent;The handshake response is the server to described the The response to the websocket handshake requests that one terminal is sent;The handshake response includes what is be connected with the server The address information of at least one second terminal.
6. according to the method for claim 5, it is characterised in that pass through the websocket data in the first terminal Transmission channel, before sending video address information at least one second terminal via the server, methods described is also Including:
The first terminal passes through the websocket data transfers according to the address information of at least one second terminal Passage, the second request is sent at least one second terminal via the server, will by the first terminal with request The address information of currently playing video is sent at least one second terminal;
The first terminal receives the response message for agreement second request that at least one second terminal is sent.
7. the method according to claim 5 or 6, it is characterised in that complete the video address letter in the first terminal After the transmission of breath, methods described also includes:
The first terminal closes the websocket data transmission channels established with the server.
8. a kind of multi-screen video sharing method, it is characterised in that methods described includes:
Server establishes websocket data transmission channels with first terminal, and is sent and the service to the first terminal Device establishes the address information of at least one second terminal of websocket connections;
The server receives the video address information that at least one second terminal is sent, and is sent to the first terminal Video address information;The video address information is used to indicate the currently playing video of at least one second terminal described The position of server;
The server receives request of the first terminal according to the video address acquisition of information video, to described first eventually End sends the video;
The server and first terminal establish websocket data transmission channels, and to the first terminal send with it is described The address information that server establishes at least one second terminal of websocket connections is specially:
The server receives the websocket handshake requests that the first terminal is sent;
The server sends handshake response to the first terminal;The handshake response is that the server is whole to described first Hold the response to the websocket handshake requests sent;The handshake response includes to be established with the server The address information of at least one second terminal of websocket connections.
9. according to the method for claim 8, it is characterised in that receive at least one second terminal in the server Before the video address information of transmission, methods described also includes:
The server receives the 3rd request that the first terminal is sent by the websocket data transmission channels, and The 3rd request is sent at least one second terminal;Described 3rd asks to be used to ask described at least one second eventually The address information of currently playing video is sent to the first terminal by end;
The server receives the response message for agreement the 3rd request that at least one second terminal is sent, and to institute State first terminal and send the response message.
10. method according to claim 8 or claim 9, it is characterised in that the video address information is URL;The server Request of the first terminal according to the video address acquisition of information video is received, the video is sent to the first terminal Specially:
The server receives request of the first terminal according to the video address acquisition of information video, with described first eventually Video link corresponding with the URL is established at end, and the video flowing of the video is sent to the first terminal.
11. a kind of multi-screen video sharing method, it is characterised in that methods described includes:
Server establishes websocket data transmission channels with first terminal, and is sent and the service to the first terminal Device establishes the address information of at least one second terminal of websocket connections;
The server receives the video address information that the first terminal is sent, and is sent at least one second terminal The video address information;The video address information is used to indicate the currently playing video of the first terminal in the service Position on device;
The server receives request of at least one second terminal according to the video address acquisition of information video, to institute State at least one second terminal and send the video;
The server and first terminal establish websocket data transmission channels, and to the first terminal send with it is described The address information that server establishes at least one second terminal of websocket connections is specially:
The server receives the websocket handshake requests that the first terminal is sent;
The server sends handshake response to the first terminal;The handshake response is that the server is whole to described first Hold the response to the websocket handshake requests sent;The handshake response includes to be established with the server The address information of at least one second terminal of websocket connections.
12. according to the method for claim 11, it is characterised in that receive what the first terminal was sent in the server Before video address information, methods described also includes:
The server receives the 4th request that the first terminal is sent by the websocket data transmission channels, and The 4th request is sent at least one second terminal;Described 4th asks to be used to ask the first terminal The address information of currently playing video is sent at least one second terminal;
The server receives the response message for agreement the 4th request that at least one second terminal is sent, and to institute State first terminal and send the response message.
13. the method according to claim 11 or 12, it is characterised in that the video address information is URL;The service Device receives the request of at least one second terminal according to the video address acquisition of information video, to described at least one the Two terminals send the video:
The server receives request of at least one second terminal according to the video address acquisition of information video, with institute State at least one second terminal and establish video link corresponding with the URL, to described at least one second terminal transmission The video flowing of video.
14. a kind of terminal shared for multi-screen video, it is characterised in that the terminal includes:
Connection unit, for establishing websocket data transmission channels with server;
Acquiring unit, the address for establishing at least one second terminal that websocket is connected with the server for obtaining are believed Breath;According to video address information, video is obtained from the server;
Receiving unit, for by the websocket data transmission channels, receiving at least one second terminal via institute State the video address information of server transmission;The video address information is used to indicate that at least one second terminal is currently broadcast Position of the video put on the server;
The connection unit establishes websocket data transmission channels with server, is specially:
The connection unit sends websocket handshake requests by transmitting element to server;
The connection unit receives the handshake response of the server transmission by the receiving unit;The handshake response is institute State the response to the websocket handshake requests that server is sent to the transmitting element;The handshake response include with The server establishes the address information of at least one second terminal of websocket connections.
15. the terminal according to claim 14 shared for multi-screen video, it is characterised in that:
The transmitting element, it is additionally operable to before the receiving unit receives video address information, according to the address information, leads to The websocket data transmission channels are crossed, the 5th request are sent to the second terminal via the server, to ask State second terminal and the address information of currently playing video is sent to the terminal;
The receiving unit is additionally operable to, and the response for receiving agreement the 5th request that at least one second terminal is sent disappears Breath.
16. the terminal for being used for multi-screen video and sharing according to claims 14 or 15, it is characterised in that the receiving unit The video address information of reception is URL;
The connection unit is additionally operable to, and video link is established according to the URL and the server;
According to video address information, obtain video from the server is specially the acquiring unit:
The acquiring unit obtains the video flowing for the video that the server is sent according to the video link.
17. the terminal for being used for multi-screen video and sharing according to claims 14 or 15, it is characterised in that
The connection unit is additionally operable to, and after the acquiring unit obtains video, closes what is established with the server Websocket data transmission channels.
18. a kind of terminal shared for multi-screen video, it is characterised in that the terminal includes:
Connection unit, for establishing websocket data transmission channels with server;
Acquiring unit, the address for establishing at least one second terminal that websocket is connected with the server for obtaining are believed Breath;
Transmitting element, for by the websocket data transmission channels, via the server to described at least one Two terminals send video address information;The video address information is used to indicate the currently playing video of the terminal in the clothes The position of business device;
The connection unit establishes websocket data transmission channels with server, is specially:
The connection unit sends websocket handshake requests by the transmitting element to server;
The connection unit receives the handshake response of the server transmission by receiving unit;The handshake response is the clothes The response to the websocket handshake requests that business device is sent to the terminal;The handshake response includes and the service The address information of at least one second terminal of device connection.
19. the terminal according to claim 18 shared for multi-screen video, it is characterised in that
The transmitting element is additionally operable to, before video address information is sent, according to the address of at least one second terminal Information, by the websocket data transmission channels, the 6th request is sent to the second terminal via the server, The address information of currently playing video is sent to by the terminal by least one second terminal with request;
The receiving unit, the response for being additionally operable to receive agreement the 6th request that at least one second terminal is sent disappear Breath.
20. the terminal for being used for multi-screen video and sharing according to claim 18 or 19, it is characterised in that
The connection unit is additionally operable to, after the transmission that the transmitting element completes the video address information, close with it is described The websocket data transmission channels of server.
21. a kind of server shared for multi-screen video, it is characterised in that the server includes:
Connection unit, for establishing websocket data transmission channels with first terminal;
Acquiring unit, the address for establishing at least one second terminal that websocket is connected with the server for obtaining are believed Breath;
Transmitting element, for sending at least one second end established websocket with server and be connected to the first terminal The address information at end;Video address information is sent to the first terminal;The video address information be used to indicating it is described at least The currently playing video of one second terminal is in the position of the server;Video is sent to the first terminal;
Receiving unit, receive the video address information that at least one second terminal is sent;Receive the first terminal according to The request of the video address acquisition of information video;
The connection unit establishes websocket data transmission channels with first terminal, is specially:
The connection unit receives the websocket handshake requests of the first terminal transmission by the receiving unit;
The connection unit sends handshake response by the transmitting element to the first terminal;The handshake response is described The response to the websocket handshake requests that server is sent to the first terminal;The handshake response includes and institute State the address information that server establishes at least one second terminal of websocket connections.
22. the server according to claim 21 shared for multi-screen video, it is characterised in that
The receiving unit is additionally operable to, and receives the first terminal is sent by the websocket data transmission channels Seven requests, the described 7th asks for asking at least one second terminal to send the address information of currently playing video To the first terminal;Receive the response message for agreement the 7th request that at least one second terminal is sent;
The transmitting element is additionally operable to, and the 7th request is sent at least one second terminal;To the first terminal Send the response message.
23. the server for being used for multi-screen video and sharing according to claim 21 or 22, it is characterised in that described to send list The video address information that member is sent is URL;
The connection unit is additionally operable to, and video link corresponding with the URL is established with the first terminal;
The transmitting element sends the video to the first terminal:
The transmitting element is by the video link, to the video flowing of the first terminal transmission video.
24. a kind of server shared for multi-screen video, it is characterised in that the server includes:
Connection unit, for establishing websocket data transmission channels with first terminal;
Acquiring unit, the address for establishing at least one second terminal that websocket is connected with the server for obtaining are believed Breath;
Transmitting element, for the first terminal send it is described establish that websocket is connected with server at least one the The address information of two terminals;Video address information is sent at least one second terminal;The video address information is used for Indicate the currently playing video of the first terminal in the position of the server;Institute is sent at least one second terminal State video;
Receiving unit, receive the video address information that the first terminal is sent;Receive at least one second terminal according to The request of the video address acquisition of information video;
The connection unit establishes websocket data transmission channels with first terminal, is specially:
The connection unit receives the websocket handshake requests of the first terminal transmission by the receiving unit;
The connection unit sends handshake response by the transmitting element to the first terminal;The handshake response is described The response to the websocket handshake requests that server is sent to the first terminal;The handshake response includes and institute State the address information that server establishes at least one second terminal of websocket connections.
25. the server according to claim 24 shared for multi-screen video, it is characterised in that
The receiving unit is additionally operable to, and before the video address information that the first terminal is sent is received, receives described first The 8th request that terminal is sent by the websocket data transmission channels, the described 8th asks to be used to ask the institute The address information for stating the currently playing video of first terminal is sent at least one second terminal;Receive described at least one The response message for agreement the 8th request that second terminal is sent;
The transmitting element is additionally operable to, and the 8th request is sent at least one second terminal;To the first terminal Send the response message.
26. the server for being used for multi-screen video and sharing according to claim 24 or 25, it is characterised in that described to send list The video address information that member is sent is URL;
The connection unit is additionally operable to, and video link corresponding with the URL is established with least one second terminal;
The transmitting element sends the video at least one second terminal:
The transmitting element is by the video link, to the video flowing of at least one second terminal transmission video.
CN201310719853.6A 2013-12-23 2013-12-23 A kind of multi-screen video sharing method and terminal, server Active CN103702238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310719853.6A CN103702238B (en) 2013-12-23 2013-12-23 A kind of multi-screen video sharing method and terminal, server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310719853.6A CN103702238B (en) 2013-12-23 2013-12-23 A kind of multi-screen video sharing method and terminal, server

Publications (2)

Publication Number Publication Date
CN103702238A CN103702238A (en) 2014-04-02
CN103702238B true CN103702238B (en) 2017-11-28

Family

ID=50363620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310719853.6A Active CN103702238B (en) 2013-12-23 2013-12-23 A kind of multi-screen video sharing method and terminal, server

Country Status (1)

Country Link
CN (1) CN103702238B (en)

Families Citing this family (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135686B (en) * 2014-08-14 2017-12-08 广东威创视讯科技股份有限公司 A kind of sharing method and user terminal of combination signal
CN104301400B (en) * 2014-09-28 2017-10-03 四川长虹电器股份有限公司 Multi-screen collaboration and resource share method based on Samba agreements
KR102335007B1 (en) * 2015-04-01 2021-12-06 삼성전자주식회사 Method and device for transmitting/receiving information in a broadcating system
CN105142011A (en) * 2015-08-12 2015-12-09 青岛海信电器股份有限公司 Web-based television terminal multi-screen interaction method and device
CN105554559A (en) * 2015-09-29 2016-05-04 深圳市美贝壳科技有限公司 Media projection method based on http
CN105163053A (en) * 2015-09-30 2015-12-16 小米科技有限责任公司 Video projection method and apparatus
CN105306857A (en) * 2015-11-20 2016-02-03 小米科技有限责任公司 Projection display method and device
CN106791944A (en) * 2015-11-23 2017-05-31 北大方正集团有限公司 Multi-screen interaction method, multi-screen interactive device and Multi-screen interaction system
CN107040798A (en) * 2016-02-04 2017-08-11 深圳市光息谷科技发展有限公司 Interaction display control method, system, server, control terminal and playback terminal
CN105871897B (en) * 2016-05-20 2019-08-30 腾讯科技(深圳)有限公司 A kind of method, relevant apparatus and system controlling media play
CN106101124B (en) * 2016-06-30 2020-05-08 北京奇艺世纪科技有限公司 Communication channel sharing method and device
CN106507127A (en) * 2016-09-29 2017-03-15 北京奇艺世纪科技有限公司 A kind of video broadcasting method and device
CN106973103A (en) * 2017-03-29 2017-07-21 内蒙古京隆发电有限责任公司 A kind of electrical communication system and its means of communication
CN107105339B (en) * 2017-03-31 2019-10-25 广州酷狗计算机科技有限公司 A kind of methods, devices and systems playing live video
CN109274634B (en) * 2017-07-18 2021-06-11 腾讯科技(深圳)有限公司 Multimedia communication method and device, and storage medium
CN107483972B (en) * 2017-07-24 2019-05-07 平安科技(深圳)有限公司 A kind of live streaming processing method of audio-video, storage medium and a kind of mobile terminal
CN107992279A (en) * 2017-12-01 2018-05-04 浙江力太科技有限公司 A kind of method of mobile terminal control visualization large-size screen monitors synchronization
CN108881361B (en) * 2017-12-26 2019-08-27 视联动力信息技术股份有限公司 A kind of data push method and device based on view networking
CN110337014B (en) * 2019-06-18 2022-08-09 北京世纪超星信息技术发展有限责任公司 Real-time screen projection method
CN111386700A (en) * 2020-02-25 2020-07-07 深圳市乐橙互联有限公司 Multifunctional receiving device and conference system
CN112562639B (en) * 2020-11-30 2023-09-19 努比亚技术有限公司 Audio processing method, terminal and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546616A (en) * 2011-12-28 2012-07-04 Tcl集团股份有限公司 Achieving method for media sharing and interaction and digital household media server
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet
CN103024526A (en) * 2012-12-31 2013-04-03 上海全景数字技术有限公司 Multi-screen interaction system based on digital television set-top box
WO2013102335A1 (en) * 2012-01-06 2013-07-11 华为技术有限公司 Gateway handshake and communication method, gateway and web communication system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102546616A (en) * 2011-12-28 2012-07-04 Tcl集团股份有限公司 Achieving method for media sharing and interaction and digital household media server
WO2013102335A1 (en) * 2012-01-06 2013-07-11 华为技术有限公司 Gateway handshake and communication method, gateway and web communication system
CN102739800A (en) * 2012-07-05 2012-10-17 合一网络技术(北京)有限公司 System and method for remotely controlling browser Web page based on internet
CN103024503A (en) * 2012-07-05 2013-04-03 合一网络技术(北京)有限公司 System and method for achieving remote control through mobile communication equipment terminal
CN103024526A (en) * 2012-12-31 2013-04-03 上海全景数字技术有限公司 Multi-screen interaction system based on digital television set-top box

Also Published As

Publication number Publication date
CN103702238A (en) 2014-04-02

Similar Documents

Publication Publication Date Title
CN103702238B (en) A kind of multi-screen video sharing method and terminal, server
CN106657370B (en) Data transmission method and device
CN106254462B (en) Method, server and system for realizing remote assistance of mobile terminal
CN109395372A (en) Realize method, system and the electronic equipment of game paddle remote control computer game
CN103404132B (en) Video communication method and home terminal, home server
JP4583030B2 (en) Data processing method and apparatus
CN105409183B (en) For realizing the system and equipment of any network function client or server in HTML5 is applied
WO2017161769A1 (en) Bullet comment transmission method and apparatus
CN102868916A (en) Method for sharing information with digital television terminal, terminals and information sharing system
CN108989488B (en) Traversing method and device of network address translation equipment and storage medium
TWI382717B (en) A method of sharing resources by interconnecting a network terminal device of two private networks by a user agent
CN104253856A (en) Scalable Web Real-Time Communications (WebRTC) media engines, and related method and system
CN105407369A (en) Web application based terminal communication method and device
CN103814593A (en) Multicasting in a wireless display system
CN102891890B (en) Exchange method between a kind of terminal and relevant device, system
CN102916866A (en) Data sharing method, terminal, server and system
EP3396899A1 (en) System and method of multi-media conferencing between universal plug and play (upnp) enabled telephony devices and wireless area network (wan) devices
CN103607607A (en) Household intelligent equipment-based multi-screen coordination system and realization method thereof
CN105050202A (en) Method of establishing communication session using active connection of mobile terminal to relay server
CN104079597A (en) Transfer method of media stream and user equipment
CN104753989A (en) Screen image transmission and playing method and device based on Web-based OS runtime environment
TW200532544A (en) Personal multimedia on-line broadcasting system and method thereof
CN102904891A (en) Multimedia data sharing method and device and multimedia playing equipment
JP6393475B2 (en) Communication adapter device, communication system, tunnel communication method, and program
CN103856552B (en) Method and apparatus for interacting live streaming

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee after: Huawei terminal (Shenzhen) Co.,Ltd.

Address before: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee before: HUAWEI DEVICE Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20181218

Address after: 523808 Southern Factory Building (Phase I) Project B2 Production Plant-5, New Town Avenue, Songshan Lake High-tech Industrial Development Zone, Dongguan City, Guangdong Province

Patentee after: HUAWEI DEVICE Co.,Ltd.

Address before: 518129 Building 2, B District, Bantian HUAWEI base, Longgang District, Shenzhen, Guangdong.

Patentee before: Huawei terminal (Shenzhen) Co.,Ltd.

TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20210427

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: Metro Songshan Lake high tech Industrial Development Zone, Guangdong Province, Dongguan City Road 523808 No. 2 South Factory (1) project B2 -5 production workshop

Patentee before: HUAWEI DEVICE Co.,Ltd.