CN115037991A - Browser video playing method and device, terminal equipment and readable storage medium - Google Patents

Browser video playing method and device, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN115037991A
CN115037991A CN202210641384.XA CN202210641384A CN115037991A CN 115037991 A CN115037991 A CN 115037991A CN 202210641384 A CN202210641384 A CN 202210641384A CN 115037991 A CN115037991 A CN 115037991A
Authority
CN
China
Prior art keywords
plug
browser
playing
sub
video
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.)
Granted
Application number
CN202210641384.XA
Other languages
Chinese (zh)
Other versions
CN115037991B (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.)
Xiamen Entropy Technology Co ltd
Original Assignee
Xiamen Entropy Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Entropy Technology Co ltd filed Critical Xiamen Entropy Technology Co ltd
Priority to CN202210641384.XA priority Critical patent/CN115037991B/en
Publication of CN115037991A publication Critical patent/CN115037991A/en
Application granted granted Critical
Publication of CN115037991B publication Critical patent/CN115037991B/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/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8166Monomedia components thereof involving executable data, e.g. software
    • H04N21/8173End-user applications, e.g. Web browser, game
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons
    • 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/41Structure of client; Structure of client peripherals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a browser video playing method, a device, terminal equipment and a readable storage medium, wherein the method comprises the steps of establishing webSocket connection between a browser and a video playing plug-in; the video playing plug-in is pre-installed and independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins; sending a starting instruction to the video playing plug-in unit through the browser so as to start the corresponding sub playing plug-in unit; covering the started sub-playing plug-in at the corresponding position of the browser and displaying; and sending a playing instruction to the started sub-playing plug-in unit through the browser so as to enable the started sub-playing plug-in unit to play the video. The method can effectively solve the problem of compatibility of the video playing plug-in different browsers, can play different types or kinds of videos only by installing one video plug-in, and is very convenient to use.

Description

Browser video playing method and device, terminal equipment and readable storage medium
Technical Field
The application relates to the technical field of video playing, in particular to a browser video playing method, a browser video playing device, a terminal device and a computer readable storage medium.
Background
The browser is an important tool for retrieving, displaying and transmitting information resources, can present webpages, pictures or videos, and is widely applied. If a video is presented or played using a browser, a video playing plug-in is typically installed. However, in recent years, various browsers are in endless, and different video playing plugins supported by different browsers are different, and the plugins are limited by the types of the browsers and cannot be compatible with each other. In addition, most video playing plug-ins can only play one format or type of video, so multiple video playing plug-ins are usually installed in one browser, and most video playing plug-ins are usually integrated into some applications (such as some browsers), so that the use is inconvenient and the installation process is complicated.
Disclosure of Invention
In view of this, embodiments of the present application provide a browser video playing method, apparatus, terminal device, and computer-readable storage medium.
In a first aspect, an embodiment of the present application provides a browser video playing method, where the method includes:
establishing webSocket connection between a browser and a video playing plug-in; the video playing plug-in is pre-installed and is independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins;
sending a starting instruction to the video playing plug-in unit through the browser so as to start a corresponding sub-playing plug-in unit;
covering the started sub-playing plug-in at the corresponding position of the browser and displaying;
and sending a playing instruction to the started sub-playing plug-in unit through the browser so as to enable the started sub-playing plug-in unit to play the video.
In a second aspect, an embodiment of the present application provides a browser video playing apparatus, where the apparatus includes:
the connection establishing module is used for establishing webSocket connection between the browser and the video playing plug-in; the video playing plug-in is pre-installed and is independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins;
the video playing plugin starting module is used for sending a starting instruction to the video playing plugin through the browser so as to start the corresponding video playing plugin;
the sub-plug-in display module is used for covering and displaying the started sub-playing plug-in at the corresponding position of the browser;
and the video playing module is used for sending a playing instruction to the started sub-playing plug-in through the browser so as to enable the started sub-playing plug-in to play a video.
In a third aspect, an embodiment of the present application provides a terminal device, including: a memory; one or more processors coupled with the memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to execute the browser video playing method provided by the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the browser video playing method provided in the first aspect.
According to the browser video playing method, the browser video playing device, the terminal device and the computer readable storage medium, webSocket connection between a browser and a video playing plug-in is established; the video playing plug-in is pre-installed and independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins; then sending a starting instruction to the video playing plug-in unit through the browser so as to start the corresponding sub playing plug-in unit; covering the started sub-playing plug-in at the corresponding position of the browser and displaying; and sending a playing instruction to the started sub-playing plug-in unit through the browser so as to enable the started sub-playing plug-in unit to play the video.
The video playing method of the browser in the embodiment of the application is characterized in that a video playing plug-in which a plurality of sub playing plug-ins are arranged and is independent of the browser is installed in advance; when the browser needs to use the video playing plug-in, the browser is connected with the video playing plug-in, wherein different types of browsers can be connected with the video playing plug-in simultaneously, and then the browser sends related instructions to start the corresponding sub-playing plug-in, so that related videos are played. The method can effectively solve the problem of compatibility of the video playing plug-in different browsers, and can play different types or kinds of videos only by installing one video plug-in, so that the method is very convenient to use.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a browser video playing method according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of a video playback plug-in connected to a browser according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a video playing method for a browser according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a video playing apparatus of a browser provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer-readable storage medium provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely below, and it should be understood that the described embodiments are only a part of the embodiments of the present application, and not all 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.
For more detailed explanation of the present application, a browser video playing method, an apparatus, a terminal device and a computer readable storage medium provided in the present application are specifically described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 shows a schematic diagram of an application scenario of a browser video playing method provided in an embodiment of the present application, where the application scenario includes a terminal device 100 provided in an embodiment of the present application, and the terminal device 100 may be various electronic devices (such as block diagrams of 102, 104, 106, and 108) having a display screen, including but not limited to a smart phone and a computer device, where the computer device may be at least one of a desktop computer, a portable computer, a laptop computer, a tablet computer, and the like. The terminal equipment can be provided with a browser and a video playing plug-in, wherein the browser and the video playing plug-in belong to two completely independent application programs. Alternatively, the type or category of browser may be varied, such as an IE browser, google browser, firefox browser, 360 browser, etc. The video playing plug-in is an application program specially used for playing streaming media, supports webSocket communication, and can be used as a service to run in the background after being installed. Waiting for other applications (such as a browser) to establish a webSocket connection with the application, and initiating the instruction. The functions of the method are to process the playing of the media stream, and are not limited to directly performing service functions such as control operation and playback search on a Network Video Recorder (NVR) and a video camera through an http request, as shown in fig. 2.
The terminal device 100 may be generally referred to as one of a plurality of terminal devices, and the present embodiment is only illustrated by the terminal device 100. Those skilled in the art will appreciate that the number of terminal devices described above may be greater or fewer. For example, the number of the terminal devices may be only a few, or the number of the terminal devices may be tens of or hundreds, or may be more, and the number and the type of the terminal devices are not limited in the embodiment of the present application. The terminal device 100 may be configured to execute a browser video playing method provided in the embodiment of the present application.
In an optional implementation manner, the application scenario may include a server in addition to the terminal device 100 provided in the embodiment of the present application, where a network is disposed between the server and the terminal device. The network is used to provide a medium for a communication link between the terminal device and the server. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers are merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server may be a server cluster composed of a plurality of servers. Wherein, the terminal device interacts with the server through the network to receive or send messages and the like. The server may be a server that provides various services. Wherein the server may be configured to execute the steps of a browser video playing method provided in this embodiment. In addition, when the terminal device executes the browser video playing method provided in the embodiment of the present application, a part of the steps may be executed at the terminal device, and a part of the steps may be executed at the server, which is not limited herein.
Based on this, the embodiment of the application provides a browser video playing method. Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a browser video playing method according to an embodiment of the present application, and taking the application of the method to the terminal device in fig. 1 as an example for description, the method includes the following steps:
and step S110, establishing webSocket connection between the browser and the video playing plug-in.
The video playing plug-in is pre-installed and independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins.
Specifically, the video playing plug-in is an application program for streaming video playing, which is pre-installed in a terminal device (e.g., a computer). The video playing plug-in is a functional component independent of the browser, namely, not embedded in the browser.
Optionally, the video playing plug-in includes a plurality of subplayback plug-ins, each subplayback plug-in representing a different type or function of plug-in, e.g., different subplayback plug-ins support different types or formats of video playing. In an alternative embodiment, the sub-player plug-in may include, but is not limited to, a single window plug-in, a four-screen plug-in, a plug-in carrying a pan-tilt-control function, and the like.
WebSocket is a protocol for full duplex communication over a single TCP connection. The method has the greatest characteristic that the server can actively push information to the client, the client can also actively send information to the server, and the method is a real two-way equal conversation, namely, the two main bodies can be communicated with each other through websockets. At present, all browsers can support a webSocket protocol, so that when the browsers are connected with video playing plugins (or sub-playing plugins) through websockets, the browsers and the video playing plugins (or the sub-playing plugins) can communicate with each other.
Further, the process of establishing the webSocket connection between the browser and the video playing plug-in is as follows: and opening an H5 page in the browser, and then inputting related information (such as browser information and video playing plug-in information) in an H5 page, so as to establish a webSocket connection between the browser and the video playing plug-in. The browser information includes, but is not limited to, a browser name, an installation or storage location, an access mode or path, and the like; the video playing plug-in information includes, but is not limited to, a video playing plug-in name, an installation or storage location, an access mode or path, and the like.
The browser may be one or more of a google browser, a firefox browser, a 360 browser, or an IE browser. When a plurality of browsers exist, the plurality of browsers can establish webSocket connection with the video playing plug-in unit at the same time.
In addition, after the webSocket connection is established between the browser and the video playing plug-in, the video playing plug-in can return identification information to the browser through a webSocket protocol, the identification information generally refers to uuid of the video playing plug-in, the uuid is used as an identification of the connection, and is also a sending address for the browser to send an instruction to the video playing plug-in, so that the browser can conveniently send the instruction to the video playing plug-in.
Step S120, a starting instruction is sent to the video playing plug-in unit through the browser, so that the corresponding sub playing plug-in unit is started.
After the connection between the browser and the video playing plug-in is successfully established, the browser can send a starting instruction to start any one or more sub playing plug-ins in the video playing plug-in. The specific process is as follows: when a video needs to be played in the browser and a certain sub-playing plug-in is needed, a starting instruction can be sent out on an H5 page of the browser, the starting instruction is sent to the video playing plug-in through a webSocket protocol, and after the video playing plug-in receives the starting instruction, the corresponding sub-playing plug-in is started according to the starting instruction.
The starting instruction mainly comprises a plug-in type and placeholder information. The plug-in type is mainly used for determining the sub-playing plug-in needing to be started, namely determining which sub-playing plug-in needs to be started; the placeholder information is mainly used for determining the size and the display position of the started sub-play plug-in.
Next, an embodiment of a promoter play plug-in is given, which is described in detail as follows:
in one embodiment, the launch instruction includes a plug-in type; starting a corresponding sub-play plug-in, comprising: and starting the corresponding sub-play plug-in according to the plug-in type.
The plug-in type can be multiple, and each type can represent different functions or support different formats of videos.
In an alternative embodiment, the plug-in types may include a single window plug-in, a four-screen plug-in, a plug-in carrying a pan/tilt/zoom function, and the like.
After the plug-in type is determined, retrieval or indexing can be carried out in various sub-playing plug-ins of the video playing plug-in according to the plug-in type, and then the sub-playing plug-ins corresponding to the plug-in type are started.
And step S130, covering the started sub-playing plug-in to a corresponding position of the browser and displaying the sub-playing plug-in.
In one embodiment, the launch instruction includes placeholder information; covering the started sub-play plug-in to the corresponding position of the browser, including: determining the target size and the target position of the started sub-playing plug-in according to the occupation information; and covering the started sub-playing plug-in to the target position of the browser according to the target size.
Where placeholder information generally refers to placeholder div information, where div is a div element within the browser H5 page that is pre-populated as a replacement plug-in when the subplayplug-in is not launched. When the sub-play plug-in is started, the target size (e.g., width and height) and the target position (i.e., the display position in the browser) of the started sub-play plug-in are determined by the position information and size in the div information.
After the video playing plug-in receives the place-occupying information, the display position (namely the target position) and the display size (namely the target size) of the sub playing plug-in to be started in the browser are determined according to the place-occupying information, and then the started sub playing plug-in is covered in the browser to be displayed according to the target position and the target size.
In addition, after the subplayltem is started, the subplayltem may return an identification information to the browser via the webSocket protocol, where the identification information generally refers to uuid of the started subplayltem, and the uuid is used as an identification for sending an instruction between the currently started subplayltem and an H5 page in the browser, and is also a sending address for the browser to send an instruction to the currently started subplayltem, so that the browser can send an instruction to the currently started subplayltem conveniently.
Step S140, sending a playing instruction to the started sub-playing plug-in through the browser, so that the started sub-playing plug-in plays the video.
After the sub-play plug-in is started, a play instruction may be sent to the sub-play plug-in through an H5 page of the browser, where the play instruction is related information for executing the sub-play plug-in to play the video, and may include, but is not limited to, a type of the video to be played, a name of the video to be played, a speed of the video to be played, a path of the video to be played, and the like.
The browser video playing method provided by the embodiment of the application comprises the steps of firstly establishing webSocket connection between a browser and a video playing plug-in; the video playing plug-in is pre-installed and independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins; then sending a starting instruction to the video playing plug-in unit through the browser so as to start the corresponding sub playing plug-in unit; covering the started sub-playing plug-in at the corresponding position of the browser and displaying; and sending a playing instruction to the started sub-playing plug-in unit through the browser so as to enable the started sub-playing plug-in unit to play the video.
The video playing method of the browser in the embodiment of the application is characterized in that a video playing plug-in which a plurality of sub playing plug-ins are arranged and is independent of the browser is installed in advance; when the browser needs to use the video playing plug-in, the browser is connected with the video playing plug-in, wherein different types of browsers can be connected with the video playing plug-in simultaneously, and then the browser sends related instructions to start the corresponding sub-playing plug-in, so that related videos are played. The method can effectively solve the problem of compatibility of the video playing plug-in different browsers, and can play different types or kinds of videos only by installing one video plug-in, so that the method is very convenient to use.
Because the browser and the video playing plug-in (or the sub playing plug-in) are relatively independent, when one sub playing plug-in is started, the sub playing plug-in can be covered at the designated position of the browser instead of being embedded in a certain page of the browser. When the browser changes based on some operations of the user, the sub-playing plug-in does not change correspondingly along with the change of the browser. For example, when the browser zooms, switches tab pages, and the like, the sub-playing plug-in does not directly zoom along with the browser. If the sub-play plug-in needs to make corresponding changes along with the browser, some instructions need to be sent to the started sub-play plug-in through the browser, and then the play plug-in is controlled, for example, the video playing is stopped, the sub-play plug-in is closed, the sub-play plug-in is adjusted, the sub-play plug-in is hidden, and the like.
In one embodiment, the browser video playing method further includes: and sending a stop instruction to the started sub-playing plug-in through the browser so as to stop the video playing of the started sub-playing plug-in.
Specifically, the stop instruction is a command for controlling the sub-play plug-in to stop playing the video. The command may send a stop command to the started sub-play plug-in using the H5 page of the browser, and the sub-play plug-in responds to the stop command to stop playing the video currently being played.
In one embodiment, the browser video playing method further includes: and sending a closing instruction to the started sub-play plug-in unit through the browser so as to close the started sub-play plug-in unit.
The closing instruction is used for closing the started and running sub-playing plug-in. A closing instruction can be sent to the started sub-playing plug-in unit through an H5 page of the browser and based on a webSocket protocol, and the sub-playing plug-in unit receiving the closing instruction can respond to the closing instruction, so that the sub-playing plug-in unit which is running is closed; when the sub-playing plug-in is closed, the browser cannot communicate with the sub-playing plug-in until the browser restarts through an opening instruction.
In one embodiment, the browser video playing method further includes: when the situation that the browser zooms is monitored, an adjusting instruction is sent to the started sub-playing plug-in unit through the browser, so that the target size and/or the target position of the started sub-playing plug-in unit displayed on the browser are/is adjusted.
Specifically, when the browser sends a zoom, for example, a browser frame becomes large or small, the sub-playing plug-in needs to be adjusted accordingly. The H5 page of the browser can be adopted, and an adjustment instruction is sent to the started sub-playing plug-in unit through the webSocket protocol, and the sub-playing plug-in unit responds to the adjustment instruction so as to change the display size and/or the display position of the sub-playing plug-in unit in the display.
In one embodiment, the browser video playing method further includes: when it is monitored that the browser has page switching, a hiding instruction is sent to the started sub-playing plug-in unit through the browser so as to hide the started sub-playing plug-in unit.
Specifically, when the browser switches tab pages (i.e., performs page switching), the started sub-play plug-in may overlay the switched browser pages, but the sub-play plug-in is not desirable to display at this time. At this time, a switching event of the browser needs to be monitored, and when the browser switches out of the current H5 page, a hiding command needs to be initiated to the sub-play plug-in to hide the sub-play plug-in. When the browser is switched back to the current page, the browser sends a display command again to enable the sub-playing plug-in to display again.
By adopting the mode, the video playing plug-in (or the sub playing plug-in) can be directly controlled through the browser, so that the video playing plug-in is more convenient to use. In addition, the video playing plug-in supports simultaneous connection with a plurality of browsers, can well solve the problem of compatibility, and improves the use efficiency.
It should be understood that, although the steps in the flowchart of fig. 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in fig. 3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The embodiments disclosed in the present application describe a method for playing a browser video in detail, and the method disclosed in the present application can be implemented by using devices in various forms.
Please refer to fig. 4, which is a video playing device of a browser disclosed in the embodiment of the present application, and the video playing device mainly includes:
the connection establishing module 410 is used for establishing webSocket connection between the browser and the video playing plug-in; the video playing plug-in is pre-installed and independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins.
And the sub-plug-in starting module 420 is configured to send a starting instruction to the video playing plug-in through the browser, so as to start the corresponding sub-playing plug-in.
And a sub plug-in display module 430, configured to overlay the started sub play plug-in to a corresponding position of the browser and display the overlay.
The video playing module 440 is configured to send a playing instruction to the started sub-playing plug-in through the browser, so that the started sub-playing plug-in plays the video.
In one embodiment, the launch instruction includes a plug-in type; and a plug-in starting module 420 for starting the corresponding sub-playing plug-in according to the plug-in type.
In one embodiment, the launch instruction includes placeholder information; the daughter board display module 430 is configured to determine a target size and a target position of the started daughter board according to the placeholder information; and covering the started sub-playing plug-in to the target position of the browser according to the target size.
In one embodiment, the apparatus further comprises: and the video playing stopping module is used for sending a stopping instruction to the started sub-playing plug-in unit through the browser so as to stop the started sub-playing plug-in unit from playing the video.
In one embodiment, the apparatus further comprises: and the sub-playing plug-in closing module is used for sending a closing instruction to the started sub-playing plug-in through the browser so as to close the started sub-playing plug-in.
In one embodiment, the apparatus further comprises: and the sub-play plug-in adjusting module is used for sending an adjusting instruction to the started sub-play plug-in through the browser when the situation that the browser zooms is monitored, so as to adjust the target size and/or the target position of the started sub-play plug-in displayed on the browser.
In one embodiment, the apparatus further comprises: and the sub-playing plug-in hiding module is used for sending a hiding instruction to the started sub-playing plug-in through the browser when the browser is monitored to have page switching so as to hide the started sub-playing plug-in.
For specific limitations of the video playing device of the browser, reference may be made to the above limitations of the method, which are not described herein again. The various modules in the above-described apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the terminal device, and can also be stored in a memory in the terminal device in a software form, so that the processor can call and execute operations corresponding to the modules.
Referring to fig. 5, fig. 5 is a block diagram illustrating a structure of a terminal device according to an embodiment of the present application. The terminal device 50 may be a computer device. The terminal device 50 in the present application may include one or more of the following components: a processor 52, a memory 54, and one or more applications, wherein the one or more applications may be stored in the memory 54 and configured to be executed by the one or more processors 52, the one or more applications configured to perform the methods described in the above-mentioned embodiments of the method applied to the terminal device, and also configured to perform the methods described in the above-mentioned embodiments of the method applied to the browser video playback method.
Processor 52 may include one or more processing cores. The processor 52 connects various parts within the overall terminal device 50 using various interfaces and lines, and performs various functions of the terminal device 50 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 54, and calling data stored in the memory 54. Alternatively, the processor 52 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 52 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 52, but may be implemented by a communication chip.
The Memory 54 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 54 may be used to store instructions, programs, code sets, or instruction sets. The memory 54 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal device 50 in use, and the like.
It will be understood by those skilled in the art that the structure shown in fig. 5 is a block diagram of only a part of the structure related to the present application, and does not constitute a limitation to the terminal device to which the present application is applied, and a specific terminal device may include more or less components than those shown in the figure, or combine some components, or have a different arrangement of components.
In summary, the terminal device provided in the embodiment of the present application is used to implement the corresponding browser video playing method in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Referring to fig. 6, a block diagram of a computer-readable storage medium according to an embodiment of the present disclosure is shown. The computer readable storage medium 60 stores program codes, which can be called by the processor to execute the methods described in the above embodiments of the browser video playing method, and can also be called by the processor to execute the methods described in the above embodiments of the browser video playing method.
The computer-readable storage medium 60 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 60 includes a non-transitory computer-readable medium. The computer readable storage medium 60 has storage space for program code 62 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 62 may be compressed, for example, in a suitable form.
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.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A browser video playing method is characterized by comprising the following steps:
establishing webSocket connection between a browser and a video playing plug-in; the video playing plug-in is pre-installed and is independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins;
sending a starting instruction to the video playing plug-in unit through the browser so as to start a corresponding sub playing plug-in unit;
covering the started sub-playing plug-in at the corresponding position of the browser and displaying;
and sending a playing instruction to the started sub-playing plug-in through the browser so as to enable the started sub-playing plug-in to play the video.
2. The method of claim 1, wherein the launch instruction comprises a plug-in type; the starting of the corresponding sub-play plug-in includes:
and starting the corresponding sub-playing plug-in according to the plug-in type.
3. The method of claim 1, wherein the launch instruction comprises placeholder information; the step of covering and displaying the started sub-playing plug-in at the corresponding position of the browser comprises the following steps:
determining the target size and the target position of the started sub-playing plug-in according to the occupation information;
and covering the started sub-playing plug-in to the target position of the browser according to the target size and displaying the sub-playing plug-in.
4. The method according to any one of claims 1-3, further comprising:
and sending a stop instruction to the started sub-playing plug-in through the browser so as to enable the started sub-playing plug-in to stop playing the video.
5. The method according to any one of claims 1-3, further comprising:
and sending a closing instruction to the started sub-playing plug-in unit through the browser so as to close the started sub-playing plug-in unit.
6. The method according to any one of claims 1-3, further comprising:
when it is monitored that the browser zooms, an adjusting instruction is sent to the started sub-playing plug-in through the browser, so that the target size and/or the target position of the started sub-playing plug-in displayed on the browser are adjusted.
7. The method according to any one of claims 1-3, further comprising:
when it is monitored that the browser has page switching, a hiding instruction is sent to the started sub-playing plug-in through the browser so as to hide the started sub-playing plug-in.
8. A browser video playback apparatus, comprising:
the connection establishing module is used for establishing webSocket connection between the browser and the video playing plug-in; the video playing plug-in is pre-installed and is independent of the browser; the video playing plug-in comprises one or more sub playing plug-ins;
the video playing plugin starting module is used for sending a starting instruction to the video playing plugin through the browser so as to start the corresponding video playing plugin;
the sub-plug-in display module is used for covering and displaying the started sub-playing plug-ins to corresponding positions of the browser;
and the video playing module is used for sending a playing instruction to the started sub-playing plug-in through the browser so as to enable the started sub-playing plug-in to play a video.
9. A terminal device, comprising:
a memory; one or more processors coupled with the memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-7.
10. A computer-readable storage medium, characterized in that a program code is stored in the computer-readable storage medium, which program code can be called by a processor to execute the method according to any of claims 1-7.
CN202210641384.XA 2022-06-08 2022-06-08 Browser video playing method and device, terminal equipment and readable storage medium Active CN115037991B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210641384.XA CN115037991B (en) 2022-06-08 2022-06-08 Browser video playing method and device, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210641384.XA CN115037991B (en) 2022-06-08 2022-06-08 Browser video playing method and device, terminal equipment and readable storage medium

Publications (2)

Publication Number Publication Date
CN115037991A true CN115037991A (en) 2022-09-09
CN115037991B CN115037991B (en) 2023-07-07

Family

ID=83123992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210641384.XA Active CN115037991B (en) 2022-06-08 2022-06-08 Browser video playing method and device, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN115037991B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8250228B1 (en) * 2011-09-27 2012-08-21 Google Inc. Pausing or terminating video portion while continuing to run audio portion of plug-in on browser
US20130167045A1 (en) * 2009-11-13 2013-06-27 Adobe Systems Incorporated Browser Privacy Mode Support
CN111556353A (en) * 2020-04-15 2020-08-18 重庆锐明信息技术有限公司 Video playing method, video playing management device and terminal equipment
CN111800667A (en) * 2020-07-28 2020-10-20 深圳Tcl数字技术有限公司 Browser video playing method, video playing device and storage medium
CN113438487A (en) * 2021-05-28 2021-09-24 福州市拾联信息科技有限公司 Method for compatible private video format webpage player
CN114125565A (en) * 2021-11-23 2022-03-01 深圳康佳电子科技有限公司 Method, device and storage medium for playing video stream based on browser

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130167045A1 (en) * 2009-11-13 2013-06-27 Adobe Systems Incorporated Browser Privacy Mode Support
US8250228B1 (en) * 2011-09-27 2012-08-21 Google Inc. Pausing or terminating video portion while continuing to run audio portion of plug-in on browser
CN111556353A (en) * 2020-04-15 2020-08-18 重庆锐明信息技术有限公司 Video playing method, video playing management device and terminal equipment
CN111800667A (en) * 2020-07-28 2020-10-20 深圳Tcl数字技术有限公司 Browser video playing method, video playing device and storage medium
CN113438487A (en) * 2021-05-28 2021-09-24 福州市拾联信息科技有限公司 Method for compatible private video format webpage player
CN114125565A (en) * 2021-11-23 2022-03-01 深圳康佳电子科技有限公司 Method, device and storage medium for playing video stream based on browser

Also Published As

Publication number Publication date
CN115037991B (en) 2023-07-07

Similar Documents

Publication Publication Date Title
TWI776066B (en) Picture generating method, device, terminal, server and storage medium
CN111901674B (en) Video playing control method and device
CN110062284B (en) Video playing method and device and electronic equipment
CN112261226B (en) Horizontal screen interaction method and device, electronic equipment and storage medium
EP4210053A1 (en) Application program control method and apparatus, electronic device, and storage medium
CN106951220B (en) Data processing method and device
JP2009070261A (en) Display control unit and method, and program
EP3677322A1 (en) Virtual scene display method and device, and storage medium
CN113784049B (en) Camera calling method of android system virtual machine, electronic equipment and storage medium
CN113076048A (en) Video display method and device, electronic equipment and storage medium
CN114071243A (en) Video playing method and device, electronic equipment and storage medium
CN112532896A (en) Video production method, video production device, electronic device and storage medium
CN111918098A (en) Video processing method and device, electronic equipment, server and storage medium
CN110324432B (en) Data processing method, device and medium applied to terminal and computing equipment
CN112015309B (en) Display switching method and device and mobile terminal
CN112714341B (en) Information acquisition method, cloud set top box system, entity set top box and storage medium
CN115794095B (en) JavaScript-based illusion engine UI development method and system
CN112187887A (en) Webpage real-time communication method and device for multiple pages and electronic equipment
CN115037991B (en) Browser video playing method and device, terminal equipment and readable storage medium
CN115617439A (en) Data display method and device, electronic equipment and storage medium
CN113835663A (en) Display control method, device, system, electronic apparatus, medium, and program product
CN113923469A (en) Processing method, device, equipment and storage medium for continuous delivery of gifts in live broadcast
CN113867601A (en) Carousel method, electronic device and storage medium
CN112948730A (en) Webpage data display method and device, storage medium and electronic equipment
CN111782100A (en) Method, device, terminal and storage medium for previewing background picture

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
CB03 Change of inventor or designer information

Inventor after: Liu Xianlin

Inventor after: Huang Qilong

Inventor before: Liu Xianlin

CB03 Change of inventor or designer information