CN108881969B - Method and device for drawing bullet screen and mobile terminal - Google Patents

Method and device for drawing bullet screen and mobile terminal Download PDF

Info

Publication number
CN108881969B
CN108881969B CN201810395773.2A CN201810395773A CN108881969B CN 108881969 B CN108881969 B CN 108881969B CN 201810395773 A CN201810395773 A CN 201810395773A CN 108881969 B CN108881969 B CN 108881969B
Authority
CN
China
Prior art keywords
domain name
bullet screen
current video
script file
website
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
CN201810395773.2A
Other languages
Chinese (zh)
Other versions
CN108881969A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810395773.2A priority Critical patent/CN108881969B/en
Publication of CN108881969A publication Critical patent/CN108881969A/en
Application granted granted Critical
Publication of CN108881969B publication Critical patent/CN108881969B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/488Data services, e.g. news ticker
    • H04N21/4884Data services, e.g. news ticker for displaying subtitles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26291Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for providing content or additional data updates, e.g. updating software modules, stored at the client

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a method, a device and a mobile terminal for drawing a bullet screen, wherein the method comprises the following steps: acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server; judging whether the website domain name of the current video is in the domain name list or not; if the current video exists in the domain name list, acquiring bullet screen data of the current video through the script file; and drawing the bullet screen data in the user-defined player. The method comprises the steps of detecting whether the website domain name of the current video is in a domain name list capable of drawing the bullet screen, if so, obtaining bullet screen data of the current video by utilizing a script file for obtaining bullet screen data, directly drawing independent bullet screen data on a user-defined player, and effectively improving the experience of watching the video by a user.

Description

Method and device for drawing bullet screen and mobile terminal
Technical Field
The application relates to the technical field of mobile terminals, in particular to a method and a device for drawing a bullet screen and a mobile terminal.
Background
At present, a browser of a mobile internet platform is directed to videos in a webpage, and in order to make a video player more beautiful, a video player is generally customized in the webpage. However, after the existing browser manufacturers customize the players, some independent bullet screen data of part of bullet screen websites cannot be displayed on the customized video players.
Disclosure of Invention
In view of the above problems, the present application provides a method, an apparatus, and a mobile terminal for drawing a bullet screen to solve the above problems.
In a first aspect, an embodiment of the present application provides a method for drawing a bullet screen, where the method includes: acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server; judging whether the website domain name of the current video is in the domain name list or not; if the current video exists in the domain name list, acquiring bullet screen data of the current video through the script file; and drawing the bullet screen data in the user-defined player.
In a second aspect, an embodiment of the present application provides an apparatus for drawing a bullet screen, where the apparatus includes: the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server; the detection module is used for judging whether the website domain name of the current video is in the domain name list or not; the second acquisition module is used for acquiring barrage data of the current video through the script file when the website domain name of the current video is in the domain name list; and the drawing module is used for drawing the bullet screen data in the user-defined player.
In a third aspect, an embodiment of the present application provides a mobile terminal, which includes a display, a memory, and a processor, where the display and the memory are coupled to the processor, and the memory stores instructions, and when the instructions are executed by the processor, the processor performs the method of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having program code executable by a processor, where the program code causes the processor to execute the method of the first aspect.
According to the method, the device and the mobile terminal for drawing the bullet screen, whether the website domain name of the current video is in a domain name list capable of drawing the bullet screen is detected, if the website domain name of the current video is in the domain name list, the script file for obtaining bullet screen data is used for obtaining bullet screen data of the current video, independent bullet screen data can be directly drawn on a user-defined player, and the experience of watching the video by a user can be effectively improved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating interaction between a mobile terminal and a server according to an embodiment of the present application;
fig. 2 is a schematic flow chart illustrating a method for drawing a bullet screen according to a first embodiment of the present application;
fig. 3 is a schematic flow chart illustrating a method for drawing a bullet screen according to a second embodiment of the present application;
fig. 4 shows a block diagram of an apparatus for drawing a bullet screen according to a third embodiment of the present application;
fig. 5 shows a block diagram of an apparatus for drawing a bullet screen according to a fourth embodiment of the present application;
fig. 6 shows a block diagram of a mobile terminal according to an embodiment of the present application;
fig. 7 shows a block diagram of a mobile terminal for performing a method of drawing a bullet screen according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
At present, the video player is widely applied to a browser of a mobile internet platform, and aiming at videos in a webpage, in order to make the video player more beautiful, a video player is generally defined in the webpage by self. However, after researching a large number of browsers using a custom player, the inventors found that after a browser manufacturer customizes a player, the browser manufacturer often directly ignores the requirement of a user for a barrage display, so that some independent barrage data of traditional video websites supporting the barrage function, such as N station (niconiconiconiconico), a station (acfun), B station (bilibili), D station (dilidii), tucao, MADfan, mio barrage, Dilili, Otomadhome, and heat net, cannot be displayed on the custom video player. In the research process, the inventor researches the reason that the related user-defined player cannot display the bullet screen, researches how the bullet screen can be drawn on the user-defined player, researches the user experience of optimizing the user-defined player aiming at different types of video websites, and the like, and provides the method, the device and the mobile terminal for drawing the bullet screen in the embodiment of the application.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating interaction between a mobile terminal and a server according to an embodiment of the present disclosure. As shown in fig. 1, the mobile terminal 100, the browser server 200, and the bullet screen website server 400 are located in a network 300, which may be a wireless network or a wired network. Through the wireless network or the wired network, the mobile terminal 100 performs data interaction with the browser server 200 and the bullet screen website server 400. In the present application, the mobile terminal 100 may be a mobile phone, a tablet computer, a wearable electronic device, a vehicle-mounted electronic device, or the like. The browser client runs in the mobile terminal 100, the browser server runs in the browser server 200, and the bullet screen data of the bullet screen website is stored in the bullet screen website server 400. In the present application, a browser client running in the mobile terminal 100 may request the bullet screen website server 400 to obtain bullet screen data through a script file, and load the bullet screen data into a webpage for display.
A client corresponding to the application may be run in the mobile terminal 100, and a server corresponding to the application may be run in the browser server 200. For example, in the present application, a client corresponding to a browser runs in the mobile terminal 100, and a server corresponding to the browser runs in the browser server 200, and based on the above network environment, the client corresponding to the browser can perform data interaction with the browser server 200 through the network 300, thereby implementing data interaction with the server corresponding to the browser running on the browser server 200. For example, a client corresponding to a browser in the mobile terminal 100 sends a resource request to the browser server 200 through the network 300, and in response, the browser server 200 returns a link or information corresponding to the resource request to the client in the mobile terminal 100 through the network 300 so that the client can display the link or information. The method, the apparatus, the mobile terminal and the storage medium for drawing a bullet screen provided in the embodiments of the present application will be described in detail through specific embodiments.
First embodiment
Referring to fig. 2, fig. 2 is a schematic flow chart illustrating a method for drawing a bullet screen according to a first embodiment of the present application. The method for drawing the bullet screen comprises the steps of detecting whether the website domain name of the current video is in a domain name list capable of drawing the bullet screen, if so, obtaining bullet screen data of the current video by utilizing a script file for obtaining bullet screen data, directly drawing independent bullet screen data on a user-defined player, and effectively improving the experience of watching the video by a user. In a specific embodiment, the method for drawing a bullet screen is applied to the apparatus 500 for drawing a bullet screen as shown in fig. 4 and the mobile terminal 100 (fig. 1) configured with the apparatus 500 for drawing a bullet screen, and the method for drawing a bullet screen is used for improving the video viewing experience of a browser with a customized player on the mobile terminal 100. The following will describe the flow shown in fig. 2 in detail by taking a mobile browser as an example. The method for drawing the bullet screen can comprise the following steps:
step S101: and acquiring a domain name list capable of drawing the bullet screen and a script file for acquiring bullet screen data from the server.
In the embodiment of the present application, the server may be considered as an end operating on the server opposite to the client operating on the mobile terminal. The client may be a browser application running on the mobile terminal, or may be another application having a custom web player function. For convenience of description, a mobile browser will be described as an example.
The domain name capable of drawing the barrage can be a domain name of a video website with the barrage function specified by a server, such as a domain name "affin. The domain name list capable of drawing the bullet screen can be a domain name list which is formed by screening and summarizing the domain names of the video website with the bullet screen function by the server. The domain name in the domain name list may be a complete domain name of a video website with a bullet screen function, such as "www.bilibili.com", or may be a main domain name "bilibili. It is understood that the above examples of the domain names in the domain name list may be only a part of the domain name list. Any domain name station with the function of drawing the bullet screen can be added into the domain name list.
The script file can be configured correspondingly according to the domain name list so as to realize that the bullet screen data of the video source in the video webpage in the webpage can be acquired. For example, the domain name list includes a domain name of a B station, so the script file may directly include a program code pointing to the domain name of the B station, when the B station is opened in a browser webpage with a custom player to view a video, the script file may be injected at a webpage end, the barrage data of the video may be directly obtained from a server of the B station, and then the barrage data is transmitted to the browser client through a custom interface of the browser client for subsequent barrage drawing.
In the embodiment of the application, the domain name list that can draw the barrage and the script file for obtaining the barrage data can all be stored in the server for real-time updating or modification, and when the browser is started, the browser client can obtain the domain name list that can draw the barrage and the script file for obtaining the barrage data from the server. The method for acquiring the domain name list and the bullet screen data can be downloading.
Step S102: and judging whether the website domain name of the current video is in the domain name list.
In this embodiment, the client may obtain the domain name address of the video website when loading the video website. The website domain name of the current video may be a website domain name to which the video in the current page belongs. When judging whether the website domain name of the current video is in the domain name list, comparing the website domain name of the current video with the domain name in the domain name list in a full name manner, for example, if the website domain name of the current video is "www.bilibili.com/video/av 123456", then when the same domain name "www.bilibili.com/video/av 123456" exists in the domain name list, it may be determined that the website domain name of the current video is in the domain name list; if the website domain name of the current video is "www.bilibili.com/video/av 123456", for example, the representative part is "bilili.com", and when "bilili.com" exists in the domain name list, all website domain names of the current video with "bilili.com" can be considered as being in the domain name list.
If the website domain name of the current video is in the domain name list, executing step S103; and if the website domain name of the current video is not in the domain name list, ending the process.
Step S103: and acquiring the bullet screen data of the current video through the script file.
If the website domain name of the current video is in the domain name list, as an implementation manner, a script file which is downloaded before and is used for acquiring the bullet screen data can be injected into a webpage where the current video is located, the bullet screen data of the current video source can be directly acquired, the bullet screen data can be transmitted to a client from a webpage end through a user-defined interface of the client, and the client acquires the bullet screen data of the current video. After the client acquires the barrage data of the current video, the barrage data of the current video can be displayed in various forms, for example, through a barrage drawing control of a custom player, so that a user using a browser can watch the current video on the custom video player of the client and can also watch a normal barrage. The client-side customized interface may be a js (javascript) interface for acquiring the bullet screen data, which is customized by the browser client side, and may transparently transmit the bullet screen data acquired from the bullet screen website server through the script file to the client side.
Step S104: and drawing the bullet screen data in the user-defined player.
After the bullet screen data of the current video is acquired, the bullet screen data is drawn in a display interface of the current video, namely a display interface of a user-defined player by utilizing a bullet screen drawing control, so that a user can normally watch the bullet screen in the process of watching the current video. The bullet screen drawing control can convert bullet screen data into a form (such as images or characters) which can be recognized by a user and display the bullet screen data. As one mode, the barrage drawing control may be an open-source barrage drawing control provided by a barrage video website (for example, a station a or a station B), the open-source barrage drawing control may be laid out in advance to the topmost layer of a browser custom player, and a barrage is drawn based on the barrage data of the current video acquired by the client. As another mode, the bullet screen drawing control may also be a browser-defined bullet screen drawing control, which may also be laid out to the topmost layer of a user-defined player in advance, and draw a bullet screen based on the bullet screen data of the current video, so that a user can normally view the bullet screen in the process of viewing the current video.
According to the method for drawing the bullet screen, the bullet screen data are obtained by the script file in the domain name website appointed by the server, the bullet screen can be directly drawn on the user-defined player, and the experience of watching videos of a user is effectively improved.
Second embodiment
Referring to fig. 3, fig. 3 is a schematic flow chart illustrating a method for drawing a bullet screen according to a second embodiment of the present application. The following will describe the flow shown in fig. 3 in detail by taking a mobile browser as an example. The method for drawing the bullet screen can comprise the following steps:
step S201: and acquiring a domain name list capable of drawing the bullet screen and a script file for acquiring bullet screen data from the server.
Step S202: and storing the domain name list and the script file to the local client.
As a mode, the client may store the domain name list of the drawable bullet screen and the script file for acquiring the bullet screen data, which are acquired from the server in the previous step, to the local of the client, and when the client is started next time, the client may not request the server to acquire the domain name list of the drawable bullet screen and the script file for acquiring the bullet screen data, so that time and network traffic for downloading the domain name list and the script file are saved.
It can be understood that, when the domain name list of the server, which can draw the bullet screen, and the script file used for acquiring the bullet screen data are updated, the client may request the server to download the updated new version of the domain name list and the script file, and cover the local original domain name list and the script file. When the video webpage is opened next time, the client can directly call the domain name list and the script file of the latest version to perform subsequent domain name detection and bullet screen acquisition. For example, the server may push update information to the client after updating the domain name list and the script file each time, so that the client requests the server to acquire the updated domain name list and the script file in response to the update information; or the client inquires whether the domain name list and the script file are updated or not from the server when the client is started, and if the domain name list and the script file are updated, the server automatically issues the updated domain name list and the updated script file to the client; other ways of triggering the acquisition of updates are also possible.
Step S203: and acquiring the website domain name of the current video through an interface of the loading webpage.
In the process of loading the webpage, the client can acquire the website domain name of the current video page through a related interface which is used for loading the webpage and is arranged on the client. The interface for loading the web page may be a program code used by the web page end to load the web page, where the program code includes a code for acquiring a website domain name of the current video.
Step S204: and detecting whether the website domain name of the current video is in the domain name list in the interface callback of the loaded webpage.
The client may search the acquired domain name list for the website domain name of the current video in the interface callback of the loaded webpage to detect whether the website domain name of the current video matches with a domain name included in the domain name list, that is, whether the current video website has a bullet screen function.
If the website domain name of the current video is in the domain name list, executing step S205; if the website domain name of the current video is not in the domain name list, step S210 is executed.
Step S205: and calling a locally stored script file matched with the domain name list, and injecting the script file into the webpage of the current video.
The client side can inject the script file which is acquired from the server side and stored locally and matched with the domain name list into the webpage of the current video, and at the moment, the webpage end which is injected with the script file can send a request for acquiring the bullet screen data of the current video to the bullet screen website server which stores the bullet screen data of the current video.
Step S206: and acquiring the bullet screen data of the current video through the script file.
After the webpage end injected with the script file sends a request for acquiring the bullet screen data of the current video to the bullet screen website server, the bullet screen website server responds to the request to issue the bullet screen data of the current video source, namely, the webpage end acquires the bullet screen data of the current video from the bullet screen website server through the script file.
Step S207: and receiving the bullet screen data of the current video acquired by the script file through a bullet screen data interface.
As one mode, the bullet screen data interface may be a js (javascript) interface for acquiring bullet screen data, which is customized by the browser client, and may transparently transmit the bullet screen data acquired from the bullet screen website server through the script file to the client. After the script file acquires the bullet screen data, the client can acquire the bullet screen data acquired by the script file through the bullet screen data interface.
Step S208: and detecting whether a bullet screen switch of the user-defined player is turned on.
As a way, after the client acquires the bullet screen data, a bullet screen switch is provided on a ui (user interface) of the user-defined player, so that the user can select to open/close the bullet screen.
If the bullet screen switch of the user-defined player is turned on, executing step S209; and if the bullet screen switch of the user-defined player is not started, ending the process.
Step S209: and drawing the bullet screen data in a user-defined player based on the acquired bullet screen data of the current video.
The bullet screen drawing control can convert the bullet screen data into a form (such as images or characters) which can be recognized by a user and display the bullet screen data. As one mode, the barrage drawing control may be an open-source barrage drawing control provided by a barrage video website (for example, a station a or a station B), the open-source barrage drawing control may be laid out in advance to the topmost layer of a browser custom player, and a barrage is drawn based on the barrage data of the current video acquired by the client. As another mode, the bullet screen drawing control may also be a browser-defined bullet screen drawing control, which may also be laid out to the topmost layer of a user-defined player in advance, and draw a bullet screen based on the bullet screen data of the current video, so that a user can normally view the bullet screen in the process of viewing the current video.
Step S210: and judging whether the website of the current video has a bullet screen drawing function or not.
As a mode, when the website domain name of the current video is not in the domain name list, the client may obtain relevant features of the current video webpage (for example, whether there is a bullet screen plug-in or a code related to a bullet screen function) to determine whether the current video website has a bullet screen drawing function.
If the website of the current video has the function of drawing the bullet screen, executing step S211; and if the website of the current video does not have the function of drawing the bullet screen, ending the process.
Step S211: and generating a domain name expansion instruction based on the website domain name of the current video, and sending the domain name expansion instruction to a server.
The domain name extension instruction is used for indicating the server to add the website domain name of the current video into the domain name list. If the website of the current video has the function of drawing the bullet screen, and the website domain name of the current video is not in the domain name list, the website of the current video is possibly a new emerging website or a bullet screen video website which is not authenticated by the server before. At this time, a domain name extension instruction may be generated based on the website domain name of the current video and sent to the server, so as to indicate that the server can add the website domain name of the current video into the domain name list.
As a mode, the domain name extension instruction is further configured to instruct the server to update the script file for acquiring the bullet screen data based on the updated domain name list. It is understood that the script file for acquiring the bullet screen data is configured with a program code corresponding to the domain name list, so that the script file can acquire the bullet screen data from any video website in the domain name list. When the domain name list is updated, the server may update the script file for acquiring the bullet screen data based on the updated domain name list.
Compared with the first embodiment of the application, the method for drawing the bullet screen provided by the second embodiment of the application can avoid the loading of the domain name list and the script file when the client is opened every time by storing the domain name list and the script file acquired from the server locally, thereby saving the flow and time for loading data by the client; detecting that the bullet screen is played when the bullet screen switch is turned on, and providing a selection for a user whether to display the bullet screen; when the domain name of the current website with the bullet screen function is not in the domain name list, a domain name expansion instruction is sent to the server, the application range of the bullet screen video website can be dynamically expanded, manpower and time spent on manual judgment are avoided, and the scheme is more intelligent in application.
Third embodiment
Referring to fig. 4, fig. 4 is a block diagram illustrating an apparatus 500 for drawing a bullet screen according to a third embodiment of the present application. As will be explained below with respect to the block diagram shown in fig. 4, the apparatus 500 for drawing bullet screens includes: a first obtaining module 510, a detecting module 520, a second obtaining module 530, and a drawing module 540, wherein:
the first obtaining module 510 is configured to obtain a domain name list capable of drawing a bullet screen and a script file for obtaining bullet screen data from a server.
The detecting module 520 is configured to determine whether the website domain name of the current video is in the domain name list.
A second obtaining module 530, configured to obtain bullet screen data of the current video through the script file when the website domain name of the current video is in the domain name list.
And the drawing module 540 is configured to draw the bullet screen data in the user-defined player.
Fourth embodiment
Referring to fig. 5, fig. 5 is a block diagram illustrating an apparatus 600 for drawing a bullet screen according to a fourth embodiment of the present application. As will be explained below with respect to the block diagram shown in fig. 5, the apparatus 600 for drawing bullet screens includes: a first obtaining module 610, a saving module 620, a detecting module 630, a second obtaining module 640, a drawing module 650, a judging module 660 and an instruction module 670, wherein:
the first obtaining module 610 is configured to obtain a domain name list capable of drawing a bullet screen and a script file for obtaining bullet screen data from a server.
A saving module 620, configured to save the domain name list and the script file to the local client.
The detecting module 630 is configured to determine whether the website domain name of the current video is in the domain name list. Further, the detecting module 630 includes: a loading unit 631 and a detection unit 632, wherein:
and the loading unit 631 is configured to acquire the website domain name of the current video through an interface for loading a webpage.
A detecting unit 632, configured to detect, in the interface callback of the loaded web page, whether the website domain name of the current video is in the domain name list.
The second obtaining module 640 is configured to obtain the bullet screen data of the current video through the script file when the website domain name of the current video is in the domain name list. Further, the second obtaining module 640 includes: injection unit 641, acquisition unit 642 and pass through unit 643, wherein:
the injection unit 641 is configured to call a locally stored script file that matches the domain name list, and inject the script file into the web page of the current video.
An obtaining unit 642, configured to obtain the barrage data of the current video through the script file.
A transparent transmission unit 643, configured to receive, through a bullet screen data interface, bullet screen data of the current video acquired by the script file.
And the drawing module 650 is used for drawing the bullet screen data in the user-defined player. Further, the drawing module 650 includes: a switching unit 651 and a drawing unit 652, wherein:
and the switch unit 651 is used for detecting whether the bullet screen switch of the user-defined player is turned on.
The drawing unit 652 is configured to draw the bullet screen data in the custom player based on the acquired bullet screen data of the current video when the bullet screen switch of the current video is turned on.
The judging module 660 is configured to judge whether the website of the current video has a bullet screen drawing function when the website domain of the current video is not in the domain name list.
The instruction module 670 is configured to generate a domain name extension instruction based on the website domain name of the current video when the website of the current video has a bullet screen drawing function, and send the domain name extension instruction to a server, where the domain name extension instruction is used to instruct the server to add the website domain name of the current video to the domain name list. And the domain name extension instruction is also used for indicating the server to update the script file for acquiring the bullet screen data based on the updated domain name list.
Fifth embodiment
A fifth embodiment of the present application provides a mobile terminal comprising a display, a memory, and a processor, the display and the memory coupled to the processor, the memory storing instructions that, when executed by the processor, perform:
acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server;
judging whether the website domain name of the current video is in the domain name list or not;
and when the website domain name of the current video is in the domain name list, acquiring bullet screen data of the current video through the script file.
Sixth embodiment
A sixth embodiment of the present application provides a computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform:
acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server;
judging whether the website domain name of the current video is in the domain name list or not;
and when the website domain name of the current video is in the domain name list, acquiring bullet screen data of the current video through the script file.
In summary, according to the method, the device and the mobile terminal for drawing the bullet screen, whether the website domain name of the current video is in the domain name list capable of drawing the bullet screen is detected, if the website domain name of the current video is in the domain name list, the script file for obtaining the bullet screen data is used for obtaining the bullet screen data of the current video, the independent bullet screen data can be directly drawn on the user-defined player, and the experience of watching the video by a user can be effectively improved.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. For any processing manner described in the method embodiment, all the processing manners may be implemented by corresponding processing modules in the apparatus embodiment, and details in the apparatus embodiment are not described again.
Referring to fig. 6, based on the method and the apparatus for drawing a pop-up screen, an embodiment of the present invention further provides a mobile terminal 100, which includes an electronic body 10, where the electronic body 10 includes a housing 12 and a main display 120 disposed on the housing 12. The housing 12 may be made of metal, such as steel or aluminum alloy. In this embodiment, the main display 120 generally includes a display panel 111, and may also include a circuit or the like for responding to a touch operation performed on the display panel 111. The Display panel 111 may be a Liquid Crystal Display (LCD) panel, and in some embodiments, the Display panel 111 is a touch screen 109.
Referring to fig. 7, in an actual application scenario, the mobile terminal 100 may be used as a smart phone terminal, in which case the electronic body 10 generally further includes one or more processors 102 (only one is shown in the figure), a memory 104, an RF (Radio Frequency) module 106, an audio circuit 110, a sensor 114, an input module 118, and a power module 122. It will be understood by those skilled in the art that the structure shown in fig. 6 is merely illustrative and is not intended to limit the structure of the electronic body 10. For example, the electronics body section 10 may also include more or fewer components than shown in FIG. 6, or have a different configuration than shown in FIG. 6.
Those skilled in the art will appreciate that all other components are peripheral devices with respect to the processor 102, and the processor 102 is coupled to the peripheral devices through a plurality of peripheral interfaces 124. The peripheral interface 124 may be implemented based on the following criteria: universal Asynchronous Receiver/Transmitter (UART), General Purpose Input/Output (GPIO), Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C), but the present invention is not limited to these standards. In some examples, the peripheral interface 124 may comprise only a bus; in other examples, the peripheral interface 124 may also include other elements, such as one or more controllers, for example, a display controller for interfacing with the display panel 111 or a memory controller for interfacing with a memory. These controllers may also be separate from the peripheral interface 124 and integrated within the processor 102 or a corresponding peripheral.
The memory 104 may be used to store software programs and modules, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the electronic body portion 10 or the primary display 120 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The RF module 106 is configured to receive and transmit electromagnetic waves, and achieve interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The RF module 106 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The RF module 106 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The Wireless network may use various Communication standards, protocols, and technologies, including, but not limited to, Global System for Mobile Communication (GSM), Enhanced Mobile Communication (Enhanced Data GSM Environment, EDGE), wideband Code division multiple Access (W-CDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (WiFi) (e.g., Institute of Electrical and Electronics Engineers (IEEE) standard IEEE 802.10A, IEEE802.11 b, IEEE802.1 g, and/or IEEE802.11 n), Voice over internet protocol (VoIP), world wide mail Access (Microwave for Wireless Communication), Wi-11 Wireless Access (wimax), and any other suitable protocol for instant messaging, and may even include those protocols that have not yet been developed.
The audio circuitry 110, earpiece 101, sound jack 103, microphone 105 collectively provide an audio interface between a user and the electronic body portion 10 or the main display 120. Specifically, the audio circuit 110 receives sound data from the processor 102, converts the sound data into an electrical signal, and transmits the electrical signal to the earpiece 101. The earpiece 101 converts the electrical signal into sound waves that can be heard by the human ear. The audio circuitry 110 also receives electrical signals from the microphone 105, converts the electrical signals to sound data, and transmits the sound data to the processor 102 for further processing. Audio data may be retrieved from the memory 104 or through the RF module 106. In addition, audio data may also be stored in the memory 104 or transmitted through the RF module 106.
The sensor 114 is disposed in the electronic body portion 10 or the main display 120, examples of the sensor 114 include, but are not limited to: light sensors, operational sensors, pressure sensors, gravitational acceleration sensors, and other sensors.
Specifically, the light sensors may include a light sensor 114F, a pressure sensor 114G. Among them, the pressure sensor 114G may detect a pressure generated by pressing on the mobile terminal 100. That is, the pressure sensor 114G detects pressure generated by contact or pressing between the user and the mobile terminal, for example, contact or pressing between the user's ear and the mobile terminal. Accordingly, the pressure sensor 114G may be used to determine whether contact or pressing has occurred between the user and the mobile terminal 100, as well as the magnitude of the pressure.
Referring to fig. 6 again, in the embodiment shown in fig. 6, the light sensor 114F and the pressure sensor 114G are disposed adjacent to the display panel 111. The light sensor 114F may turn off the display output when an object is near the main display 120, for example, when the electronic body portion 10 moves to the ear.
As one of the motion sensors, the gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping) and the like for recognizing the attitude of the mobile terminal 100. In addition, the electronic body 10 may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a thermometer, which are not described herein,
in this embodiment, the input module 118 may include the touch screen 109 disposed on the main display 120, and the touch screen 109 may collect touch operations of the user (for example, operations of the user on or near the touch screen 109 using any suitable object or accessory such as a finger, a stylus, etc.) and drive the corresponding connection device according to a preset program. Optionally, the touch screen 109 may include a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 102, and can receive and execute commands sent by the processor 102. In addition, the touch detection function of the touch screen 109 may be implemented by various types, such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch screen 109, in other variations, the input module 118 may include other input devices, such as keys 107. The keys 107 may include, for example, character keys for inputting characters, and control keys for activating control functions. Examples of such control keys include a "back to home" key, a power on/off key, and the like.
The main display 120 is used to display information input by a user, information provided to the user, and various graphic user interfaces of the electronic body section 10, which may be composed of graphics, text, icons, numbers, video, and any combination thereof, and in one example, the touch screen 109 may be provided on the display panel 111 so as to be integrated with the display panel 111.
The power module 122 is used to provide power supply to the processor 102 and other components. Specifically, the power module 122 may include a power management system, one or more power sources (e.g., batteries or ac power), a charging circuit, a power failure detection circuit, an inverter, a power status indicator light, and any other components associated with the generation, management, and distribution of power within the electronic body portion 10 or the primary display 120.
The mobile terminal 100 further comprises a locator 119, the locator 119 being configured to determine an actual location of the mobile terminal 100. In this embodiment, the locator 119 implements the positioning of the mobile terminal 100 by using a positioning service, which is understood to be a technology or a service for obtaining the position information (e.g., longitude and latitude coordinates) of the mobile terminal 100 by using a specific positioning technology and marking the position of the positioned object on an electronic map.
It should be understood that the mobile terminal 100 described above is not limited to a smartphone terminal, but it should refer to a computer device that can be used in mobility. Specifically, the mobile terminal 100 refers to a mobile computer device equipped with an intelligent operating system, and the mobile terminal 100 includes, but is not limited to, a smart phone, a smart watch, a tablet computer, and the like.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (mobile terminal) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments. In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (9)

1. A method of drawing a bullet screen, the method comprising:
acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server, wherein the domain name capable of drawing the bullet screen is the domain name of a video website with a bullet screen function specified by the server, and the script file is a program script and is correspondingly configured according to the domain name list;
storing the domain name list and the script file to a local client;
judging whether the website domain name of the current video is in the domain name list or not;
if the current video is in the domain name list, acquiring bullet screen data of the current video by calling the locally stored script file;
and drawing the bullet screen data in the user-defined player.
2. The method of claim 1, wherein determining whether the website domain name of the current video is in the domain name list comprises:
acquiring a website domain name of a current video through an interface of a loading webpage;
and detecting whether the website domain name of the current video is in the domain name list in the interface callback of the loaded webpage.
3. The method of claim 1, wherein obtaining the bullet screen data of the current video through the script file comprises:
calling a locally stored script file matched with the domain name list, and injecting the script file into the webpage of the current video;
acquiring bullet screen data of the current video through the script file;
and receiving the bullet screen data of the current video acquired by the script file through a bullet screen data interface.
4. The method of claim 1, wherein drawing the barrage data in a custom player comprises:
detecting whether a bullet screen switch of the user-defined player is turned on or not;
and if the current video is started, drawing the bullet screen data in a user-defined player based on the acquired bullet screen data of the current video.
5. The method according to any one of claims 1-4, wherein after determining whether the website domain name of the current video is within the domain name list, the method comprises:
if not, judging whether the website of the current video has a bullet screen drawing function;
and if the video playing function is available, generating a domain name expansion instruction based on the website domain name of the current video, and sending the domain name expansion instruction to a server, wherein the domain name expansion instruction is used for indicating the server to add the website domain name of the current video into the domain name list.
6. The method according to claim 5, wherein the domain name extension instruction is further configured to instruct the server to update the script file for acquiring the bullet screen data based on the updated domain name list.
7. An apparatus for drawing a bullet screen, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a domain name list capable of drawing a bullet screen and a script file for acquiring bullet screen data from a server, the domain name capable of drawing the bullet screen is the domain name of a video website with a bullet screen function specified by the server, and the script file is a program script and is correspondingly configured according to the domain name list;
the detection module is used for judging whether the website domain name of the current video is in the domain name list or not;
the storage module is used for storing the domain name list and the script file to the local part of the client;
the second obtaining module is used for obtaining bullet screen data of the current video by calling the locally stored script file when the website domain name of the current video is in the domain name list;
and the drawing module is used for drawing the bullet screen data in the user-defined player.
8. A mobile terminal comprising a display, a memory, and a processor, the display and the memory coupled to the processor, the memory storing instructions that, when executed by the processor, the processor performs the method of any of claims 1-6.
9. A computer-readable storage medium having program code executable by a processor, the program code causing the processor to perform the method of any of claims 1-6.
CN201810395773.2A 2018-04-27 2018-04-27 Method and device for drawing bullet screen and mobile terminal Active CN108881969B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810395773.2A CN108881969B (en) 2018-04-27 2018-04-27 Method and device for drawing bullet screen and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810395773.2A CN108881969B (en) 2018-04-27 2018-04-27 Method and device for drawing bullet screen and mobile terminal

Publications (2)

Publication Number Publication Date
CN108881969A CN108881969A (en) 2018-11-23
CN108881969B true CN108881969B (en) 2021-04-13

Family

ID=64327395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810395773.2A Active CN108881969B (en) 2018-04-27 2018-04-27 Method and device for drawing bullet screen and mobile terminal

Country Status (1)

Country Link
CN (1) CN108881969B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112637670B (en) * 2020-12-15 2022-07-29 上海哔哩哔哩科技有限公司 Video generation method and device
CN114979788A (en) * 2021-02-24 2022-08-30 上海哔哩哔哩科技有限公司 Bullet screen display method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102696001A (en) * 2009-07-22 2012-09-26 思科技术公司 Recording a hyper text transfer protocol (HTTP) session for playback
CN103533442A (en) * 2013-09-27 2014-01-22 北京奇虎科技有限公司 Method and device for loading video popped screen
CN105187891A (en) * 2015-09-09 2015-12-23 上海微令信息科技有限公司 Transparent-browser-based video comment screen display system and method and device with system
CN107529070A (en) * 2016-06-21 2017-12-29 天脉聚源(北京)科技有限公司 A kind of method and system for realizing barrage
CN107733997A (en) * 2017-09-22 2018-02-23 刘静静 A kind of implementation method of Multifunctional mobile webpage and web game based on browser

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6185948B2 (en) * 2015-03-16 2017-08-23 株式会社ソニー・インタラクティブエンタテインメント Information processing apparatus and recording reservation support method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102696001A (en) * 2009-07-22 2012-09-26 思科技术公司 Recording a hyper text transfer protocol (HTTP) session for playback
CN103533442A (en) * 2013-09-27 2014-01-22 北京奇虎科技有限公司 Method and device for loading video popped screen
CN105187891A (en) * 2015-09-09 2015-12-23 上海微令信息科技有限公司 Transparent-browser-based video comment screen display system and method and device with system
CN107529070A (en) * 2016-06-21 2017-12-29 天脉聚源(北京)科技有限公司 A kind of method and system for realizing barrage
CN107733997A (en) * 2017-09-22 2018-02-23 刘静静 A kind of implementation method of Multifunctional mobile webpage and web game based on browser

Also Published As

Publication number Publication date
CN108881969A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108021642B (en) Application program recommendation method and device, mobile terminal and storage medium
US10853437B2 (en) Method and apparatus for invoking application programming interface
CN108924037B (en) Display method of rich media communication RCS message and mobile terminal
CN109857403B (en) Page updating method and device, page processing method and device
CN108197264B (en) Webpage acceleration display method and device, mobile terminal and storage medium
CN108762859B (en) Wallpaper display method and device, mobile terminal and storage medium
CN108037990B (en) Task information processing method and device and server
CN108038729B (en) Reward issuing method, device and server
US10956653B2 (en) Method and apparatus for displaying page and a computer storage medium
CN108834132B (en) Data transmission method and equipment and related medium product
CN109284144B (en) Fast application processing method and mobile terminal
CN107967153B (en) Application program management method and mobile terminal
CN108491148B (en) Application sharing method and terminal
CN108668328B (en) Network switching method and mobile terminal
CN108536415B (en) Application volume control method and device, mobile terminal and computer readable medium
CN106953898B (en) Method and device for acquiring software package
US10298590B2 (en) Application-based service providing method, apparatus, and system
CN103607431B (en) Mobile terminal resource processing method, device and equipment
CN107765954B (en) Application icon updating method, mobile terminal and server
CN106095423B (en) Method, terminal and server for providing browsing service
CN108881969B (en) Method and device for drawing bullet screen and mobile terminal
CN109284146B (en) Light application starting method and mobile terminal
CN110221736B (en) Icon processing method and device, mobile terminal and storage medium
CN112749074A (en) Test case recommendation method and device
CN106230919B (en) File uploading method and device

Legal Events

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