CN112711367B - Method for preventing loaded player from crashing through web page in IPTV - Google Patents

Method for preventing loaded player from crashing through web page in IPTV Download PDF

Info

Publication number
CN112711367B
CN112711367B CN202011472200.9A CN202011472200A CN112711367B CN 112711367 B CN112711367 B CN 112711367B CN 202011472200 A CN202011472200 A CN 202011472200A CN 112711367 B CN112711367 B CN 112711367B
Authority
CN
China
Prior art keywords
page
player
video window
player interface
playing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011472200.9A
Other languages
Chinese (zh)
Other versions
CN112711367A (en
Inventor
魏代邦
于海宁
隆龙
张晓刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haikan Network Technology Shandong Co ltd
Original Assignee
Haikan Network Technology Shandong Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haikan Network Technology Shandong Co ltd filed Critical Haikan Network Technology Shandong Co ltd
Priority to CN202011472200.9A priority Critical patent/CN112711367B/en
Publication of CN112711367A publication Critical patent/CN112711367A/en
Application granted granted Critical
Publication of CN112711367B publication Critical patent/CN112711367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B19/00Driving, starting, stopping record carriers not specifically of filamentary or web form, or of supports therefor; Control thereof; Control of operating function ; Driving both disc and head
    • G11B19/02Control of operating function, e.g. switching from recording to reproducing
    • G11B19/022Control panels
    • G11B19/025'Virtual' control panels, e.g. Graphical User Interface [GUI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/61Network physical structure; Signal processing
    • H04N21/6106Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
    • H04N21/6125Network physical structure; Signal processing specially adapted to the downstream path of the transmission network involving transmission via Internet

Landscapes

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

Abstract

The invention relates to a method for preventing a loaded player from crashing by a webpage in an IPTV, which comprises the following steps: a user opens a new page, and if the current page contains a video window, an initialization method of a packaging player interface is called when the current page is initialized; if the current page contains the video window, when a return key is received, the page is considered to be exited, and at the moment, a destruction method of the packaging player interface is called, so that the playing resources are completely released. The method solves the problems of page blockage and collapse caused by incomplete release of video window resources when a user enters or exits the page with the video window and when the page with the video window slides rapidly, and improves the fluency of the page; unnecessary resource consumption is saved; the unified packaging player interface comprises the initialization, playing and destruction of the main life cycle of the player; and simultaneously, the function of video window layout is introduced, and the use complexity is simplified.

Description

Method for preventing loaded player from collapsing for web page in IPTV
Technical Field
The invention relates to the technical field of network televisions, in particular to a method for preventing a loaded player from collapsing by a webpage in an IPTV.
Background
The currently known way for playing media resources by a set-top box webpage is realized by a MediaPlayer object built in a set-top box browser. After the MediaPlayer object acquires the playing addresses of the video and the audio, the MediaPlayer object loads corresponding audio and video resources by calling system playing service, and realizes functions of analyzing streaming media, encoding video/audio, loading and releasing resources and the like. From the media playing perspective, MediaPlayer can play a media asset content only by knowing CODEC type (audioType), stream type (streamType) and location of media (URL).
The MediaPlayer object is bulky since it maps a large memory space and holds a variety of multiple data references. When a user continuously enters a page with audio and video, a MediaPlayer object is created for multiple times, so that the resource consumption is overlarge, and the problems of page jamming, collapse and the like are caused.
Disclosure of Invention
In order to overcome the defects, the invention aims to provide a method for preventing a loaded player from crashing for a webpage in an IPTV, and provides a universal solution, which can effectively avoid the problems of page jamming and crashing caused by creating too many player instances or incompletely destroying the player instances in the above scene. The page operation smoothness is improved, and the user experience is effectively improved; it is another object of the present invention to provide a unified encapsulated player interface that facilitates control of the player's life cycle, including initialization, start of play, and destruction. And calling a corresponding life cycle method of the packaged player interface at a proper time, so that the problems of stagnation and breakdown can be completely solved.
The technical scheme adopted by the invention for solving the technical problems is as follows: a method for preventing a loaded player from crashing by a webpage in IPTV comprises the following steps:
a user opens a new page, if the current page contains a video window, the initialization method of the packaging player interface is called when the current page is initialized, and a new player is reinitialized;
if the current page contains the video window, when a return key is received, the page is considered to be exited, and at the moment, a destruction method of the packaging player interface is called, so that the playing resources are completely released;
if the current page contains a video window, when the page focus moves, if the state of the video window is from incomplete visibility to complete visibility, the video window is considered to be rolled into the page, and at the moment, an initialization method of a packaging player interface is called, and a new player is reinitialized; if the video window is completely visible to be incompletely visible, the playing needs to be stopped, and a destroying method of the packaging player interface is called to thoroughly destroy the player.
Specifically, the method for determining the state of the video window comprises the following steps: if the distance of the upper edge of the video window from the top of the page is greater than the scrolling distance of the page and the distance of the lower edge of the video window from the top of the page is less than the sum of the scrolling distance of the page and the screen height, then the video window is fully visible, otherwise the video window is not fully visible.
Specifically, the initialization method of the package player interface includes: the method comprises the steps of creating a MediaPlayer object of a browser, and receiving layout parameters, wherein the layout parameters are the width, the height and the layout coordinates of a player.
Specifically, the playing method of the packaged player interface receives a playing address parameter. A three second start play-out delay is added by a timer before the play-out is started. The player can not play the video content immediately when the page is accessed and accessed quickly.
Specifically, the destruction method of the package player interface is to execute a stop () method and a releasemedia player () method of the MediaPlayer in sequence, and finally set the object reference to NULL, so that the MediaPlayer object can be thoroughly destroyed and system resources can be recycled by the method.
The invention has the following beneficial effects: the problems of page blocking and collapse caused by incomplete release of video window resources when a user enters or exits a page with a video window and when the page with the video window slides rapidly are solved, and the page smoothness is improved; by adding the play start delay, when a user enters and exits a page quickly, the video is prevented from being played immediately, and unnecessary resource consumption is saved. The unified packaging player interface comprises the initialization, playing and destruction of the main life cycle of the player; and simultaneously, the function of video window layout is introduced, and the use complexity is simplified.
Drawings
FIG. 1 is a timing diagram of page accesses including a video window according to the present invention.
FIG. 2 is a flow chart of the present invention for moving focus among pages containing video windows.
FIG. 3 is a schematic diagram of an algorithm for determining whether a video window is completely visible according to the present invention.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings.
A method for preventing a loaded player from crashing by a webpage in IPTV comprises the following steps:
as shown in fig. 1, which includes a timing chart of page access of a video window, the process of entering and exiting a page and playing by a user is as follows:
s11, calling a page initialization method when the user opens the page with the video window;
s12, calling the initialization method of the packaging player interface by the page, and initializing the video window;
s13, packaging the player interface, generating corresponding html codes according to the transmitted layout parameters, the layout coordinates of the wide player, the height and the relative outer page, and adding the html codes into the outer page as sub-elements to complete the layout of the video window;
s14, packaging the player interface, calling the initialization method of the MediaPlayer object of the set-top box browser, and creating the MediaPlayer object;
s15, when the page obtains the playing address and tries to play, executing the step S16;
s16, calling the playing method of the packaging player interface;
s17, the playing method of the packaging player interface has three seconds of delay time before playing to solve the problem of resource consumption caused by immediate playing when the player rapidly enters and exits the page;
s18, the package player interface calls the playing method of the MediaPlayer object of the set-top box browser to start playing;
s19, when the user clicks the return key to try to exit the page;
s110, a destruction method of the packaged player interface is called, and the process sequentially executes the steps S111, S112 and S113 to thoroughly destroy the player;
s111, firstly calling a stop () method of a MediaPlayer object of a set top box browser to stop playing;
s112, firstly, calling a release () method of a MediaPlayer object of a set top box browser to determine whether to play resources;
s113, the reference of the MediaPlayer object is set to null.
As shown in the flow chart of fig. 2 where the focus is moved in the page containing the video window, when the user is in the page with the video window,
s21, the user enters a page with a video window;
s22, clicking the remote controller by the user to move the focus;
s23, if the video window is from not completely visible (including partially visible and completely invisible) to completely visible, the playing needs to be started, and step 4 is executed;
s24, calling an initialization method of the packaged player interface to create a new player;
s25, if the video window is from completely visible to incompletely visible (including partially visible and completely invisible), stopping playing, and executing step 6;
and S26, calling a destruction method of the packaged player interface to thoroughly destroy the player.
Specifically, the conditions for judging that the video window is completely visible are: if the upper edge of the video window is a distance M from the top of the page that is greater than the scrolling distance X of the page and the lower edge of the video window is a distance N from the top of the page that is less than the scrolling distance X of the page and the screen height Y, then the video window is fully visible, i.e., (M > X) & (N < X + Y), as shown in fig. 3.
The present invention is not limited to the above embodiments, and any structural changes made by the present invention shall be understood as falling within the scope of the present invention, wherein the structural changes are the same as or similar to the technical solutions of the present invention.
The techniques, shapes, and configurations not described in detail in the present invention are all known techniques.

Claims (3)

1. A method for preventing a loaded player from crashing by a webpage in an IPTV is characterized in that: the method comprises the following steps:
a user opens a new page, if the current page contains a video window, then when the current page is initialized, an initialization method of a packaging player interface is called, and a new player is reinitialized, wherein the initialization method of the packaging player interface comprises the following steps: creating a MediaPlayer object of a browser, and simultaneously receiving layout parameters, wherein the layout parameters are the width, the height and the layout coordinates of a player;
calling a playing method of the packaged player interface, wherein the playing method of the packaged player interface comprises the following steps: receiving a play address parameter, adding three seconds of initial play delay by a timer before starting playing, so that when a page is rapidly accessed, a player cannot immediately play video content, and an encapsulated player interface calls a play method of a MediaPlayer object of a set top box browser to start playing;
if the current page contains the video window, when a return key is received, the page is considered to be exited, and at the moment, a destruction method of the packaging player interface is called, so that the playing resources are completely released;
if the current page contains a video window, when the focus of the page moves, if the state of the video window is from incomplete visibility to complete visibility, the video window is considered to be rolled into the page, and at the moment, an initialization method of a packaging player interface is called, and a new player is reinitialized; if the video window is completely visible to be incompletely visible, the playing needs to be stopped, and a destroying method of the packaging player interface is called to thoroughly destroy the player.
2. The method for preventing a loaded player from crashing for a web page in an IPTV as claimed in claim 1, wherein: the method for judging the state of the video window comprises the following steps: if the distance of the top edge of the video window from the top of the page is greater than the scrolling distance of the page and the distance of the bottom edge of the video window from the top of the page is less than the sum of the scrolling distance of the page and the screen height, then the video window is fully visible, otherwise the video window is not fully visible.
3. The method for preventing a loaded player from crashing for a web page in an IPTV as claimed in claim 1, wherein: the destruction method of the packaged player interface is that a stop () method and a releasemedia player () method of the MediaPlayer are executed in sequence, and finally the object reference is set to be NULL, so that the MediaPlayer object can be thoroughly destroyed by the destruction method of the packaged player interface, and system resources are recycled.
CN202011472200.9A 2020-12-14 2020-12-14 Method for preventing loaded player from crashing through web page in IPTV Active CN112711367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011472200.9A CN112711367B (en) 2020-12-14 2020-12-14 Method for preventing loaded player from crashing through web page in IPTV

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011472200.9A CN112711367B (en) 2020-12-14 2020-12-14 Method for preventing loaded player from crashing through web page in IPTV

Publications (2)

Publication Number Publication Date
CN112711367A CN112711367A (en) 2021-04-27
CN112711367B true CN112711367B (en) 2022-09-06

Family

ID=75541953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011472200.9A Active CN112711367B (en) 2020-12-14 2020-12-14 Method for preventing loaded player from crashing through web page in IPTV

Country Status (1)

Country Link
CN (1) CN112711367B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114501110B (en) * 2022-04-13 2022-09-16 海看网络科技(山东)股份有限公司 Solution for playing ghost when HOME key exits in IPTV

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668110A (en) * 2008-09-05 2010-03-10 中兴通讯股份有限公司 Set-top box and media play controlling method thereof
CN104268251A (en) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 Playing method and device of video elements in web page
CN106303692A (en) * 2016-08-22 2017-01-04 乐视控股(北京)有限公司 Video loading method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8997136B2 (en) * 2010-07-22 2015-03-31 Time Warner Cable Enterprises Llc Apparatus and methods for packetized content delivery over a bandwidth-efficient network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101668110A (en) * 2008-09-05 2010-03-10 中兴通讯股份有限公司 Set-top box and media play controlling method thereof
CN104268251A (en) * 2014-09-30 2015-01-07 北京奇虎科技有限公司 Playing method and device of video elements in web page
CN106303692A (en) * 2016-08-22 2017-01-04 乐视控股(北京)有限公司 Video loading method and device

Also Published As

Publication number Publication date
CN112711367A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
WO2017219833A1 (en) Method and apparatus for developing and managing application program page
US20230161471A1 (en) Video-based interaction and video processing methods, apparatus, device, and storage medium
CN102426685B (en) Interactive internet video advertisement broadcasting method
CN108900854B (en) Live broadcast microphone room switching method, storage medium, equipment and system
CN105205157B (en) Page loading method, device and system
CN110446114B (en) Multimedia data processing device, method, electronic equipment and storage medium
CN112711367B (en) Method for preventing loaded player from crashing through web page in IPTV
JP2000022741A (en) Configuration of selectable depacketizer
EP1939726A1 (en) A method for realizing multitask in media playing device
US11800193B2 (en) Interaction processing method and apparatus for information flow, device, and computer-readable storage medium
US20170324998A1 (en) Method for playing video, client, and computer storage medium
CN101493837B (en) Network video playing method in multi-page browser and processing device
CN103365546A (en) Browser window creating method and device
CN114302195A (en) Display device, external device and play control method
CN109391800B (en) Smart community video monitoring method and system based on broadcast television TVOS smart set top box
CN113507646B (en) Display equipment and browser multi-label page media resource playing method
CN108337553A (en) A kind of multi-medium data pre-download method
CN103514924A (en) Method and device for playing videos in mobile terminal Widget, and player
CN113225605A (en) Video playing processing method and device, electronic equipment and storage medium
CN111464874A (en) Method, system and medium for playing webpage video in cloud desktop
EP2502164A1 (en) Rendering a web page comprising plug-in content
CN106254961B (en) Video broadcasting method and TV in TV
CN115297371A (en) Adaptive player generation method and adaptive player equipment
CN115278319A (en) Screen projection data transmission method and device, electronic equipment and storage medium
CN104038778B (en) Multimedia redirects the control method and device played

Legal Events

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