CN108900914A - A kind of view control method based on the video playing owner - Google Patents
A kind of view control method based on the video playing owner Download PDFInfo
- Publication number
- CN108900914A CN108900914A CN201810741931.5A CN201810741931A CN108900914A CN 108900914 A CN108900914 A CN 108900914A CN 201810741931 A CN201810741931 A CN 201810741931A CN 108900914 A CN108900914 A CN 108900914A
- Authority
- CN
- China
- Prior art keywords
- video
- owner
- playing
- control method
- current
- 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
Classifications
-
- 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/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/443—OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
- H04N21/4438—Window management, e.g. event handling following interaction with the user interface
-
- 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/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/47—End-user applications
- H04N21/472—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
- H04N21/47202—End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for requesting content on demand, e.g. video on demand
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Television Signal Processing For Recording (AREA)
- Signal Processing For Digital Recording And Reproducing (AREA)
Abstract
The present invention relates to a kind of view control methods based on the video playing owner, set video owner agreement Video OwnerProtocol, are set in the protocol with properties:Automatic to play attribute, for identifying whether the video in currently playing is supported to play automatically, float small window attribute, for identifying whether the video in currently playing supports floating layer to play, sets video owner's manager VideoOwnerManager, with the following functions:Video owner pushOwner is added, the video owner is pressed into queue top, deletes video owner popOwner, the video owner is popped up into queue top, video owner clearOwner is emptied, empties the video owner all in queue.The present invention, to video, the owner is managed, and effective solution is because control problem out of control to video caused by sequence problem, and the no longer modulated interference with timing, algorithm is simple, is easily handled, and stability is good, effectively avoids playing chaotic situation appearance.
Description
Technical field
The present invention relates to video playing administrative skill field, specifically a kind of view control based on the video playing owner
Method processed.
Background technique
In more video playing page switchings, or when singleton plays the page and reentries, it is easy to appear the chaotic problem of broadcasting.Example
Such as:Took background task assertion (9) for playback stall is shown once encountering load.Example again
Such as:Until Ending background task assertion (9), for playback stall video continues to play,
But can be there is a situation where strange, being obviously provided with repeatModeNone, he also continues playing and being stuck in repeatedly same
Period loop play.
More video playings:Multiple videos are simultaneously or sequentially played, any one video is closed and just exits player, are played
Completion automatically switches to next video, and App enters backstage pause and plays, continues to play into foreground, jump to other pages
Then no longer play.
Singleton plays(Singleton pattern):In program operation process, class only one example, program is run anyway
Only a example in the process.
For the chaotic problem of broadcasting caused by above situation, current solution is:
Need different ViewController life cycle approach (viewDidLoad, viewWillDisappear,
ViewDidDisappear, dealloc) in disorderly wave.
ViewController is part and parcel in iOS application program, is the weight between application data and view
Want bridge, numerous views in ViewController management application.
ViewDidLoad method is called after view load, if it is the view loader created in code, he
Will be called after loadView method, if it is from nib view page export, he will after view is set after adjusted
With.
ViewWillDisappear method can exhale notice when removing, being capped or be hidden in form when receiving view
The method cried,
ViewDidDisappear method, the notice when receiving view and having removed, be capped or be hidden in form can call
Method,
Dealloc method, view is destroyed, and the object created in init and viewDidLoad to you is needed to release herein
It puts.
This solution has the following problems:It is severely limited by the calling timing of these methods, if once timing is mixed
Disorderly, it may appear that uncertain consequence.Video playing cannot continue, and influence user experience, give development, maintenance work band
It is inconvenient to come.
Summary of the invention
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of based on the video playing owner's
View control method, to video, the owner is managed, and effective solution is because control video caused by sequence problem out of control
Problem, the no longer modulated interference with timing, algorithm is simple, is easily handled, and stability is good, and the situation for playing confusion is effectively avoided to go out
It is existing.
To achieve the above objectives, the technical solution adopted by the present invention is that:
A kind of view control method based on the video playing owner, it is characterised in that:
Video owner agreement VideoOwnerProtocol is set, is set in the protocol with properties:
It is automatic to play attribute, for identifying whether the video in currently playing is supported to play automatically,
Float small window attribute, for identifying whether the video in currently playing supports floating layer to play,
Video owner manager VideoOwnerManager is set, it is with the following functions:
Video owner pushOwner is added, the video owner is pressed into queue top,
Video owner popOwner is deleted, the video owner is popped up into queue top,
Video owner clearOwner is emptied, the video owner all in queue is emptied,
When the current video owner is level-one ViewController, then:This owner only destroys memory-resident in application
Shi Caihui is destroyed,
Level-one ViewController is with the following functions:
It executes and plays play, need to execute and video owner pushOwner operation is added,
It executes and plays pause pause,
It executes and stops stop, need to execute and empty video owner clearOwner.
Based on the above technical solution, the floating layer broadcasting refers to that broadcast window is reduced into the small window of a floating.
Based on the above technical solution, for the small window that floats having a size of default value, place view is placed in top layer,
Support dragging adjustment position.
Based on the above technical solution, the queue is manager's storehouse.
Based on the above technical solution, it is incoming current by obj parameter when video owner pushOwner is added
The information of the owner.
Based on the above technical solution, when video owner pushOwner is added, current queue top is monitored first
The video owner, it is whether consistent with the current owner obj to be added, avoid repeat add, just will be current when inconsistent
Owner obj is pressed into queue top.
Based on the above technical solution, when deleting video owner popOwner, current institute is passed to by obj parameter
The information for the person of having.
Based on the above technical solution, when deleting video owner popOwner, current queue top is monitored first
The video owner, it is whether consistent with the current owner obj to be popped up, deduplication is avoided, just by current institute when consistent
The person of having obj pops up queue top.
Based on the above technical solution, level-one ViewController belonging to the current video owner passes through
Whether the event that viewDidDisappear monitoring view has been disappeared, is capped or hidden is triggered, and in triggering, executes
Delete video owner popOwner.
Based on the above technical solution, when by level-one ViewController call newVC enter new page,
Then:
Judge whether new page plays video automatically,
Video owner pushOwner operation is added if it is, need to execute, further judges whether new page plays automatically and works as
Preceding video plays pause pause if it is not, then executing,
Pause pause is played if it is not, then executing.
View control method of the present invention based on the video playing owner, to video, the owner is managed, and is had
Effect solves the problems, such as that the no longer modulated interference with timing, algorithm is simple, easily because out of control to video control caused by sequence problem
In processing, stability is good, effectively avoids playing chaotic situation appearance.
Detailed description of the invention
The present invention has following attached drawing:
Flow chart Fig. 1 of the invention.
Specific embodiment
Below in conjunction with attached drawing, invention is further described in detail.
As shown in Figure 1, the view control method of the present invention based on the video playing owner:
Video owner agreement VideoOwnerProtocol is set, is set in the protocol with properties:
It is automatic to play attribute isAutoPlay, for identifying whether the video in currently playing is supported to play automatically,
Float small window attribute isSupportMini, for identifying whether the video in currently playing supports floating layer to play, wherein:
The floating layer broadcasting refers to that broadcast window is reduced into the small window of a floating,
For the small window that floats having a size of default value, place view is placed in top layer, supports dragging adjustment position,
Video owner manager VideoOwnerManager is set, it is with the following functions:
Video owner pushOwner is added, the video owner is pressed into queue top, wherein:
The queue is manager's storehouse,
When video owner pushOwner is added, the information of current owner is passed to by obj parameter,
When video owner pushOwner is added, the video owner on current queue top is monitored first, and to be added current
Whether owner obj is consistent, avoids repeating to add, current owner obj is just pressed into queue top when inconsistent,
Video owner popOwner is deleted, the video owner is popped up into queue top,
When deleting video owner popOwner, the information of current owner is passed to by obj parameter,
When deleting video owner popOwner, the video owner on current queue top is monitored first, and to be popped up current
Whether owner obj is consistent, avoids deduplication, and current owner obj is just popped up queue top when consistent,
Video owner clearOwner is emptied, the video owner all in queue is emptied,
When the current video owner is level-one ViewController, then:This owner only destroys memory-resident in application
Shi Caihui is destroyed,
Level-one ViewController is with the following functions:
It executes and plays play, need to execute and video owner pushOwner operation is added,
It executes and plays pause pause,
It executes and stops stop, need to execute and empty video owner clearOwner.
Further, level-one ViewController belonging to the current video owner is supervised by viewDidDisappear
Whether the event that surveys view has been disappeared, is capped or hidden is triggered, and in triggering, executes and deletes the video owner
PopOwner because of current video owner's memory-resident, therefore is handled by viewDidDisappear method.
Further, when calling newVC to enter new page by level-one ViewController, then:
Judge whether new page plays video automatically,
Video owner pushOwner operation is added if it is, need to execute, further judges whether new page plays automatically and works as
Preceding video plays pause pause if it is not, then executing,
Pause pause is played if it is not, then executing.
The present invention realizes the management to the video owner, and the video owner is that one is added to video playback capability
The concept of similar user(The administration authority that there is the video owner current video to play control), broadcasting, the pause of each video
Deng, be all by the owner initiate, pause or cancel(It closes).Once the owner changes, then the old owner just loses to working as
The control of preceding video avoids playing chaotic situation appearance.
Such as:
When entering new broadcast page, then should only have new broadcast page to have the right to suspend video, even if old broadcast page pause function is adjusted
With, and invalid.Effective solution is because control problem out of control to video caused by sequence problem.
The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.
Claims (10)
1. a kind of view control method based on the video playing owner, it is characterised in that:
Video owner agreement VideoOwnerProtocol is set, is set in the protocol with properties:
It is automatic to play attribute, for identifying whether the video in currently playing is supported to play automatically,
Float small window attribute, for identifying whether the video in currently playing supports floating layer to play,
Video owner manager VideoOwnerManager is set, it is with the following functions:
Video owner pushOwner is added, the video owner is pressed into queue top,
Video owner popOwner is deleted, the video owner is popped up into queue top,
Video owner clearOwner is emptied, the video owner all in queue is emptied,
When the current video owner is level-one ViewController, then:This owner only destroys memory-resident in application
Shi Caihui is destroyed,
Level-one ViewController is with the following functions:
It executes and plays play, need to execute and video owner pushOwner operation is added,
It executes and plays pause pause,
It executes and stops stop, need to execute and empty video owner clearOwner.
2. as described in claim 1 based on the view control method of the video playing owner, it is characterised in that:The floating layer is broadcast
It puts and refers to that broadcast window is reduced into the small window of a floating.
3. as claimed in claim 2 based on the view control method of the video playing owner, it is characterised in that:The floating is small
Window is placed in top layer having a size of default value, place view, supports dragging adjustment position.
4. as described in claim 1 based on the view control method of the video playing owner, it is characterised in that:The queue is
Manager's storehouse.
5. as described in claim 1 based on the view control method of the video playing owner, it is characterised in that:Video institute is added
When the person of having pushOwner, the information of current owner is passed to by obj parameter.
6. as claimed in claim 5 based on the view control method of the video playing owner, it is characterised in that:Video institute is added
When the person of having pushOwner, first monitor current queue top the video owner, and the current owner obj to be added whether
Unanimously, it avoids repeating to add, current owner obj is just pressed into queue top when inconsistent.
7. as described in claim 1 based on the view control method of the video playing owner, it is characterised in that:Delete video institute
When the person of having popOwner, the information of current owner is passed to by obj parameter.
8. as claimed in claim 7 based on the view control method of the video playing owner, it is characterised in that:Delete video institute
When the person of having popOwner, monitor the video owner on current queue top first, and the current owner obj to be popped up whether one
It causes, avoids deduplication, current owner obj is just popped up into queue top when consistent.
9. as described in claim 1 based on the view control method of the video playing owner, it is characterised in that:Current video institute
Level-one ViewController belonging to the person of having monitors view by viewDidDisappear and has disappeared, is capped or hidden
Whether the event of hiding is triggered, and in triggering, executes and deletes video owner popOwner.
10. as described in claim 1 based on the view control method of the video playing owner, it is characterised in that:When pass through one
Grade ViewController calls newVC to enter new page, then:
Judge whether new page plays video automatically,
Video owner pushOwner operation is added if it is, need to execute, further judges whether new page plays automatically and works as
Preceding video plays pause pause if it is not, then executing,
Pause pause is played if it is not, then executing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810741931.5A CN108900914B (en) | 2018-07-09 | 2018-07-09 | View control method based on video playing owner |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810741931.5A CN108900914B (en) | 2018-07-09 | 2018-07-09 | View control method based on video playing owner |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108900914A true CN108900914A (en) | 2018-11-27 |
CN108900914B CN108900914B (en) | 2021-06-25 |
Family
ID=64348468
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810741931.5A Active CN108900914B (en) | 2018-07-09 | 2018-07-09 | View control method based on video playing owner |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108900914B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113873316A (en) * | 2021-11-04 | 2021-12-31 | 上海哔哩哔哩科技有限公司 | Live broadcast room video playing method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060159419A1 (en) * | 2004-12-15 | 2006-07-20 | Koji Fujita | Recording control device and method, recording medium, and program |
CN105279222A (en) * | 2014-07-16 | 2016-01-27 | 孟智平 | Media editing and playing method and system |
CN105812954A (en) * | 2014-12-30 | 2016-07-27 | 乐视致新电子科技(天津)有限公司 | Playing method and playing device based on switching-off state of screen |
-
2018
- 2018-07-09 CN CN201810741931.5A patent/CN108900914B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060159419A1 (en) * | 2004-12-15 | 2006-07-20 | Koji Fujita | Recording control device and method, recording medium, and program |
CN105279222A (en) * | 2014-07-16 | 2016-01-27 | 孟智平 | Media editing and playing method and system |
CN105812954A (en) * | 2014-12-30 | 2016-07-27 | 乐视致新电子科技(天津)有限公司 | Playing method and playing device based on switching-off state of screen |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113873316A (en) * | 2021-11-04 | 2021-12-31 | 上海哔哩哔哩科技有限公司 | Live broadcast room video playing method and device |
CN113873316B (en) * | 2021-11-04 | 2024-02-27 | 上海哔哩哔哩科技有限公司 | Live broadcasting room video playing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108900914B (en) | 2021-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103064716B (en) | The method of mobile terminal device fast discharging application program | |
CN105677477B (en) | Method and device for optimizing application program resources and electronic equipment | |
CN105117228B (en) | Method for loading suspension window, suspension window loading device and electronic equipment | |
CN106502372A (en) | A kind of method of application control and mobile terminal | |
CN106200872A (en) | A kind of terminal and the management method of power consumption thereof | |
CN106371824A (en) | Portable device and application popup message display control method and apparatus | |
CN102833120B (en) | The abnormal method and system of NM server are processed in a kind of rapid automatized test | |
CN108900914A (en) | A kind of view control method based on the video playing owner | |
WO2014166231A1 (en) | Method and device for setting application program state | |
CN108900913A (en) | A kind of hierarchical view control method based on the video playing owner | |
CN109698979A (en) | A kind of method, apparatus and electronic equipment of video playing | |
CN108882039A (en) | A kind of method for handover control of the video playing owner | |
CN104991811A (en) | Process running state adjusting method in isolation system switching period and intelligent terminal | |
CN104217163A (en) | Method and device for detecting structured exception handling (SEH) attacks | |
CN111178241A (en) | Intelligent monitoring system and method based on video analysis | |
CN106789191A (en) | A kind of automatic method for restarting of distributed deployment service processes and device | |
CN104102498B (en) | A kind of mobile terminal and its starting-up method | |
CN108769820A (en) | A kind of management method of the video playing owner | |
CN106095605A (en) | The abnormality eliminating method of a kind of display terminal and device | |
CN103377071B (en) | A kind of batch data delet method and system | |
CN105630605B (en) | Method based on data service access situation dynamic adjusting data service cluster | |
CN106953914A (en) | A kind of referee method and system for controller cluster | |
WO2020215567A1 (en) | Global hook automatic repair method, apparatus, device, and storage medium | |
CN105872552A (en) | Intelligent processing method for prolonging video storage time of video monitoring system | |
CN110099251A (en) | Processing method, device and the computer readable storage medium of monitor video |
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 |