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 technology
Barrage is typically all above screen at present so that barrage passes through video from right to left.But have
Time video above there will be important information, such as informations etc., common barrage may affect and regard
Frequency viewing.Meanwhile, present video barrage transmission technology cannot adapt to the video under various pattern automatically
Playing, as between played in full screen and original size, the parameter of barrage is constant, causes font not conform to
Suitable, problem inconvenient to watch.
Summary of the invention
For disadvantages described above or the Improvement requirement of prior art, the invention provides a kind of video barrage and send out
Delivery method and device, its object is to the transmission barrage of personalization and automatically adapt to player, thus
Ensureing video perception, thus solving existing barrage technology cannot personal settings and can not automatically adapting to
The technical problem of broadcast state.
For achieving the above object, according to one aspect of the present invention, it is provided that a kind of video barrage sends
Method, comprises the following steps:
(1) obtain the barrage position of user setup, determine barrage region;
(2) according to the barrage region obtained in step (1) and video parameter, obtain barrage and send
Parameter;
(3) barrage obtained according to step (2) sends parameter, shows barrage at barrage region wall scroll.
Preferably, described video barrage sending method, its described barrage position be video occupy left, occupy right,
Between two parties, the region unit on residence and under residence;Described barrage region is barrage position on video playback interface
Put corresponding viewing area.
Preferably, described video barrage sending method, its described barrage sends parameter and includes: barrage shows
Show length, barrage extinction time, barrage font and barrage transparency.When barrage position be placed in the middle,
On residence, occupy under when arranging, described barrage sends parameter and also includes: whether as protection captions.
Preferably, described video barrage sending method, its described barrage display length, is a barrage
The greatest length of context string;According to the principle that video duration the longest barrage display length is the biggest
Determine that described barrage shows length;
Described barrage extinction time, is that a barrage is from the time being shown between cancellation display;According to
Barrage region is the longest according to the length by length on barrage direction, and the longest principle of barrage extinction time determines
Described barrage extinction time;
Described barrage font, the least with the ratio of viewing area according to barrage region, barrage font is the least
Principle determine described barrage font;
Described barrage transparency, is divided into that third gear is the opaquest, transmitance 30% and transmitance 80%.
Preferably, described video barrage sending method, its step (3) is particularly as follows: in described barrage district
Territory, arranges barrage layer according to barrage quantity, and described each barrage layer shows a barrage content.
According to another aspect of the present invention, it is provided that a kind of video barrage dispensing device, including;
Barrage region acquisition module, for obtaining the barrage position of user setup, and according to described barrage
Position determines barrage region;
Barrage sends parameter acquisition module, for the barrage region obtained according to barrage region acquisition module
And video parameter, obtain barrage and send parameter;
Barrage sending module, sends parameter for the barrage obtained according to barrage parameter acquisition module,
Barrage region wall scroll display barrage.
Preferably, described video barrage dispensing device, its described barrage position be video occupy left, occupy right,
Between two parties, the region unit on residence and under residence;Described barrage region is barrage position on video playback interface
Put corresponding viewing area.
Preferably, described video barrage dispensing device, its described barrage sends parameter and includes: barrage shows
Show length, barrage extinction time, barrage font and barrage transparency.When barrage position be placed in the middle,
On residence, occupy under when arranging, described barrage sends parameter and also includes: whether as protection captions.
Preferably, described video barrage dispensing device, its described barrage display length, is a barrage
The greatest length of context string;According to the principle that video duration the longest barrage display length is the biggest
Determine that described barrage shows length;
Described barrage extinction time, is that a barrage is from the time being shown between cancellation display;According to
Barrage region is the longest according to the length on barrage direction, and the longest principle of barrage extinction time determines described
Barrage extinction time;
Described barrage font, the least with the ratio of viewing area according to barrage region, barrage font is the least
Principle determine described barrage font;
Described barrage transparency, is divided into that third gear is the opaquest, transmitance 30% and transmitance 80%.
Preferably, described video barrage dispensing device, its described barrage sending module is in described barrage district
Territory, arranges barrage layer according to barrage quantity, and described each barrage layer shows a barrage content.
In general, by the contemplated above technical scheme of the present invention compared with prior art, to bullet
Curtain sends and carries out personal settings, and automatically adapts to broadcasting of barrage video according to the individualized selection of user
Put state, it is possible to the barrage display mode of customized personalization, improve the transmission enjoyment of barrage.Meanwhile,
There is provided barrage display position editting function for manager and user, preferably facilitate manager to pass through existing
Barrage guide user send barrage.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the barrage sending method that the present invention provides;
Fig. 2 is the structural representation of the barrage dispensing device that the present invention provides.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing
And embodiment, the present invention is further elaborated.Should be appreciated that described herein specifically
Embodiment only in order to explain the present invention, is not intended to limit the present invention.Additionally, it is disclosed below
Just may be used as long as technical characteristic involved in each embodiment of the present invention does not constitutes conflict each other
To be mutually combined.
The video barrage sending method that the present invention provides, comprises the following steps:
(1) obtain the barrage position of user setup, determine barrage region.
Described user, including administrator and domestic consumer.
Described barrage position be video occupy left, occupy the region unit on right, placed in the middle, residences and under residence.
Described barrage region is corresponding viewing area, barrage position on video playback interface.
(2) according to the barrage region obtained in step (1) and video parameter, obtain barrage and send
Parameter;
Described barrage send parameter include: barrage display length, barrage extinction time, barrage font,
And barrage transparency.When barrage position for placed in the middle, residences upper, arrange under residence time, the transmission of described barrage
Parameter also includes: whether as protection captions.
Described barrage display length, is the greatest length of a barrage context string;Hold according to video
The principle that continuous time barrage display length is the biggest determines that described barrage shows length.
Described barrage extinction time, is that a barrage is from the time being shown between cancellation display;According to
Barrage region is the longest according to the length on barrage direction, and the longest principle of barrage extinction time determines described
Barrage extinction time.
Described barrage font, the least with the ratio of viewing area according to barrage region, the least former of font
Then determine described barrage font.
Described barrage transparency, is divided into that third gear is the opaquest, transmitance 30% and transmitance 80%.
(3) barrage obtained according to step (2) sends parameter, shows barrage at barrage region wall scroll.
In described barrage region, arranging barrage layer according to barrage quantity, described each barrage layer shows one
Bar barrage content.
The video barrage dispensing device that the present invention provides, including:
Barrage region acquisition module, for obtaining the barrage position of user setup, and according to described barrage
Position determines barrage region.
Described user, including administrator and domestic consumer.
Described barrage position be video occupy left, occupy the region unit on right, placed in the middle, residences and under residence.
Described barrage region is corresponding viewing area, barrage position on video playback interface.
Barrage sends parameter acquisition module, for the barrage region obtained according to barrage region acquisition module
And video parameter, obtain barrage and send parameter;
Described barrage send parameter include: barrage display length, barrage extinction time, barrage font,
And barrage transparency.When barrage position for placed in the middle, residences upper, arrange under residence time, the transmission of described barrage
Parameter also includes: whether as protection captions.
Described barrage display length, is the greatest length of a barrage context string;Hold according to video
The principle that the longest barrage of continuous time display length is the biggest determines that described barrage shows length.
Described barrage extinction time, is that a barrage is from the time being shown between cancellation display;According to
Barrage region is the longest according to the length on barrage direction, and the longest principle of barrage extinction time determines described
Barrage extinction time.
Described barrage font, the least with the ratio of viewing area according to barrage region, barrage font is the least
Principle determine described barrage font.
Described barrage transparency, is divided into that third gear is the opaquest, transmitance 30% and transmitance 80%.
Barrage sending module, sends parameter for the barrage obtained according to barrage parameter acquisition module,
Barrage region wall scroll display barrage.
In described barrage region, arranging barrage layer according to barrage quantity, described each barrage layer shows one
Bar barrage content.
It is below embodiment:
Embodiment 1
A kind of video barrage sending method, comprises the following steps:
(1) obtain the barrage position of user setup, determine barrage region.
Described user, including administrator and domestic consumer.
Described barrage position be video occupy left, occupy the region unit on right, placed in the middle, residences and under residence.
Described barrage region is corresponding viewing area, barrage position on video playback interface;Broadcasting of video
Putting interface can be that played in full screen, webpage played in full screen and original size are play.
(2) according to the barrage region obtained in step (1) and video parameter, obtain barrage and send
Parameter;
Described barrage send parameter include: barrage display length, barrage extinction time, barrage font,
And barrage transparency.When barrage position for placed in the middle, residences upper, arrange under residence time, the transmission of described barrage
Parameter also includes: whether as protection captions.
Described barrage display length, is the greatest length of a barrage context string;Hold according to video
The principle that the longest barrage of continuous time display length is the biggest determines that described barrage shows length;When screen continues
Between be that within 10 minutes, barrage shows a length of 30 Chinese characters, character or numeral;More than 10 minutes
Every bull point clock barrage display length increases by 10 characters, and barrage display length is not more than 50 characters.
Described barrage extinction time, is that a barrage is from the time being shown between cancellation display;According to
Barrage region is the longest according to the length on barrage direction, and the longest principle of barrage extinction time determines described
Barrage extinction time.Concrete, when the code check of 560P, original size is 3 seconds, webpage when playing
Be 5 seconds during played in full screen, played in full screen time be 9 seconds.
Described barrage font, the least with the ratio of viewing area according to barrage region, barrage font is the least
Principle determine described barrage font, respectively default size, 10% size, 15% size, 30% size.
Described barrage transparency, is divided into that third gear is the opaquest, transmitance 30% and transmitance 80%.
(3) barrage obtained according to step (2) sends parameter, shows barrage at barrage region wall scroll.
In described barrage region, arranging barrage layer according to barrage quantity, described each barrage layer shows one
Bar barrage content.
Embodiment 2
A kind of video barrage dispensing device, including:
Barrage region acquisition module, for obtaining the barrage position of user setup, and according to described barrage
Position determines barrage region.
Described user, including administrator and domestic consumer.
Described barrage position be video occupy left, occupy the region unit on right, placed in the middle, residences and under residence.
Described barrage region is corresponding viewing area, barrage position on video playback interface;Broadcasting of video
Putting interface can be that played in full screen, webpage played in full screen and original size are play.
Barrage sends parameter acquisition module, for the barrage region obtained according to barrage region acquisition module
And video parameter, obtain barrage and send parameter;
Described barrage send parameter include: barrage display length, barrage extinction time, barrage font,
And barrage transparency.When barrage position for placed in the middle, residences upper, arrange under residence time, the transmission of described barrage
Parameter also includes: whether as protection captions.
Described barrage display length, is the greatest length of a barrage context string;Hold according to video
The principle that the longest barrage of continuous time display length is the biggest determines that described barrage shows length;When screen continues
Between be that within 10 minutes, barrage shows a length of 30 Chinese characters, character or numeral;More than 10 minutes
Every bull point clock barrage display length increases by 10 characters, and barrage display length is not more than 50 characters.
Described barrage extinction time, is that a barrage is from the time being shown between cancellation display;According to
Barrage region is the longest according to the length on barrage direction, and the longest principle of barrage extinction time determines described
Barrage extinction time.Concrete, when the code check of 560P, original size is 3 seconds, webpage when playing
Be 5 seconds during played in full screen, played in full screen time be 9 seconds.
Described barrage font, the least with the ratio of viewing area according to barrage region, barrage font is the least
Principle determine described barrage font, respectively default size, 10% size, 15% size, 30% size.
Described barrage transparency, is divided into that third gear is the opaquest, transmitance 30% and transmitance 80%.
Barrage sending module, sends parameter for the barrage obtained according to barrage parameter acquisition module,
Barrage region wall scroll display barrage.
In described barrage region, arranging barrage layer according to barrage quantity, described each barrage layer shows one
Bar barrage content.
As it will be easily appreciated by one skilled in the art that and the foregoing is only presently preferred embodiments of the present invention,
Not in order to limit the present invention, all made within the spirit and principles in the present invention any amendment, etc.
With replacement and improvement etc., should be included within the scope of the present invention.