A kind of video barrage sending method and device
Technical field
The invention belongs to field of computer technology, more particularly, to a kind of video barrage sending method and device.
Background technique
Barrage is typically all square on the screen at present, so that barrage passes through video from right to left.However sometimes above video
It will appear important information, such as prompt information etc., common barrage may will affect video-see.Meanwhile present video bullet
Curtain transmission technology can not adapt to the video playing under various modes automatically, as between played in full screen and original size, the ginseng of barrage
Number be it is constant, cause font improper, problem inconvenient to watch.
Summary of the invention
Aiming at the above defects or improvement requirements of the prior art, the present invention provides a kind of video barrage sending method and dresses
It sets, its object is to personalized transmission barrage and adapts to player automatically and thus solved existing to guarantee video perception
Barrage technology can not personal settings and the technical issues of broadcast state cannot be adapted to automatically.
To achieve the above object, according to one aspect of the present invention, a kind of video barrage sending method is provided, including with
Lower step:
(1) the barrage position for obtaining user setting, determines barrage region;
(2) it according to the barrage region and video parameter obtained in step (1), obtains barrage and sends parameter;
(3) parameter is sent according to the barrage that step (2) obtains, shows barrage in barrage region single.
Preferably, the video barrage sending method, the barrage position be video occupy it is left, occupy on right, placed in the middle, residence,
And the region unit under occupying;The barrage region is the corresponding display area in barrage position on video playing interface.
Preferably, the video barrage sending method, it includes: that barrage shows length, barrage that the barrage, which sends parameter,
Extinction time, barrage font and barrage transparency.When barrage position is on placed in the middle, residence, when occupying lower setting, the barrage is sent out
Send parameter further include: whether be protection subtitle.
Preferably, the video barrage sending method, the barrage show length, are a barrage context string
Maximum length;Show that the bigger principle of length determines that the barrage shows length according to the longer barrage of video duration;
The barrage extinction time is barrage from being shown to the time cancelled between display;It is pressed according to barrage region
Longer according to the length by length on barrage direction, the longer principle of barrage extinction time determines the barrage extinction time;
The barrage font, the ratio according to barrage region and display area is smaller, and the smaller principle of barrage font determines
The barrage font;
The barrage transparency is divided into i.e. opaque third gear, transmitance 30% and transmitance 80%.
Preferably, the video barrage sending method, step (3) specifically: in the barrage region, according to barrage number
Amount setting barrage layer, each barrage layer show a barrage content.
Other side according to the invention provides a kind of video barrage sending device, including;
Barrage region obtains module, determines bullet for obtaining the barrage position of user setting, and according to the barrage position
Curtain region;
Barrage sends parameter acquisition module, for obtaining the barrage region and video ginseng that module obtains according to barrage region
Number obtains barrage and sends parameter;
Barrage sending module, the barrage for being obtained according to barrage parameter acquisition module send parameter, in barrage region list
Item shows barrage.
Preferably, the video barrage sending device, the barrage position be video occupy it is left, occupy on right, placed in the middle, residence,
And the region unit under occupying;The barrage region is the corresponding display area in barrage position on video playing interface.
Preferably, the video barrage sending device, it includes: that barrage shows length, barrage that the barrage, which sends parameter,
Extinction time, barrage font and barrage transparency.When barrage position is on placed in the middle, residence, when occupying lower setting, the barrage is sent out
Send parameter further include: whether be protection subtitle.
Preferably, the video barrage sending device, the barrage show length, are a barrage context string
Maximum length;Show that the bigger principle of length determines that the barrage shows length according to the longer barrage of video duration;
The barrage extinction time is barrage from being shown to the time cancelled between display;It is pressed according to barrage region
Longer according to the length on barrage direction, the longer principle of barrage extinction time determines the barrage extinction time;
The barrage font, the ratio according to barrage region and display area is smaller, and the smaller principle of barrage font determines
The barrage font;
The barrage transparency is divided into i.e. opaque third gear, transmitance 30% and transmitance 80%.
Preferably, the video barrage sending device, the barrage sending module is in the barrage region, according to barrage
Barrage layer is arranged in quantity, and each barrage layer shows a barrage content.
In general, through the invention it is contemplated above technical scheme is compared with the prior art, to barrage send carry out
Personal settings, and adapt to according to the individualized selection of user the broadcast state of barrage video automatically are capable of customized personalized
Barrage display mode improves the transmission enjoyment of barrage.Meanwhile barrage display position editting function is provided for administrator and user,
Administrator is preferably facilitated to guide user to send barrage by existing barrage.
Detailed description of the invention
Fig. 1 is the flow diagram of barrage sending method provided by the invention;
Fig. 2 is the structural schematic diagram of barrage sending device provided by the invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.As long as in addition, technical characteristic involved in the various embodiments of the present invention described below
Not constituting a conflict with each other can be combined with each other.
Video barrage sending method provided by the invention, comprising the following steps:
(1) the barrage position for obtaining user setting, determines barrage region.
The user, including administrator and ordinary user.
The barrage position is that video occupies left, the residence right side, region unit placed in the middle, on residence and under occupying.
The barrage region is the corresponding display area in barrage position on video playing interface.
(2) it according to the barrage region and video parameter obtained in step (1), obtains barrage and sends parameter;
It includes: that barrage shows that length, barrage extinction time, barrage font and barrage are transparent that the barrage, which sends parameter,
Degree.When barrage position be it is placed in the middle, residences is upper, occupy lower setting when, the barrage transmission parameter further include: whether be to protect subtitle.
The barrage shows length, is the maximum length of a barrage context string;According to video duration barrage
The bigger principle of display length determines that the barrage shows length.
The barrage extinction time is barrage from being shown to the time cancelled between display;It is pressed according to barrage region
Longer according to the length on barrage direction, the longer principle of barrage extinction time determines the barrage extinction time.
The barrage font, the ratio according to barrage region and display area is smaller, described in the smaller principle determination of font
Barrage font.
The barrage transparency is divided into i.e. opaque third gear, transmitance 30% and transmitance 80%.
(3) parameter is sent according to the barrage that step (2) obtains, shows barrage in barrage region single.
In the barrage region, barrage layer is arranged according to barrage quantity, each barrage layer shows a barrage content.
Video barrage sending device provided by the invention, comprising:
Barrage region obtains module, determines bullet for obtaining the barrage position of user setting, and according to the barrage position
Curtain region.
The user, including administrator and ordinary user.
The barrage position is that video occupies left, the residence right side, region unit placed in the middle, on residence and under occupying.
The barrage region is the corresponding display area in barrage position on video playing interface.
Barrage sends parameter acquisition module, for obtaining the barrage region and video ginseng that module obtains according to barrage region
Number obtains barrage and sends parameter;
It includes: that barrage shows that length, barrage extinction time, barrage font and barrage are transparent that the barrage, which sends parameter,
Degree.When barrage position be it is placed in the middle, residences is upper, occupy lower setting when, the barrage transmission parameter further include: whether be to protect subtitle.
The barrage shows length, is the maximum length of a barrage context string;It is longer according to video duration
Barrage shows that the bigger principle of length determines that the barrage shows length.
The barrage extinction time is barrage from being shown to the time cancelled between display;It is pressed according to barrage region
Longer according to the length on barrage direction, the longer principle of barrage extinction time determines the barrage extinction time.
The barrage font, the ratio according to barrage region and display area is smaller, and the smaller principle of barrage font determines
The barrage font.
The barrage transparency is divided into i.e. opaque third gear, transmitance 30% and transmitance 80%.
Barrage sending module, the barrage for being obtained according to barrage parameter acquisition module send parameter, in barrage region list
Item shows barrage.
In the barrage region, barrage layer is arranged according to barrage quantity, each barrage layer shows a barrage content.
The following are embodiments:
Embodiment 1
A kind of video barrage sending method, comprising the following steps:
(1) the barrage position for obtaining user setting, determines barrage region.
The user, including administrator and ordinary user.
The barrage position is that video occupies left, the residence right side, region unit placed in the middle, on residence and under occupying.
The barrage region is the corresponding display area in barrage position on video playing interface;The broadcast interface of video can be
Played in full screen, webpage played in full screen and original size play.
(2) it according to the barrage region and video parameter obtained in step (1), obtains barrage and sends parameter;
It includes: that barrage shows that length, barrage extinction time, barrage font and barrage are transparent that the barrage, which sends parameter,
Degree.When barrage position be it is placed in the middle, residences is upper, occupy lower setting when, the barrage transmission parameter further include: whether be to protect subtitle.
The barrage shows length, is the maximum length of a barrage context string;It is longer according to video duration
Barrage shows that the bigger principle of length determines that the barrage shows length;The screen duration is barrage display length within 10 minutes
Degree is 30 Chinese characters, character or number;Greater than 10 minutes, every bull point clock barrage showed that length increases by 10 characters, and barrage is aobvious
Show length no more than 50 characters.
The barrage extinction time is barrage from being shown to the time cancelled between display;It is pressed according to barrage region
Longer according to the length on barrage direction, the longer principle of barrage extinction time determines the barrage extinction time.Specifically,
When the code rate of 560P, original size is 3 seconds when playing, webpage played in full screen when be 9 seconds when being 5 seconds, played in full screen.
The barrage font, the ratio according to barrage region and display area is smaller, and the smaller principle of barrage font determines
The barrage font, respectively default size, 10% size, 15% size, 30% size.
The barrage transparency is divided into i.e. opaque third gear, transmitance 30% and transmitance 80%.
(3) parameter is sent according to the barrage that step (2) obtains, shows barrage in barrage region single.
In the barrage region, barrage layer is arranged according to barrage quantity, each barrage layer shows a barrage content.
Embodiment 2
A kind of video barrage sending device, comprising:
Barrage region obtains module, determines bullet for obtaining the barrage position of user setting, and according to the barrage position
Curtain region.
The user, including administrator and ordinary user.
The barrage position is that video occupies left, the residence right side, region unit placed in the middle, on residence and under occupying.
The barrage region is the corresponding display area in barrage position on video playing interface;The broadcast interface of video can be
Played in full screen, webpage played in full screen and original size play.
Barrage sends parameter acquisition module, for obtaining the barrage region and video ginseng that module obtains according to barrage region
Number obtains barrage and sends parameter;
It includes: that barrage shows that length, barrage extinction time, barrage font and barrage are transparent that the barrage, which sends parameter,
Degree.When barrage position be it is placed in the middle, residences is upper, occupy lower setting when, the barrage transmission parameter further include: whether be to protect subtitle.
The barrage shows length, is the maximum length of a barrage context string;It is longer according to video duration
Barrage shows that the bigger principle of length determines that the barrage shows length;The screen duration is barrage display length within 10 minutes
Degree is 30 Chinese characters, character or number;Greater than 10 minutes, every bull point clock barrage showed that length increases by 10 characters, and barrage is aobvious
Show length no more than 50 characters.
The barrage extinction time is barrage from being shown to the time cancelled between display;It is pressed according to barrage region
Longer according to the length on barrage direction, the longer principle of barrage extinction time determines the barrage extinction time.Specifically,
When the code rate of 560P, original size is 3 seconds when playing, webpage played in full screen when be 9 seconds when being 5 seconds, played in full screen.
The barrage font, the ratio according to barrage region and display area is smaller, and the smaller principle of barrage font determines
The barrage font, respectively default size, 10% size, 15% size, 30% size.
The barrage transparency is divided into i.e. opaque third gear, transmitance 30% and transmitance 80%.
Barrage sending module, the barrage for being obtained according to barrage parameter acquisition module send parameter, in barrage region list
Item shows barrage.
In the barrage region, barrage layer is arranged according to barrage quantity, each barrage layer shows a barrage content.
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not to
The limitation present invention, any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should all include
Within protection scope of the present invention.