CN112711367A - Method for preventing loaded player from collapsing for web page in IPTV - Google Patents
Method for preventing loaded player from collapsing for web page in IPTV Download PDFInfo
- Publication number
- CN112711367A CN112711367A CN202011472200.9A CN202011472200A CN112711367A CN 112711367 A CN112711367 A CN 112711367A CN 202011472200 A CN202011472200 A CN 202011472200A CN 112711367 A CN112711367 A CN 112711367A
- Authority
- CN
- China
- Prior art keywords
- player
- page
- video window
- playing
- packaging
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11B—INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
- G11B19/00—Driving, 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/02—Control of operating function, e.g. switching from recording to reproducing
- G11B19/022—Control panels
- G11B19/025—'Virtual' control panels, e.g. Graphical User Interface [GUI]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network 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/61—Network physical structure; Signal processing
- H04N21/6106—Network physical structure; Signal processing specially adapted to the downstream path of the transmission network
- H04N21/6125—Network 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)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
- Information Transfer Between Computers (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 invention solves the problems of page jamming and collapse caused by incomplete release of video window resources when a user enters or exits a page with a playing window and when the page with the playing window slides rapidly, and improves the fluency of the page; unnecessary resource consumption is saved; the unified player packaging interface comprises main life cycle initialization, playing and destruction of the player; and simultaneously, the function of video window layout is introduced, and the use complexity is simplified.
Description
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 fluency is improved, and the user experience is effectively improved; it is another object of the present invention to provide a unified 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 player interface at a proper time, so that the problems of jamming and collapse 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 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 playing window is completely visible to be incompletely visible, the playing needs to be stopped, and a destroying method of a player packaging 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 player package 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 player package interface receives a playing address parameter. A three second start play delay is added by a timer before starting play. The player can not play the video content immediately when the page is accessed and accessed quickly.
Specifically, the destruction method of the player package interface is to execute a stop () method and a releasemedia play () 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 jamming and collapse caused by incomplete release of video window resources when a user enters and exits a page with a playing window and when the page with the playing window slides rapidly are solved, and the page fluency is improved; by adding the play start delay, when the user rapidly enters and exits the page, the video is prevented from being played immediately, and unnecessary resource consumption is saved. The unified player packaging interface comprises main life cycle initialization, playing and destruction 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 the page access sequence diagram containing the video window in fig. 1, the process of accessing the page and playing the page by the user is as follows:
s11, calling a page initialization method when the user opens the page with the video window;
s12, calling an initialization method of a player packaging interface by the page, and initializing a video window;
s13, player packaging interface, generating corresponding html code according to the transmitted layout parameters, the layout coordinates of the wide player, the height and the relative outer page, and adding the html code as a sub-element into the outer page to complete the layout of the playing window;
s14, player packaging interface, calling the initialization method of MediaPlayer object of set-top box browser, and creating MediaPlayer object;
s15, when the page obtains the playing address and tries to play, executing the step S16;
s16, calling a playing method of the player interface;
s17, the playing method of the player interface has a three-second delay time before playing to solve the problem of resource consumption caused by immediate playing when a page is rapidly accessed;
s18, the 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 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 play window,
s21, the user enters a page with a playing window;
s22, clicking the remote controller by the user to move the focus;
s23, if the playing 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 a player packaging interface, and creating a new player;
s25, if the playing window is 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 player packaging 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 under the teaching of the present invention shall fall within the protection scope of the present invention, which is similar 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 (5)
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, 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 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 playing window is completely visible to be incompletely visible, the playing needs to be stopped, and a destroying method of a player packaging 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 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.
3. The method for preventing a loaded player from crashing for a web page in an IPTV as claimed in claim 1, wherein: the initialization method of the player packaging interface comprises the following steps: a MediaPlayer object of a browser is created while receiving layout parameters, which are the width, height, and layout coordinates of the player.
4. The method for preventing a loaded player from crashing for a web page in an IPTV as claimed in claim 1, wherein: the playing method of the player packaging interface receives a playing address parameter. A three second start play delay is added by a timer before starting play.
5. 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 player packaging 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.
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 true CN112711367A (en) | 2021-04-27 |
CN112711367B 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) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114501110A (en) * | 2022-04-13 | 2022-05-13 | 海看网络科技(山东)股份有限公司 | Solution for playing ghost when HOME key exits in IPTV |
Citations (4)
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 |
US20180316979A1 (en) * | 2010-07-22 | 2018-11-01 | Time Warner Cable Enterprises Llc | Apparatus and methods for packetized content delivery over a bandwidth-efficient network |
-
2020
- 2020-12-14 CN CN202011472200.9A patent/CN112711367B/en active Active
Patent Citations (4)
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 |
US20180316979A1 (en) * | 2010-07-22 | 2018-11-01 | Time Warner Cable Enterprises Llc | Apparatus and methods for packetized content delivery over a bandwidth-efficient network |
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 |
Non-Patent Citations (4)
Title |
---|
AUGFUN: "58.视频播放器", 《CSDN博客-HTTPS://BLOG.CSDN.NET/AUGFUN/ARTICLE/DETAILS/55669436?UTM_SOURCE=BLOGXGWZ7》 * |
HT894021573: "iptv增值业务--华为机顶盒视频播放代码", 《CSDN博客-HTTPS://BLOG.CSDN.NET/HT894021573/ARTICLE/DETAILS/28425121》 * |
RITA_SUNSHINE: "Android多媒体音频播放器MediaPlayer", 《CSDN博客-HTTPS://BLOG.CSDN.NET/UPUPRITA/ARTICLE/DETAILS/84586467》 * |
SAIFALDEEN: "我怎么能延迟一个自动播放音频/ html5由jquery", 《VOIDCC-HTTP://CN.VOIDCC.COM/QUESTION/P-GCDLHUCP-KT.HTML》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114501110A (en) * | 2022-04-13 | 2022-05-13 | 海看网络科技(山东)股份有限公司 | Solution for playing ghost when HOME key exits in IPTV |
CN114501110B (en) * | 2022-04-13 | 2022-09-16 | 海看网络科技(山东)股份有限公司 | Solution for playing ghost when HOME key exits in IPTV |
Also Published As
Publication number | Publication date |
---|---|
CN112711367B (en) | 2022-09-06 |
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 | |
US7716361B2 (en) | Method and system for providing persistent media across web pages using only browser plug-ins | |
CN105205157B (en) | Page loading method, device and system | |
CN110446114B (en) | Multimedia data processing device, method, electronic equipment and storage medium | |
CN102033943B (en) | Multiwindow browse method and system based on mobile communication equipment terminal | |
CN106060674A (en) | System and method for achieving intelligent video live broadcast on front end | |
US11204688B2 (en) | Video playing method and device, electronic equipment and storage medium | |
CN101227421B (en) | Instantaneous communication method and apparatus under full screen graphics mode | |
CN112711367B (en) | Method for preventing loaded player from crashing through web page in IPTV | |
CN114302220A (en) | Display device, external device and play mode control method | |
CN109391800B (en) | Smart community video monitoring method and system based on broadcast television TVOS smart set top box | |
CN109698979B (en) | Video playing method and device and electronic equipment | |
CN106295326B (en) | Inline hook method and system for acquiring content of display card | |
EP3734444A1 (en) | Window management method | |
CN108337553A (en) | A kind of multi-medium data pre-download method | |
CN107643911B (en) | HTML 5-based interface interaction and display system and method | |
WO2017181966A1 (en) | Method and device for accessing interactive internet protocol television service, and storage medium | |
WO2011061676A1 (en) | Rendering a web page comprising plug-in content | |
CN114296679A (en) | Method for rapidly starting playing in loudspeaker box mode and display equipment | |
CN108664498A (en) | A kind of display methods and terminal of web page contents | |
CN112738562B (en) | Method, device and computer storage medium for transparent display of browser page | |
CN110704764A (en) | Method and system for processing page switching of IPTV browser | |
CN105589696A (en) | Interaction method and interaction device for non-blocking full screen video image watching | |
CN113453064B (en) | Resource playing method and display equipment |
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 |