Player extension method and device, electronic equipment and storage medium

CN115421812BActive Publication Date: 2026-10-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211053441.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2026-10-16
Estimated Expiration
2042-08-30

AI Technical Summary

Technical Problem

[0003]在实现本公开构思的过程中,发明人发现相关技术中至少存在如下问题:相关技术中,根据用户对使用场景的不同需要,对播放器的扩展插件进行二次封装,无法满足播放器对复杂的使用场景的支持度

Benefits of technology

[0034] According to embodiments of this disclosure, the method employs the following techniques: determining a player event corresponding to an event method (where the event method is a method pre-loaded into the plugin to be installed and used to process player events); determining a target event type partition corresponding to the event type of the player event; registering the plugin to be installed into the player's processing module based on the method information of the event method and the target event type partition; and loading the plugin to be installed into the player's display module to complete the extension of the plugin to be installed into the player. The processing module and the display module are decoupled, allowing plugins to be installed in complex scenarios to be registered and loaded separately in the decoupled processing and display modules, eliminating the need to encapsulate corresponding players for different scenarios. This improves the player's support for complex scenarios and at least partially overcomes the technical problem in related technologies where secondary encapsulation of player extension plugins based on different user needs for usage scenarios fails to meet the player's support for complex usage scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115421812B_ABST
    Figure CN115421812B_ABST
Patent Text Reader

Abstract

The present disclosure provides a player extension method and device, electronic equipment and storage medium, which can be applied to the technical field of player. The method comprises the following steps: determining a player event corresponding to an event method, wherein the event method is a method preloaded into a to-be-installed plug-in and used for processing the player event; determining a target event type partition corresponding to an event type of the player event; registering the to-be-installed plug-in into a processing module of the player based on method information of the event method and the target event type partition; and loading the to-be-installed plug-in into a presentation module of the player to complete extension of the to-be-installed plug-in to the player, wherein the processing module and the presentation module are decoupled from each other.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of media player technology, and more specifically, to a media player extension method, apparatus, device, storage medium, and program product. Background Technology

[0002] When watching videos or listening to audio through a client, the default player in the client is usually used. However, the default player has limited functionality and cannot meet the higher needs of users. Therefore, the player needs to be repackaged to meet the higher needs of users.

[0003] In the process of realizing the present invention, the inventors discovered that the related technology has at least the following problems: In the related technology, the expansion plugins of the player are repackaged according to the different needs of users for different usage scenarios, which cannot meet the player's support for complex usage scenarios. Summary of the Invention

[0004] In view of the above, this disclosure provides a player extension method, apparatus, electronic device, storage medium, and computer program product.

[0005] One aspect of this disclosure provides a player extension method, including:

[0006] Identify the player event corresponding to the event method, where the event method is a method pre-loaded into the plugin to be installed and used to handle player events;

[0007] Determine the target event type partition corresponding to the event type of the player event;

[0008] Based on the method information of the event method and the target event type partition, the plugin to be installed is registered to the player's processing module; and

[0009] The plugin to be installed is loaded into the player's display module to complete the extension of the plugin into the player. The processing module and the display module are decoupled from each other.

[0010] According to embodiments of this disclosure, based on method information of the event method and target event type partitioning, registering the plugin to be installed to the player's processing module includes:

[0011] Store the player events and event method information into the event configuration table of the processing module that matches the target event type partition, so that the event configuration table records the mapping relationship between player events and event methods;

[0012] The method information of the event method and the plugin information of the plugin to be installed are stored in the plugin configuration table of the processing module that matches the target event type partition, so that the plugin configuration table records the mapping relationship between the method information and the plugin information.

[0013] According to embodiments of this disclosure, the above-described player expansion method further includes:

[0014] In response to determining that a player event is an interactive trigger event, the event handling phase of the event method is determined, which includes a pre-processing phase, an in-processing phase, and a post-processing phase.

[0015] Add the event handling phase identifier information to the event method's method information.

[0016] According to embodiments of this disclosure, loading the plugin to be installed into the player's display module includes:

[0017] Based on the target event type partition, the target container frame for loading the plugin to be installed is determined from multiple container frames of the presentation module, wherein the multiple container frames are pre-divided according to the event type partition;

[0018] Based on the hierarchical structure of the target container framework, determine the target hierarchical information of the plugin to be installed in the player;

[0019] Based on the target hierarchy information and the target container frame, the plugin to be installed is loaded into the player's display module so that the playback content that matches the plugin to be installed can be displayed in the target container frame of the player.

[0020] According to embodiments of this disclosure, the above-described player expansion method further includes:

[0021] In response to an uninstallation request for the target plugin, the plugin uninstallation method in the player is invoked;

[0022] Use plugin uninstallation methods to uninstall the target plugin from the player.

[0023] According to embodiments of this disclosure, determining a target event type partition corresponding to the event type of a player event includes:

[0024] Determine the event type of the player event;

[0025] The target event type partition corresponding to the event type of the player event is determined from the event type partition table. The event type partition table includes multiple event type partitions, which are divided according to event type.

[0026] Another aspect of this disclosure provides a player expansion device, comprising:

[0027] The first determining module is used to determine the player event corresponding to the event method, wherein the event method is a method pre-loaded into the plugin to be installed and used to handle player events;

[0028] The second determining module is used to determine the target event type partition corresponding to the event type of the player event;

[0029] The registration module is used to register plugins to be installed into the player's processing module based on event method information and target event type partitioning; and

[0030] The loading module is used to load the plugin to be installed into the player's display module, thereby expanding the plugin into the player. The processing module and the display module are decoupled from each other.

[0031] Another aspect of this disclosure provides an electronic device, including: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method as described above.

[0032] Another aspect of this disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, are used to implement the method described above.

[0033] Another aspect of this disclosure provides a computer program product including computer-executable instructions that, when executed, implement the method described above.

[0034] According to embodiments of this disclosure, the method employs the following techniques: determining a player event corresponding to an event method (where the event method is a method pre-loaded into the plugin to be installed and used to process player events); determining a target event type partition corresponding to the event type of the player event; registering the plugin to be installed into the player's processing module based on the method information of the event method and the target event type partition; and loading the plugin to be installed into the player's display module to complete the extension of the plugin to be installed into the player. The processing module and the display module are decoupled, allowing plugins to be installed in complex scenarios to be registered and loaded separately in the decoupled processing and display modules, eliminating the need to encapsulate corresponding players for different scenarios. This improves the player's support for complex scenarios and at least partially overcomes the technical problem in related technologies where secondary encapsulation of player extension plugins based on different user needs for usage scenarios fails to meet the player's support for complex usage scenarios. Attached Figure Description

[0035] The above and other objects, features and advantages of this disclosure will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:

[0036] Figure 1 This illustration schematically shows an exemplary system architecture to which player extension methods and apparatus can be applied according to embodiments of this disclosure;

[0037] Figure 2 A flowchart illustrating a player expansion method according to an embodiment of the present disclosure is shown schematically;

[0038] Figure 3 This schematically illustrates the relationship between the base classes of the player extension method according to an embodiment of the present disclosure;

[0039] Figure 4 A schematic diagram of a player container according to an embodiment of the present disclosure is shown;

[0040] Figure 5 A schematic diagram of a player container according to yet another embodiment of the present disclosure is shown;

[0041] Figure 6 A flowchart illustrating a player control method according to an embodiment of the present disclosure is shown schematically.

[0042] Figure 7 A flowchart illustrating a player control method according to yet another embodiment of the present disclosure is shown schematically;

[0043] Figure 8 A flowchart illustrating a player control method according to yet another embodiment of the present disclosure is shown schematically;

[0044] Figure 9 A flowchart illustrating a player control method according to yet another embodiment of the present disclosure is shown schematically;

[0045] Figure 10 A block diagram schematically illustrates a player expansion device according to an embodiment of the present disclosure; and

[0046] Figure 11 A block diagram of an electronic device suitable for implementing a player expansion method according to an embodiment of the present disclosure is shown schematically. Detailed Implementation

[0047] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.

[0048] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0049] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.

[0050] When using expressions such as "at least one of A, B, and C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). Similarly, when using expressions such as "at least one of A, B, or C," the expression should generally be interpreted in accordance with the meaning commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, or C" should include, but is not limited to, systems having A alone, having B alone, having C alone, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).

[0051] In related technologies, audio / video playback can generally be achieved through the following two implementation methods: One implementation method is for the browser to directly use the video or audio element of the page for playback. When using the video or audio element of the page for playback, the player will display different user interfaces (UI) in different browsers. The other implementation method is to encapsulate the video or audio tag based on the browser's page elements, thereby unifying the player's UI and making the player look more aesthetically pleasing than the browser's default player. However, its function is limited to playing video or audio content. If it is necessary to display more complex information such as bullet comments, advertisements, comments, etc., it is necessary to re-encapsulate the existing player and deeply couple the components of the player to meet the needs of complex scenarios, or to develop a new player that meets the current scenario.

[0052] In view of this, embodiments of this disclosure provide a player extension method. The method includes determining a player event corresponding to an event method, wherein the event method is a method pre-loaded into the plugin to be installed and used to process player events; determining a target event type partition corresponding to the event type of the player event; registering the plugin to be installed into the player's processing module based on the method information of the event method and the target event type partition; and loading the plugin to be installed into the player's display module to complete the extension of the plugin to be installed into the player, wherein the processing module and the display module are decoupled from each other. This allows plugins to be installed in complex scenarios to be registered and loaded separately in the decoupled processing module and display module, without needing to encapsulate corresponding players according to different scenarios, thus improving the player's support for complex scenarios. Therefore, it at least partially overcomes the technical problem in related technologies where secondary encapsulation of player extension plugins is performed according to different user needs for usage scenarios, failing to meet the player's support for complex usage scenarios.

[0053] Figure 1 This illustration schematically depicts an exemplary system architecture to which player extension methods and apparatus can be applied according to embodiments of this disclosure. It should be noted that... Figure 1 The examples shown are merely examples of system architectures that can be applied to the embodiments of this disclosure, in order to help those skilled in the art understand the technical content of this disclosure, but do not mean that the embodiments of this disclosure cannot be used in other devices, systems, environments or scenarios.

[0054] like Figure 1As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, and 103, a network 104, and a server 105. The network 104 serves as a medium for providing a communication link between the terminal devices 101, 102, and 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0055] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software, etc. (for example only).

[0056] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0057] Server 105 can be a server that provides various services, such as a backend management server that supports websites browsed by users using terminal devices 101, 102, and 103 (for example only). The backend management server can analyze and process data such as received user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0058] It should be noted that the player expansion method provided in this disclosure embodiment can generally be executed by server 105. Correspondingly, the player expansion device provided in this disclosure embodiment can generally be located in server 105. The player expansion method provided in this disclosure embodiment can also be executed by a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Correspondingly, the player expansion device provided in this disclosure embodiment can also be located in a server or server cluster that is different from server 105 and capable of communicating with terminal devices 101, 102, 103 and / or server 105. Alternatively, the player expansion method provided in this disclosure embodiment can also be executed by terminal devices 101, 102, or 103, or by other terminal devices different from terminal devices 101, 102, or 103. Correspondingly, the player expansion device provided in this disclosure embodiment can also be located in terminal devices 101, 102, or 103, or in other terminal devices different from terminal devices 101, 102, or 103.

[0059] For example, the plugin to be installed may originally be stored in any one of terminal devices 101, 102, or 103 (e.g., terminal device 101, but not limited thereto), or it may be stored on an external storage device and imported into terminal device 101. Then, terminal device 101 may execute the player extension method provided in the embodiments of this disclosure locally, or send the plugin to be installed to other terminal devices, servers, or server clusters, and have the other terminal devices, servers, or server clusters that receive the plugin to be installed execute the player extension method provided in the embodiments of this disclosure.

[0060] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0061] Figure 2 A flowchart illustrating a player extension method according to an embodiment of the present disclosure is shown schematically.

[0062] like Figure 2 As shown, the method includes operations S201 to S204.

[0063] In operation S201, the player event corresponding to the event method is determined, wherein the event method is a method pre-loaded into the plugin to be installed and used to handle player events.

[0064] According to embodiments of this disclosure, an event method may have event method identification information, and a player event may have player event identification information. The identification information of the method can be matched with the identification information of the player event, and the player event corresponding to the event method can be determined based on the matching result.

[0065] In operation S202, the target event type partition corresponding to the event type of the player event is determined.

[0066] According to embodiments of this disclosure, player events in the player can be pre-classified into different event types. For example, player events can be divided into four event types: player element type (player-con), video element type (video-con), media element type (media), and plugin element type (plugin). Player-con type events may include scroll events; video-con type events may include full-screen events and exit full-screen events; media type events may include play events, pause events, seek events, abort events, can play events, can play through events (the browser can start playing), duration change events, empty playlist events, ended playlist events, error loading events, loaded data events, loaded meta data events, and loaded data events (the browser searches for audio / video). The event types include: start, progress, seeking, sought, suspend, waiting, playing after pause or buffering, time up date, volume change, stall, and rate change. Plugin events can include other player events besides those mentioned above.

[0067] According to embodiments of this disclosure, the identification information of the target event type partition can be mapped to the event type of the player event, thereby determining the target event type partition corresponding to the event type of the player event.

[0068] In operation S203, based on the method information of the event method and the target event type partition, the plugin to be installed is registered to the player's processing module.

[0069] According to embodiments of this disclosure, the player's processing module can be a module for processing the player's internal code logic. Specifically, the processing module may include an event manager and an event registrar. The event registrar can be used to register event methods, and the event manager is used to manage the registered event methods. When a user performs a control operation on the player, the method information of the event method can be determined in the target event type partition corresponding to the player event.

[0070] In operation S204, the plugin to be installed is loaded into the player's display module to complete the extension of the plugin to be installed into the player. The processing module and the display module are decoupled from each other.

[0071] According to embodiments of this disclosure, the display module of the player can be used to display the playback screen on a terminal device. The plugin to be installed can be loaded into the display module so that it can be displayed on the playback screen. The display module and the processing module can be decoupled, so that the display module can be replaced according to actual needs.

[0072] According to embodiments of this disclosure, the plugin to be installed can be loaded into the display module of the player based on its function.

[0073] According to embodiments of this disclosure, the method employs the following techniques: determining a player event corresponding to an event method (where the event method is a method pre-loaded into the plugin to be installed and used to process player events); determining a target event type partition corresponding to the event type of the player event; registering the plugin to be installed into the player's processing module based on the method information of the event method and the target event type partition; and loading the plugin to be installed into the player's display module to complete the extension of the plugin to be installed into the player. The processing module and the display module are decoupled, allowing plugins to be installed in complex scenarios to be registered and loaded separately in the decoupled processing and display modules, eliminating the need to encapsulate corresponding players for different scenarios. This improves the player's support for complex scenarios and at least partially overcomes the technical problem in related technologies where secondary encapsulation of player extension plugins based on different user needs for usage scenarios fails to meet the player's support for complex usage scenarios.

[0074] According to embodiments of this disclosure, the player may include a player container with a container framework, and may also include base classes for player extension plugins. Different classes have different responsibilities, and the base classes cooperate with each other to provide storage and invocation of event method information and other operation methods. Through the base classes configured in the player container, the plugins loaded in the player's display module can be displayed in the container framework.

[0075] Figure 3 The diagram illustrates the relationship between the base classes of the player extension method according to an embodiment of the present disclosure.

[0076] like Figure 3 As shown, the basic classes can include event management class 301, event registration class 302, container management class 303, auxiliary class 304, playback management class 305, unified service class 306, playback base class 307, playback class 308, and plugin base class 309. The playback class inherits from the playback base class and forms the external interface of the playback component. The playback base class manages events, containers, and playback through the unified service class. The event manager categorizes different types of event sources. The playback management class manages the actual playback type. These basic classes constitute the player container part of the player, combining the functionality of the player container with the functionality of the plugins by providing extended functionality for plugins, functionality for calling event methods, etc.

[0077] According to embodiments of this disclosure, event management class 301 can be implemented through an event manager, and may include attributes and methods. The attributes of event management class 301 mainly include the following: player service: a player service class, used to call control operations; event Infos: distinguishes different plugins in the player. The methods of event management class 301 mainly include: on(event name, stage name, element name): registers an event method; once(event name, stage name, element name): registers an event method, executed only once; off(event name, stage name, element name): cancels an event method; emit(event name, args): calls an event method; destroy(): destroys a function method. According to embodiments of this disclosure, event registration class 302 can be implemented through an event registrar, which may include attributes and methods. The attributes mainly include the following: type: registrar type, including media, player-con, media-con, plugin; player service: a player service class, used to call other control operations; event info: a plugin that stores method information, with the corresponding data structure based on the event processing stage division as follows:

[0078]

[0079] The main methods of the event registration class include: on(event name, stage name, plugin name, fn): register the event method; once(event name, stage name, plugin name, fn): register the event method, which is executed only once; off(event name, stage name, plugin name, fn): cancel the event method; emit(event name, args): call the event method; destroy(): destroy the event method.

[0080] According to the embodiments of this disclosure, the plugin to be installed can be registered to the player's processing module by calling the registration event method. Since both the event management class 301 and the event registration class 302 include the registration event method, the plugin to be installed can be registered to the player's processing module by calling the registration event method in the event management class 301 and the event registration class 302. Other methods are similar and will not be described in detail here.

[0081] According to embodiments of this disclosure, the container management class 303 can handle functions such as player container initialization, plugin initialization, plugin addition, plugin deletion, and plugin attribute settings. The main attributes of the container management class include: `playerservice`: a player service class that calls other classes; and `plugins`: stores plugins. The main methods of the container management class 303 include: `add plugin(plugin option)`: adds a plugin; `delete plugin(pluginname)`: deletes a plugin; `set attr(element name, value)`: sets plugin attributes; `get Attr(element name)`: retrieves plugin attributes; `add class(element name)`: adds a class; `deleteClass(element name)`: deletes a class; `full screen(element name)`: full-screen mode; and `exitfull screen()`: exits full-screen mode.

[0082] According to embodiments of this disclosure, the plugin to be installed can be loaded into the player's display module through the plugin addition method in the container management class, thereby completing the extension of the plugin to be installed into the player.

[0083] According to embodiments of this disclosure, auxiliary class 304 can determine the length of some judgment bytes, strings, etc. in the player.

[0084] According to embodiments of this disclosure, the playback management class 305 includes attributes and methods. The attributes mainly include: `type`: playback type, which can be either `video` or `audio`. The methods of the playback management class 305 mainly include: `play()`: playback method; `pause()`: pause method; `seek(time)`: playback method for a specified time; `load(media src)`: method for loading the playback source.

[0085] According to embodiments of this disclosure, playback management class 305 can provide two playback types through video and audio classes.

[0086] According to embodiments of this disclosure, the unified service class 306 can implement the underlying logic control of the player and can uniformly manage and call the event management class, event registration class, container management class, auxiliary class and playback management class.

[0087] According to embodiments of this disclosure, the unified service class 306 may include attributes and methods. Attributes may include: `eventinfo manage`: manages the event manager; `plugin manage`: manages the plugin manager; `media manage`: manages the playback manager; `plugins info`: manages plugin information records; `order arr`: plugin hierarchy information. The methods of the unified service class 306 include: `get plugin config(plugin name)`: retrieves plugin configuration; `isinstalled(pluginname)`: determines if a plugin is installed; `install(plugin option)`: installs the plugin; `uninstall(pluginName)`: uninstalls the plugin; `ready()`: initializes the plugin; `load(media option)`: loads the media source; `register plugin(plugin option)`: registers the plugin; and `destroy()`: destroys the plugin.

[0088] According to embodiments of this disclosure, when the player on the terminal device is running in the background, a destruction function method can be called to exit the background, thereby releasing the running memory of the terminal device and improving the operating efficiency of the terminal device.

[0089] According to embodiments of this disclosure, the playback base class 307 serves as the entry point for all properties and event methods in the player, providing complete media playback and plugin extension capabilities by calling a unified service class. The main properties of the playback base class 307 include: player service: player service object.

[0090] According to embodiments of this disclosure, the main methods of the playback base class 307 include: add plugin(pluginoption): add plugin method; delete plugin(plugin name): delete plugin method; set attr(elementname,value): set plugin attribute method; get attr(element name): get plugin attribute method; add class(element name): add class method; delete class(element name): delete class method; full screen(element name): full-screen method; exit full screen(): exit full-screen method; emit(element name): send player event method; on(event name, stage name, plugin name,fn): store player event method; once(event name, stage name, plugin name,fn): store player event method, executed only once; off(event name, stage name, plugin name,fn): unregister player event method; destroy(): destroy function method; init(): initialization method, which maps all default properties of the media player to the current object.

[0091] According to embodiments of this disclosure, playback class 308 inherits from playback base class 307. Playback class 308 mainly verifies the configuration parameters passed by the user and provides input to the outside world. The main structure of the configuration is as follows: {controls: true, width: 300, height: 400, src: 123.mp3, type: 'video'}, where controls controls whether the default control bar is displayed; width and height control the width and height; src identifies the media source; and type indicates the media type, which can be video or audio.

[0092] According to the embodiments of this disclosure, the attributes of the plugin base class 309 mainly include: config (plugin configuration item), which contains the player events, event methods and other related data configured for the plugin to be installed.

[0093] According to embodiments of this disclosure, the methods of the plugin base class 309 mainly include: init plugin(): plugin initialization method; isinited(): whether it has been initialized method; destroy(): destruction function method.

[0094] According to embodiments of this disclosure, the method information of the event method of the plugin to be installed can be registered to the player's processing module and the plugin to be installed can be loaded into the player's display module through the plugin base class 309 initialization plugin method.

[0095] According to the embodiments of this disclosure, each of the above basic classes is responsible for handling different aspects. Through combination and inheritance, they have the ability to handle player events, plugins, and event methods in the player, and provide complete player capabilities to the outside world.

[0096] According to embodiments of this disclosure, plugins can provide elements for user interaction, such as control bar plugins, which are provided by default in the player. Users can also customize plugins according to their needs. The player can be based on the Vue framework; the descriptions in this disclosure are based on the Vue framework. If other frameworks are used, corresponding adjustments can be made, which will not be elaborated here.

[0097] According to embodiments of this disclosure, based on method information of the event method and target event type partitioning, registering the plugin to be installed to the player's processing module includes:

[0098] The method information of player events and event methods is stored in the event configuration table of the processing module that matches the target event type partition, so that the event configuration table records the mapping relationship between player events and event methods.

[0099] The method information of the event method and the plugin information of the plugin to be installed are stored in the plugin configuration table of the processing module that matches the target event type partition, so that the plugin configuration table records the mapping relationship between the method information and the plugin information.

[0100] According to embodiments of this disclosure, player events can have identification information, and event methods can have identification information. The identification information of an event method can be included in the method information, and there can be a mapping relationship between the identification information of player events and the identification information of event methods. The identification information of a player event can be the name information of the player event, or the name information of the area in the player where control operations are performed; the identification information of an event method can be the name information of the event method, or the name information of the area in the player where control operations are performed.

[0101] According to embodiments of this disclosure, there can be multiple event configuration tables, and each event configuration table can correspond to one of the multiple event type partitions. Based on the target event type partition, an event configuration table that matches the target event type partition can be determined.

[0102] According to embodiments of this disclosure, the plugin information of the plugin to be installed may be the name information of the plugin to be installed, or the display area information of the plugin to be installed in the player.

[0103] According to embodiments of this disclosure, the method information of the event method may include the name information of the plugin to be installed. The mapping relationship between the method information and the plugin information can be determined based on the name information of the plugin to be installed included in the method information of the event method and the name information in the plugin information of the plugin to be installed. Then, the method information of the event method and the plugin information of the plugin to be installed are stored in the plugin configuration table of the processing module that matches the target event type partition.

[0104] According to embodiments of this disclosure, by storing the mapping relationship between event methods and player events, and the mapping relationship between event method information and plugin information in partitions according to target event types, the event methods corresponding to player events and the plugins corresponding to the event method information can be quickly found.

[0105] According to embodiments of this disclosure, the above-described player expansion method further includes:

[0106] In response to determining that a player event is an interactive trigger event, the event handling phase of the event method is determined, which includes a pre-processing phase, an in-processing phase, and a post-processing phase.

[0107] Add the event handling phase identifier information to the event method's method information.

[0108] According to embodiments of this disclosure, the event handling phase can be a pre-processing phase, an in-processing phase, or a post-processing phase. Events in the pre-processing phase can include play events, pause events, seek events, full screen events, exit full screen events, and events included in all plugin element types. Events in the in-processing phase can include all events. Events in the post-processing phase can include all events except play events and pause events.

[0109] According to embodiments of this disclosure, the interactive trigger event can be determined by the user's control operation on the player. The interactive trigger event can have multiple event processing stages, and the event processing stage in which the event method is located can be determined based on the event processing stages of the interactive trigger event.

[0110] According to embodiments of this disclosure, whether a first player event has a pre-processing phase can be determined by the phase identifier of the first playback event. For example, a player event in the pre-processing phase can be named in camelCase by adding "before" before the event method name, and a player event in the post-processing phase can be named in camelCase by adding "after" before the event method name.

[0111] According to embodiments of this disclosure, player events and event method information can be stored in an event configuration table using a publish-subscribe pattern and a Document Object Model (DOM) event listener pattern.

[0112] According to embodiments of this disclosure, when a player event is associated with a plugin built into the player, such as a play event or pause event, a publish-subscribe pattern can be used to store the event information of the event method corresponding to the player event, and then the event method can be listened to through the DOM interface. When a player event is associated with a plugin installed in the player, only the publish-subscribe pattern is used to store the event information of the event method corresponding to the player event.

[0113] According to embodiments of this disclosure, loading the plugin to be installed into the player's display module includes:

[0114] Based on the target event type partition, the target container frame for loading the plugin to be installed is determined from multiple container frames of the presentation module, wherein the multiple container frames are pre-divided according to the event type partition.

[0115] Based on the hierarchical structure of the target container framework, determine the target hierarchical information of the plugin to be installed in the player.

[0116] Based on the target hierarchy information and the target container frame, the plugin to be installed is loaded into the player's display module so that the playback content that matches the plugin to be installed can be displayed in the target container frame of the player.

[0117] According to embodiments of this disclosure, the container frame can be a structural layer in the UI frame of the player. Each container frame has a corresponding hierarchical structure in the player, and the display content in different layers is displayed in different positions on the terminal device.

[0118] According to embodiments of this disclosure, the hierarchical structure of the target container frame is the outermost layer, and it can be determined that the display layer of the plugin to be installed in the player is the outermost layer, thereby determining that the target hierarchical information of the plugin to be installed is the outermost layer.

[0119] According to embodiments of this disclosure, the plugin to be installed can be installed into the target container framework of the player by calling the plugin install method in the player.

[0120] According to embodiments of this disclosure, a playerEvent object can also be configured for the data property of the plugin to be installed, in key-value format, where the key is the name of the event method and the value is the event method.

[0121] According to embodiments of this disclosure, when a user loads a custom plugin to be installed into the player, only configuration data needs to be set, and the player will load the custom plugin into the player according to the configuration data provided by the user, and the custom plugin can access the data in the player.

[0122] According to embodiments of this disclosure, the configuration data required for a custom plugin mainly includes: level: the hierarchy information of the custom plugin, the plugin base class arranges the position of the custom plugin according to the hierarchy information; player events: the pre-loaded event methods in the custom plugin, which exist in key-value pairs, where the key is the name of the event method and the value is the event method; data: the internal data of the custom plugin; methods: the event methods inside the custom plugin.

[0123] Figure 4 A schematic diagram of a player container according to an embodiment of the present disclosure is shown.

[0124] like Figure 4 As shown, the player container can include the player's display framework in the terminal device. Since the display module and the processing module are decoupled, the player container of the display module can be replaced as needed, and different player containers must use a specified hierarchical structure.

[0125] According to embodiments of this disclosure, the player container can have a three-layer hierarchy: a player-con layer, a media-con layer, and a video / audio layer. The player-con layer is the outermost layer, the media-con layer is the middle layer, and the video / audio layer is the innermost layer. The player container's hierarchy can be implemented using the following instructions:

[0126]

[0127] According to embodiments of this disclosure, the type of plugin to be installed can be determined based on the target event type partition, thereby determining the target container framework for loading the plugin to be installed. For example, if the plugin to be installed is a bullet screen plugin, the target event type partition can be a media type partition, thus determining that the target container framework for loading the plugin to be installed is the media-con layer.

[0128] Figure 5 A schematic diagram of a player container according to yet another embodiment of the present disclosure is shown.

[0129] like Figure 5 As shown, the plugins to be installed can be advertising plugins, bullet screen plugins, episode selection plugins, comment plugins, etc. The target layer information of the plugins can be determined based on the target event type of the player event corresponding to each plugin. For example, advertising plugins and bullet screen plugins can be installed in the media-con layer, while episode selection plugins and comment plugins can be installed in the player-con layer. Users can also install other plugins in the media-con and player-con layers as needed; this is not limited here. The hierarchical structure of the player container where the plugins are installed can be achieved using the following instructions:

[0130]

[0131] According to embodiments of this disclosure, a plugin to be installed can be loaded using the structure {component: xxx, isiner: true, level: 1}, where xxx is the plugin to be installed, isiner indicates whether the plugin to be installed is displayed within the current container frame, level is the level of the upper and lower layers, and 1 can indicate that the plugin to be installed is loaded into the middle layer of the player container. If multiple plugins to be installed overlap each other, the level can be adjusted by setting the level.

[0132] According to embodiments of this disclosure, the above-described player expansion method further includes:

[0133] In response to an uninstallation request for the target plugin, the plugin uninstallation method in the player is invoked.

[0134] Use plugin uninstallation methods to uninstall the target plugin from the player.

[0135] According to embodiments of this disclosure, the target plugin may be a plugin already installed in the player.

[0136] According to embodiments of this disclosure, a player event for uninstalling a target plugin can be determined based on an uninstallation request for the target plugin. The player event can be a plugin uninstallation event. Based on the event type of the plugin uninstallation event, a target event type partition corresponding to the event type of the plugin uninstallation event can be determined. Based on the target event type partition, a plugin uninstallation method corresponding to the plugin uninstallation event can be determined and invoked.

[0137] According to embodiments of this disclosure, the plugin uninstallation method determines the event type partition of the event methods in the target plugin, deletes the mapping relationship between the plugin information and method information of the target plugin from the plugin configuration table in the event type partition, deletes the mapping relationship between the player events and event methods of the target plugin from the event configuration table, and then uninstalls the target plugin from the container framework corresponding to the target plugin to complete the uninstallation of the target plugin from the player.

[0138] According to embodiments of this disclosure, determining a target event type partition corresponding to the event type of a player event includes:

[0139] Determine the event type of the player event.

[0140] The target event type partition corresponding to the event type of the player event is determined from the event type partition table. The event type partition table includes multiple event type partitions, which are divided according to event type.

[0141] According to embodiments of this disclosure, the event type of a player event can be determined from a predetermined number of event types based on the identification information of the player event.

[0142] According to embodiments of this disclosure, the event type partitioning table can be a table that partitions events according to predetermined event types, recording the correspondence between the event types of player events and the event type partitions. For example, the player-con type can correspond to the player element type partition, the video-con type can correspond to the video element type partition, the media type can correspond to the media element type partition, and the plugin type can correspond to the plugin element type partition.

[0143] According to embodiments of this disclosure, a target event type partition corresponding to the event type of a player event can be determined from an event type partition table based on the correspondence between the event type of a player event and the event type partition.

[0144] According to embodiments of this disclosure, a new player with an extended plugin can be obtained through the above-described player extension method. Based on the new player, a player control method is proposed, comprising: in response to a user's control operation on the player, determining a first player event corresponding to the control operation; determining method information of a first event method for processing the first player event; determining a first plugin corresponding to the method information of the first event method, wherein the first plugin is a plugin pre-loaded with the first event method; and processing the first player event using the first event method loaded in the first plugin.

[0145] Figure 6 A flowchart illustrating a player control method according to an embodiment of the present disclosure is shown schematically.

[0146] like Figure 6 As shown, the method includes operations S601 to S604.

[0147] In operation S601, in response to the user's control operation on the player, a first player event corresponding to the control operation is determined.

[0148] According to embodiments of this disclosure, the player can be any player obtained from the player extension method in the embodiments of this disclosure. The player can be set in the client of the mobile terminal as needed and play video or audio.

[0149] According to embodiments of this disclosure, the control operation can be an operation performed by the user on the content being played in the player. For example, it can be a play operation, a pause operation, a comment operation, a fast forward operation, etc. Any other operation in the player can be used as a control operation, which will not be elaborated further here.

[0150] According to embodiments of this disclosure, the identification information of a control operation can be determined based on the control operation. A player can have multiple player events, and each player event can have identification information that matches the control operation. The identification information of the control operation and the identification information of the player events can be matched, and the successfully matched player event is determined as the first player event. The identification information of the control operation can be the name information of the control operation or the operation area information of the control operation in the player. The identification information of the player event can be the corresponding operation area information of the event name information of the player event in the player.

[0151] According to embodiments of this disclosure, the location of a user's control operations within a player can be detected to determine the user's operation area within the player. Different operation areas can correspond to different first player events. Based on the user's operation area within the player, the first player event corresponding to the control operation is determined. For example, if the user's control operation is detected in the playback area of ​​the player, the first player event is determined to be a playback event based on the playback area; if the user's control operation is detected in the pause area of ​​the player, the first player event is determined to be a pause event based on the pause area; if the user's control operation is detected in the comment area of ​​the player, the first player event is determined to be a comment event based on the comment area.

[0152] In operation S602, method information for the first event method used to handle the first player event is determined.

[0153] According to embodiments of this disclosure, the first event method may be a method in the player for processing a first player event. For example, the first player event is a playback event, and the first event method may be to cause the player to start playing audio.

[0154] The playback method for audio or video; the first player event is the pause event, and the first event method can be a method that makes the player pause audio or video.

[0155] According to embodiments of this disclosure, there may be multiple first event methods. The method information of each first event method may record an operation area associated with a first player event. The operation area of ​​the first player event can be matched with the operation areas recorded in the method information of the multiple first event methods to determine the method information of the first event method used to process the first player event. For example, the operation area of ​​the player event may be a playback operation area. By finding the method information recording the playback operation area in the method information of the multiple first event methods, the method information of the first event method associated with the playback operation can be determined.

[0156] In operation S603, a first plugin corresponding to the method information of the first event method is determined, wherein the first plugin is a plugin pre-loaded with the first event method.

[0157] According to embodiments of this disclosure, the method information of the first event method may include plugin name information, thereby enabling the first plugin to be determined based on the plugin name information in the method information.

[0158] According to embodiments of this disclosure, the first plugin can be a plugin pre-loaded into the player or a plugin that comes with the player itself. For example, the first plugin can be a playback plugin, a comment plugin, a bullet screen plugin, an advertising plugin, etc.

[0159] When operating S604, the first event is handled using the first event method loaded within the first plugin.

[0160] According to embodiments of this disclosure, the first plugin is loaded with a first event method, thereby enabling the first plugin to process first player events using the first event method.

[0161] According to embodiments of this disclosure, the first event method may be a processing instruction for processing a first player event, which is sent to the player so that the player processes the first player event according to the processing instruction.

[0162] According to embodiments of this disclosure, by employing a technique of responding to user control operations on the player, determining a first player event corresponding to the control operation; determining method information for a first event method used to process the first player event; determining a first plugin corresponding to the method information of the first event method, wherein the first plugin is a plugin pre-loaded with the first event method; and using the first event method loaded in the first plugin to process the first player event, all player events can be processed through the first plugin in the player, eliminating the need to encapsulate corresponding players for different scenarios. This improves the player's support for complex scenarios and at least partially overcomes the technical problem in related technologies where the player has low support for complex usage scenarios and cannot meet the diverse needs of users.

[0163] Figure 7 A flowchart illustrating a player control method according to yet another embodiment of the present disclosure is shown.

[0164] like Figure 7 As shown, operation S602 may include operations S701 to S704.

[0165] In operation S701, determine the event type of the first player event.

[0166] In operation S702, the target event type partition corresponding to the event type of the first player event is determined from the event type partition table. The event type partition table includes multiple event type partitions, which are divided according to event type.

[0167] In operation S703, the event configuration table that matches the target event type partition is determined. The event configuration table contains the mapping relationship between player events and method information.

[0168] In operation S704, the method information of the first event method used to handle the first player event is determined from the event configuration table.

[0169] According to embodiments of this disclosure, the event type of a first player event can be determined from the pre-defined event types of player events.

[0170] According to embodiments of this disclosure, the event type partitioning table can be a table partitioned according to predetermined event types, recording the correspondence between the event types of the first player event and the event type partitions. For example, the player-con type can correspond to the player element type partition, the video-con type can correspond to the video element type partition, the media type can correspond to the media element type partition, and the plugin type can correspond to the plugin element type partition.

[0171] According to embodiments of this disclosure, a target event type partition corresponding to the event type of the first player event can be determined based on the correspondence between event types and event type partitions in the event type partition table.

[0172] According to embodiments of this disclosure, there can be multiple event configuration tables, and each event configuration table can correspond to one of the multiple event type partitions, thereby determining the event configuration table that matches the target event type partition based on the target event type partition.

[0173] According to embodiments of this disclosure, a player event that is identical to the player event identifier information of the first player event can be matched in the event configuration table, and the method information corresponding to the successfully matched player event can be determined as the method information of the first event method used to process the first player event.

[0174] According to embodiments of this disclosure, by determining a target type partition corresponding to the event type of the first player event, determining an event configuration table matching the target type partition, and determining the method information of the first event method for processing the first player event from the event configuration table, it is not necessary to match the method information of the corresponding event method in all player events, thereby reducing code logic, improving the efficiency of finding method information, and thus improving the processing efficiency of the player.

[0175] Figure 8 A flowchart illustrating a player control method according to yet another embodiment of the present disclosure is shown.

[0176] like Figure 8 As shown, operation S604 may include operations S801 to S804.

[0177] In operation S801, the event processing stage of each of the multiple first event methods is determined, and information on multiple event processing stages is obtained.

[0178] In operation S802, according to the information of multiple event processing stages, the multiple first plugins corresponding one-to-one with multiple first event methods are sorted to obtain the sorting result.

[0179] When operating S803, according to the sorting result, the first event methods of multiple first plugins are called to obtain multiple sorted first event methods.

[0180] In operation S804, the first player event is handled using a sequence of first event methods.

[0181] According to embodiments of this disclosure, a first event method includes multiple methods, and a first plugin includes multiple plugins, with each first event method corresponding to one first plugin.

[0182] According to embodiments of this disclosure, the event processing stage of each of the multiple first event methods can be determined by a pre-marked stage identifier, thereby obtaining multiple event processing stage information.

[0183] According to embodiments of this disclosure, the calling order of the first event methods among multiple first event methods can be determined according to multiple event processing stage information, thereby determining the order of the first plugins corresponding to the calling of the first event methods, and obtaining the sorting result of multiple first plugins from the order of the first plugins.

[0184] According to embodiments of this disclosure, based on the sorting result of the first plugin, a first event method is called from the first plugin, and the first player event is processed by the sorted first event methods. This can be achieved by calling multiple processing instructions from the first plugin, sorting the multiple processing instructions, and processing the first player event by the sorted multiple processing instructions.

[0185] According to embodiments of this disclosure, by adding event processing stage identifier information to the method information of the event method, the event processing stage of the event method can be quickly determined based on the identifier information. This allows the event methods to be sorted according to their event processing stages, and the first event methods in the first plugin can be called in a certain order. This enables the player to process first player events by connecting different first plugins in series. Furthermore, player events in different scenarios can also be processed by different plugins in the player, thereby further improving the player's support for complex scenarios.

[0186] Figure 9 A flowchart illustrating a player control method according to yet another embodiment of the present disclosure is shown.

[0187] like Figure 9 As shown, operation S804 may include operations S901 to S904.

[0188] In operation S901, it is determined whether the first player event has a pre-processing stage. If it is determined that the first player event has a pre-processing stage, operation S902 is executed; if it is determined that the first player event does not have a pre-processing stage, operation S904 is executed.

[0189] In operation S902, determine whether the pre-event method in the pre-processing stage has been processed. If it is determined that the pre-event method in the pre-processing stage has been processed, execute operation S904; if it is determined that the pre-event method in the pre-processing stage has not been processed, execute operation S903.

[0190] When operating S903, pause processing of the first player event until the current event method in the pre-processing phase has finished processing.

[0191] When operating S904, according to the sorting results, multiple first event methods are called to handle the first player event.

[0192] According to embodiments of this disclosure, the event handling phase can be a pre-processing phase, an in-processing phase, or a post-processing phase. Events in the pre-processing phase can include play events, pause events, seek events, full screen events, exit full screen events, and events included in all plugin element types. Events in the in-processing phase can include all events. Events in the post-processing phase can include all events except play events and pause events.

[0193] According to embodiments of this disclosure, whether a first player event has a pre-processing phase can be determined by the phase identifier of the first playback event. For example, a player event in the pre-processing phase can be named in camelCase by adding "before" before the event method name, and a player event in the post-processing phase can be named in camelCase by adding "after" before the event method name.

[0194] According to the embodiments of this disclosure, the first event method can be called to process the player event only after the pre-event method in the pre-processing stage has completed processing; if the pre-event method in the pre-processing stage has not completed processing, the first player event cannot be processed. The processing status of the pre-event method in the pre-processing stage can be monitored until the current pre-event method in the pre-processing stage has completed processing, and then multiple first event methods can be called to process the first player event according to the sorting result.

[0195] According to embodiments of this disclosure, a user can perform playback operations on a video in a player. The player can determine a first player event as a playback event based on the user's playback operation. The first event method corresponding to the playback event can be a video playback method. It can be determined that the playback event has a pre-processing stage. The pre-event method currently in the pre-processing stage is determined to be an advertisement playback method. The plugin corresponding to the advertisement playback method can be an advertisement plugin, and the plugin corresponding to the video playback method can be a playback plugin. Before the advertisement playback method in the pre-processing stage has finished processing, that is, before the advertisement has finished playing, the video cannot be played. The video played by the video playback method cannot be played. The feedback information sent by the advertisement plugin to the player can determine whether the video played by the video playback method in the in-processing stage has been played.

[0196] According to embodiments of this disclosure, when a first player event has a current processing stage, by determining that the pre-processing method currently in the pre-processing stage has been completed, it is determined that multiple first event methods will be called to process the first player event, making the processing order among the multiple first event methods for processing the first player event clearer and improving the efficiency of the plugin in processing player events.

[0197] According to embodiments of this disclosure, determining the first plug-in corresponding to the method information of the first event method includes:

[0198] The first plugin corresponding to the method information of the first event method is determined from the plugin configuration table, where the plugin configuration table stores the mapping relationship between method information and plugin information.

[0199] According to embodiments of this disclosure, the method information of the first event method may include plugin identification information of the plugin, and the plugin information may include plugin identification information. The plugin identification information in the plugin information can identify the plugin, and can be stored in the plugin configuration table based on the mapping relationship between the plugin identification information in the method information of the first event method and the plugin identification information in the plugin information.

[0200] According to embodiments of this disclosure, the plugin identifier information in the method information of the first event method can be matched with the plugin identifier information in the plugin information. If the match is successful, the first plugin corresponding to the method information of the first event method can be determined based on the plugin identifier information in the plugin information.

[0201] According to embodiments of this disclosure, by using the mapping relationship between the method information of the first event method and the plugin information stored in the plugin configuration table, the first plugin can be quickly determined from the plugin configuration table, thereby improving the search efficiency of the first plugin and the processing efficiency of the player for the first player event.

[0202] According to embodiments of this disclosure, processing a first player event using a first event method loaded within a first plugin further includes:

[0203] When using the first event method loaded in the first plugin to handle the first player event, determine whether there is a second event method loaded in the second plugin currently handling the second player event.

[0204] If it is determined that a second event method loaded within a second plugin is processing a second player event, the hierarchical relationship between the first plugin and the second plugin is determined.

[0205] Based on the hierarchical relationship, determine the occlusion relationship between the first playback content and the second playback content, where the first playback content is the content that matches the first player event, and the second playback content is the content that matches the second player event.

[0206] According to embodiments of this disclosure, when processing a first player using a first event method loaded in a first plugin, it can be determined, based on feedback information from the plugin, whether a second event method loaded in a second plugin is currently processing a second player event.

[0207] According to embodiments of this disclosure, the player container on a terminal device can have multiple layers. For example, the player container can have three layers: the outermost layer can be the player-con layer, the middle layer can be the media-con layer, and the innermost layer can be the video / audio layer. The first plugin and the second plugin can be set in either layer of the player.

[0208] According to embodiments of this disclosure, when it is determined that a second event method loaded within a second plugin is processing a second player event, the hierarchical relationship between the first plugin and the second plugin can be determined by the hierarchy set in the player by the first plugin and the second plugin.

[0209] According to embodiments of this disclosure, the player can display first playback content that matches a first player event, and can also display second playback content for a second player event.

[0210] According to embodiments of this disclosure, when the first plugin and the second plugin are at the same level, the occlusion relationship between the first player content and the second playback content can be determined as occlusion; when the first plugin and the second plugin are not at the same level, the occlusion relationship between the first player content and the second playback content can be determined as no occlusion.

[0211] According to embodiments of this disclosure, by determining the hierarchical relationship between the first plugin and the second plugin, the occlusion relationship between the first playback content and the second playback content can be determined. This allows the hierarchy of the first plugin or the second plugin to be adjusted based on the occlusion relationship, ensuring that the first playback content and the second playback content do not obstruct each other, thereby improving the user's viewing experience with the player.

[0212] Figure 10 A block diagram of a player expansion device according to an embodiment of the present disclosure is shown schematically.

[0213] like Figure 10 As shown, the player expansion device 1000 includes a first determining module 1001, a second determining module 1002, a registration module 1003, and a loading module 1004.

[0214] The first determining module 1001 is used to determine the player event corresponding to the event method, wherein the event method is a method pre-loaded into the plugin to be installed and used to handle player events;

[0215] The second determining module 1002 is used to determine the target event type partition corresponding to the event type of the player event;

[0216] Registration module 1003 is used to register plugins to be installed to the player's processing module based on event method information and target event type partitioning; and

[0217] The loading module 1004 is used to load the plugin to be installed into the display module of the player, so as to complete the extension of the plugin to be installed into the player. The processing module and the display module are decoupled from each other.

[0218] According to embodiments of this disclosure, the method employs the following techniques: determining a player event corresponding to an event method (where the event method is a method pre-loaded into the plugin to be installed and used to process player events); determining a target event type partition corresponding to the event type of the player event; registering the plugin to be installed into the player's processing module based on the method information of the event method and the target event type partition; and loading the plugin to be installed into the player's display module to complete the extension of the plugin to be installed into the player. The processing module and the display module are decoupled, allowing plugins to be installed in complex scenarios to be registered and loaded separately in the decoupled processing and display modules, eliminating the need to encapsulate corresponding players for different scenarios. This improves the player's support for complex scenarios and at least partially overcomes the technical problem in related technologies where secondary encapsulation of player extension plugins based on different user needs for usage scenarios fails to meet the player's support for complex usage scenarios.

[0219] According to embodiments of this disclosure, a registration module 1003 in the player's processing module, used to register the plugin to be installed to the player based on method information of the event method and a target event type partition, includes:

[0220] The first registration unit is used to store the method information of player events and event methods into the event configuration table of the processing module that matches the target event type partition, so that the event configuration table records the mapping relationship between player events and event methods;

[0221] The second registration unit is used to store the method information of the event method and the plugin information of the plugin to be installed into the plugin configuration table of the processing module that matches the target event type partition, so that the plugin configuration table records the mapping relationship between the method information and the plugin information.

[0222] According to embodiments of this disclosure, the player expansion device 1000 further includes:

[0223] The third determination module is used to determine the event processing stage of the event method in response to determining that the player event is an interactive trigger event. The event processing stage includes a pre-processing stage, an in-processing stage, and a post-processing stage.

[0224] Add a module to add the event handling phase identification information to the event method's method information.

[0225] According to embodiments of this disclosure, a loading module 1004 for loading a plugin to be installed into the display module of a player includes:

[0226] The first loading unit is used to determine the target container frame for loading the plugin to be installed from multiple container frames of the presentation module based on the target event type partition. The multiple container frames are pre-divided according to the event type partition.

[0227] The second loading unit is used to determine the target layer information of the plugin to be installed in the player based on the hierarchical structure of the target container frame.

[0228] The third loading unit is used to load the plugin to be installed into the player's display module according to the target hierarchy information and the target container frame, so that the playback content that matches the plugin to be installed can be displayed in the target container frame in the player.

[0229] According to embodiments of this disclosure, the player expansion device 1000 further includes:

[0230] The calling module is used to respond to an uninstallation request for the target plugin and call the plugin uninstallation method in the player;

[0231] The uninstall module is used to uninstall the target plugin from the player using plugin uninstallation methods.

[0232] According to embodiments of this disclosure, a second determining module 1002 for determining a target event type partition corresponding to an event type of a player event includes:

[0233] The first determining unit is used to determine the event type of the player event;

[0234] The second determining unit is used to determine the target event type partition corresponding to the event type of the player event from the event type partition table, wherein the event type partition table includes multiple event type partitions, which are divided according to event type.

[0235] Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure, or at least part of the functions of any one or more of them, can be implemented in one module. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be implemented by dividing them into multiple modules. Any one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as hardware circuitry, such as Field Programmable Gate Arrays (FPGAs), Programmable Logic Arrays (PLAs), Systems-on-Chip, Systems-on-Substrate, Systems-on-Package, Application-Specific Integrated Circuits (ASICs), or implemented in hardware or firmware by any other reasonable means of integrating or packaging circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, one or more of the modules, submodules, units, and subunits according to embodiments of the present disclosure can be at least partially implemented as computer program modules, which, when run, can perform corresponding functions.

[0236] For example, any plurality of the first determining module 1001, the second determining module 1002, the registration module 1003, and the loading module 1004 can be combined into one module / unit / subunit, or any one of these modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functionality of one or more of these modules / units / subunits can be combined with at least part of the functionality of other modules / units / subunits and implemented in one module / unit / subunit. According to embodiments of this disclosure, at least one of the first determining module 1001, the second determining module 1002, the registration module 1003, and the loading module 1004 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in software, hardware, or firmware, or in any suitable combination of any of these three implementation methods. Alternatively, at least one of the first determining module 1001, the second determining module 1002, the registration module 1003, and the loading module 1004 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.

[0237] It should be noted that the player expansion device part in the embodiments of this disclosure corresponds to the player expansion method part in the embodiments of this disclosure. For a detailed description of the player expansion device part, please refer to the player expansion method part, which will not be repeated here.

[0238] Figure 11 A block diagram of an electronic device suitable for implementing a player expansion method according to an embodiment of the present disclosure is shown schematically. Figure 11 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0239] like Figure 11As shown, a computer electronic device 1100 according to an embodiment of the present disclosure includes a processor 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage portion 1108 into a random access memory (RAM) 1103. The processor 1101 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1101 may also include onboard memory for caching purposes. The processor 1101 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0240] RAM 1103 stores various programs and data required for the operation of electronic device 1100. Processor 1101, ROM 1102, and RAM 1103 are interconnected via bus 1104. Processor 1101 performs various operations of the method flow according to embodiments of the present disclosure by executing programs in ROM 1102 and / or RAM 1103. It should be noted that the programs may also be stored in one or more memories other than ROM 1102 and RAM 1103. Processor 1101 may also perform various operations of the method flow according to embodiments of the present disclosure by executing programs stored in said one or more memories.

[0241] According to embodiments of this disclosure, the electronic device 1100 may further include an input / output (I / O) interface 1105, which is also connected to a bus 1104. The electronic device 1100 may also include one or more of the following components connected to the I / O interface 1105: an input section 1106 including a keyboard, mouse, etc.; an output section 1107 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1110 as needed so that computer programs read from it can be installed into the storage section 1108 as needed.

[0242] According to embodiments of this disclosure, the method flow according to embodiments of this disclosure can be implemented as a computer software program. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1109, and / or installed from removable medium 1111. When the computer program is executed by processor 1101, it performs the functions defined in the system of embodiments of this disclosure. According to embodiments of this disclosure, the systems, devices, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0243] This disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into the device / apparatus / system. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.

[0244] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium. Examples include, but are not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0245] For example, according to embodiments of this disclosure, a computer-readable storage medium may include one or more memories other than the ROM 1102 and / or RAM 1103 described above and / or ROM 1102 and RAM 1103.

[0246] Embodiments of this disclosure also include a computer program product comprising a computer program containing program code for performing the methods provided in the embodiments of this disclosure. When the computer program product is run on an electronic device, the program code is used to enable the electronic device to implement the player extension method provided in the embodiments of this disclosure.

[0247] When the computer program is executed by the processor 1101, it performs the functions defined in the system / apparatus of this disclosure embodiments. According to embodiments of this disclosure, the systems, apparatuses, modules, units, etc., described above can be implemented by computer program modules.

[0248] In one embodiment, the computer program may rely on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may also be transmitted and distributed in the form of signals over a network medium, and may be downloaded and installed via the communication section 1109, and / or installed from the removable medium 1111. The program code contained in the computer program can be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination thereof.

[0249] According to embodiments of this disclosure, program code for executing the computer programs provided in embodiments of this disclosure can be written in any combination of one or more programming languages. Specifically, these computational programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, languages ​​such as Java, C++, Python, "C", or similar programming languages. The program code can execute entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0250] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions. Those skilled in the art will understand that the features recited in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not expressly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or combined in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or combinations fall within the scope of this disclosure.

[0251] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.

Claims

1. A method for extending a media player, comprising: Determine the player event corresponding to the event method, wherein the event method is a method pre-loaded into the plugin to be installed and used to handle the player event; Determine the target event type partition corresponding to the event type of the player event; Based on the method information of the event method and the target event type partition, the plugin to be installed is registered to the player's processing module; and The plugin to be installed is loaded into the display module of the player to complete the extension of the plugin to be installed into the player, wherein the processing module and the display module are decoupled from each other; The process of registering the plugin to be installed to the player's processing module based on the method information of the event method and the target event type partition includes: The method information of the player event and the event method is stored in the event configuration table of the processing module that matches the target event type partition, so that the event configuration table records the mapping relationship between the player event and the event method; The method information of the event method and the plugin information of the plugin to be installed are stored in the plugin configuration table of the processing module that matches the target event type partition, so that the plugin configuration table records the mapping relationship between the method information and the plugin information.

2. The method according to claim 1, further comprising: In response to determining that the player event is an interactive trigger event, the event processing stage in which the event method is located is determined, wherein the event processing stage includes a pre-processing stage, an in-processing stage, and a post-processing stage; Add the identification information of the event handling phase to the method information of the event method.

3. The method according to any one of claims 1 to 2, wherein, The step of loading the plugin to be installed into the display module of the player includes: Based on the target event type partition, a target container frame for loading the plugin to be installed is determined from multiple container frames of the display module, wherein the multiple container frames are pre-divided according to the event type partition; Based on the hierarchical structure of the target container framework, determine the target hierarchical information of the plugin to be installed in the player; Based on the target hierarchy information and the target container frame, the plugin to be installed is loaded into the display module of the player so that the playback content matching the plugin to be installed can be displayed in the target container frame of the player.

4. The method according to any one of claims 1 to 2, further comprising: In response to an uninstallation request for the target plugin, the plugin uninstallation method in the player is invoked; The target plugin is uninstalled from the player using the plugin uninstallation method.

5. The method according to any one of claims 1 to 2, wherein, The step of determining the target event type partition corresponding to the event type of the player event includes: Determine the event type of the player event; The target event type partition corresponding to the event type of the player event is determined from the event type partition table, wherein the event type partition table includes multiple event type partitions, which are divided according to event type.

6. A media player expansion device, comprising: The first determining module is used to determine the player event corresponding to the event method, wherein the event method is a method pre-loaded into the plugin to be installed and used to process the player event; The second determining module is used to determine the target event type partition corresponding to the event type of the player event; A registration module is used to register the plugin to be installed to the player's processing module based on the method information of the event method and the target event type partition; and A loading module is used to load the plugin to be installed into the display module of the player, so as to complete the extension of the plugin to be installed into the player, wherein the processing module and the display module are decoupled from each other; The registration module is used to store the player event and the method information of the event method in the event configuration table of the processing module that matches the target event type partition, so that the event configuration table records the mapping relationship between the player event and the event method; and to store the method information of the event method and the plugin information of the plugin to be installed in the plugin configuration table of the processing module that matches the target event type partition, so that the plugin configuration table records the mapping relationship between the method information and the plugin information.

7. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the method of any one of claims 1 to 5.

8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method of any one of claims 1 to 5.

9. A computer program product comprising computer-executable instructions, which, when executed, are used to implement the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Task processing method and device

    CN111124547A