CN108391075B - Method for refreshing video playing Cell without interval - Google Patents

Method for refreshing video playing Cell without interval Download PDF

Info

Publication number
CN108391075B
CN108391075B CN201810165213.8A CN201810165213A CN108391075B CN 108391075 B CN108391075 B CN 108391075B CN 201810165213 A CN201810165213 A CN 201810165213A CN 108391075 B CN108391075 B CN 108391075B
Authority
CN
China
Prior art keywords
video
cell
video playing
refreshing
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
CN201810165213.8A
Other languages
Chinese (zh)
Other versions
CN108391075A (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.)
Beijing Kuwo Technology Co Ltd
Original Assignee
Beijing Kuwo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kuwo Technology Co Ltd filed Critical Beijing Kuwo Technology Co Ltd
Priority to CN201810165213.8A priority Critical patent/CN108391075B/en
Publication of CN108391075A publication Critical patent/CN108391075A/en
Application granted granted Critical
Publication of CN108391075B publication Critical patent/CN108391075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C7/00Arrangements for writing information into, or reading information out from, a digital store
    • G11C7/10Input/output [I/O] data interface arrangements, e.g. I/O data control circuits, I/O data buffers
    • G11C7/1006Data managing, e.g. manipulating data before writing or reading out, data bus switches or control circuits therefor

Abstract

The invention relates to a method for refreshing a video playing Cell without intervals, which comprises the following steps: when the video playing Cell receives a click playing ClickPlay event, a shared instance is called to create and return a video window VideoBox single instance, the returned video window VideoBox single instance is added to the video playing Cell, the video playing Cell sends a video playing request to a data service platform DataService, related information of a video to be played is inquired, when the video playing Cell triggers a Cell refreshing event, the video playing is continued on the video window VideoBox single instance, only the video playing Cell is refreshed, and after the video playing Cell is refreshed, the video window VideoBox single instance is restored to the video playing Cell. According to the invention, video playing is not influenced by Cell refreshing, Cell refreshing can not cause video playing to be jammed when a data source is changed, an algorithm is simple, an effect is good, and user experience is improved.

Description

Method for refreshing video playing Cell without interval
Technical Field
The invention relates to the technical field of TableView (UITableView) control use and optimization in IOS (iOS), in particular to a method for refreshing a video playing Cell at no interval.
Background
In the existing iOS system, the display of a human-computer interaction view in a form of table data is supported, and a colorful UI effect can be brought to a user.
In the iOS system, to realize table data display, the most common practice is to generate a table view using UITableView, which inherits from uiScrollView, thus supporting vertical scrolling and having excellent performance. In the table view, each row is a UITableViewCell object, and a user-scrollable multi-row single-column list is formed by the UITableViewCell objects.
UITableView has both grouping and non-grouping styles and can be set in the storeboard or by code. The table view may also add index values thereto, such as a right index list in the address book, each index entry corresponding to its section header title.
In use, the UITableView requires a data source (dataSource) to display data, and the UITableView queries the data source for how many rows of data are in total and what data are displayed on each row, etc. All OC objects that comply with the UITableView datasource protocol may be data sources of the UITableView. The process of presenting data is generally as follows:
(1) inquiring a data source, and acquiring the total data of how many groups need to be displayed;
(2) inquiring each group of data, and acquiring the number of rows of data to be displayed in each group;
(3) and inquiring each row of data to obtain the specific content displayed by each row.
When a video is displayed and played, the UITableViewCell object needs to display a corresponding video, and then the multi-line single-column list is composed of a plurality of video playing cells (videocells). When the data source is changed, all cells (uitableviewcells) of TableView need to be reloaded, and the cells are refreshed. There are several refreshes of TableView in iOS:
the first method comprises the following steps: refresh of tableview [ self.
The reloadData is the refresh of the entire UITableView, and sometimes we may need a partial refresh. Such as: refresh only one Cell, refresh only one section, etc. When the reloadData method is called at this time, although the user cannot see the method, some methods waste resources.
And the second method comprises the following steps: cell with local refresh
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:0];
[self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil]withRowAnimation:UITableViewRowAnimationFade];
This allows the first Cell of the first section to be refreshed easily. Although it appears that there is more code, it is really a better resource saving. Minimal refresh is also an optimization of UITableView.
And the third is that: partial refresh section
NSIndexSet *indexSet = [[NSIndexSet alloc]initWithIndex:0];
[self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationFade];
The section of code above is the refresh section 0.
However, in the existing technical solution, a stuck phenomenon occurs during the refresh, and the stuck phenomenon is particularly prominent when TableView slides, which affects the use experience. The reason for this is probably because the refreshing mechanism of the UITableViewCell is to extract a new Cell from the Cell cache for updating, thereby affecting the video being played.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method for refreshing a video playing Cell without intervals, wherein the video playing is not influenced by the Cell refreshing, the video playing is not blocked due to the Cell refreshing when the data source is changed, the algorithm is simple, the effect is good, and the user experience is improved.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
a method for refreshing a video playing Cell without intervals is characterized by comprising the following steps:
when the video playing Cell receives the click playing ClickPlay event, the shared instance is called to create and return to the video window VideoBox singleton,
the returned video view VideoBox is added to the video playing Cell in a single instance,
the video playing Cell sends a video playing request to the data service platform data service, inquires the relevant information of the video to be played,
when the video playing Cell triggers a Cell refreshing event, the video window VideoBox continues to play the video in a single case, only the video playing Cell refreshes,
and after the video playing Cell is refreshed, restoring the video window VideoBox to the video playing Cell in a single case.
On the basis of the technical scheme, the data service platform DataService receives a video playing request sent by the video playing Cell, triggers and acquires a related song fetchRelateSong event,
judging whether the video requested to be acquired exists or not according to the information carried in the request,
when no relevant video exists, the error information is returned,
when the relevant video exists, packaging the video information into an information update data packet update info, calling a custom refresh class reload tablelndex, and returning the update data packet update info to the video playing Cell.
On the basis of the above technical solution, the update data packet updateInfo includes a refresh identifier, and the refresh identifier is used to enable the video playing Cell receiving the identifier to perform a refresh operation.
On the basis of the technical scheme, after the video playing Cell receives the update data packet updateInfo, the video playing Cell analyzes the data packet to obtain a refresh identifier, and triggers a Cell refresh event updatewithin.
According to the method for refreshing the video playing Cell without intervals, the video playing is not influenced by the refreshing of the Cell, the video playing is not blocked due to the refreshing of the Cell when the data source is changed, the algorithm is simple, the effect is good, and the user experience is improved.
Drawings
The invention has the following drawings:
FIG. 1 is a flow chart of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
As shown in fig. 1, the method for refreshing a video playing Cell without intervals according to the present invention includes the following steps:
when the video playing Cell receives the click playing ClickPlay event, the shared instance is called to create and return to the video window VideoBox singleton,
the returned video view VideoBox is added to the video playing Cell in a single instance,
the video playing Cell sends a video playing request to the data service platform data service, inquires the relevant information of the video to be played,
when the video playing Cell triggers a Cell refreshing event, the video window VideoBox continues to play the video in a single case, only the video playing Cell refreshes,
and after the video playing Cell is refreshed, restoring the video window VideoBox to the video playing Cell in a single case.
In the scheme, the video window VideoBox single case is not affected by the refreshing of the video playing Cell, so that the video playing is ensured to be free of pause, the video playing Cell can also complete refreshing according to the command, and the video window is ensured to be free of intervals when the video playing Cell refreshes.
On the basis of the technical scheme, the data service platform DataService receives a video playing request sent by the video playing Cell, triggers and acquires a related song fetchRelateSong event,
judging whether the video requested to be acquired exists or not according to the information carried in the request,
when no relevant video exists, the error information is returned,
when the relevant video exists, packaging the video information into an information update data packet update info, calling a custom refresh class reload tablelndex, and returning the update data packet update info to the video playing Cell.
On the basis of the above technical solution, the update data packet updateInfo includes a refresh identifier, and the refresh identifier is used to enable the video playing Cell receiving the identifier to perform a refresh operation.
On the basis of the technical scheme, after the video playing Cell receives the update data packet updateInfo, the video playing Cell analyzes the data packet to obtain a refresh identifier, and triggers a Cell refresh event updatewithin.
Those not described in detail in this specification are within the skill of the art.

Claims (4)

1. A method for refreshing a video playing Cell without intervals is characterized by comprising the following steps:
when the video playing Cell receives the click playing ClickPlay event, the shared instance is called to create and return to the video window VideoBox singleton,
the returned video view VideoBox is added to the video playing Cell in a single instance,
the video playing Cell sends a video playing request to the data service platform data service, inquires the relevant information of the video to be played,
when the video playing Cell triggers a Cell refreshing event, the video window VideoBox continues to play the video in a single case, only the video playing Cell refreshes,
and after the video playing Cell is refreshed, restoring the video window VideoBox to the video playing Cell in a single case.
2. The method for gapless refreshing of a video playback Cell as claimed in claim 1, wherein: the data service platform DataService receives the video playing request sent by the video playing Cell, triggers and acquires the related song fetchRelateSong event,
judging whether the video requested to be acquired exists or not according to the information carried in the request,
when no relevant video exists, the error information is returned,
when the relevant video exists, packaging the video information into an information updating data packet updateInfo, calling a custom refreshing class reloadtableIndex, and returning the information updating data packet updateInfo to the video playing Cell.
3. The method for gapless refreshing of a video playback Cell as claimed in claim 2, wherein: the information updating data packet updateInfo includes a refresh identifier, and the refresh identifier is used for enabling the video playing Cell receiving the identifier to perform refresh operation.
4. A method for gapless refreshing of a video playback Cell as claimed in claim 3 wherein: after the video playing Cell receives the information updating data packet updateInfo, the video playing Cell analyzes the data packet to obtain a refreshing identifier and triggers a Cell refreshing event updatewithin.
CN201810165213.8A 2018-02-27 2018-02-27 Method for refreshing video playing Cell without interval Active CN108391075B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810165213.8A CN108391075B (en) 2018-02-27 2018-02-27 Method for refreshing video playing Cell without interval

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810165213.8A CN108391075B (en) 2018-02-27 2018-02-27 Method for refreshing video playing Cell without interval

Publications (2)

Publication Number Publication Date
CN108391075A CN108391075A (en) 2018-08-10
CN108391075B true CN108391075B (en) 2020-10-30

Family

ID=63069448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810165213.8A Active CN108391075B (en) 2018-02-27 2018-02-27 Method for refreshing video playing Cell without interval

Country Status (1)

Country Link
CN (1) CN108391075B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109582193B (en) * 2018-11-30 2021-01-29 北京微播视界科技有限公司 Control display method of item cells in list management group and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677366A (en) * 2016-02-26 2016-06-15 四川长虹电器股份有限公司 Method for achieving infinite circulating rolling selection based on UITableView in iOS
CN106528247A (en) * 2016-11-30 2017-03-22 北京小米移动软件有限公司 Data refreshing method and device
CN107066259A (en) * 2017-03-08 2017-08-18 武汉斗鱼网络科技有限公司 The method for simplifying and device of view controller in a kind of ios systems
CN107329795A (en) * 2017-06-23 2017-11-07 北京酷我科技有限公司 A kind of TableView optimization methods
CN107729114A (en) * 2017-10-31 2018-02-23 北京酷我科技有限公司 A kind of rendering method of play control

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102472551B1 (en) * 2016-02-19 2022-12-01 삼성전자주식회사 Electronic device and location estimation method thererof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105677366A (en) * 2016-02-26 2016-06-15 四川长虹电器股份有限公司 Method for achieving infinite circulating rolling selection based on UITableView in iOS
CN106528247A (en) * 2016-11-30 2017-03-22 北京小米移动软件有限公司 Data refreshing method and device
CN107066259A (en) * 2017-03-08 2017-08-18 武汉斗鱼网络科技有限公司 The method for simplifying and device of view controller in a kind of ios systems
CN107329795A (en) * 2017-06-23 2017-11-07 北京酷我科技有限公司 A kind of TableView optimization methods
CN107729114A (en) * 2017-10-31 2018-02-23 北京酷我科技有限公司 A kind of rendering method of play control

Also Published As

Publication number Publication date
CN108391075A (en) 2018-08-10

Similar Documents

Publication Publication Date Title
CN106066863B (en) Method and device for displaying live broadcast room in live broadcast platform
US20210049204A1 (en) Inserting information into playing content
US7403958B2 (en) Synchronization-replication concurrency using non-shared snapshot query on a history table at read-uncommitted isolation level
CN102214236B (en) Method and system for processing mass data
US20170148422A1 (en) Refresh control method and apparatus of display device
CN105183898A (en) Data sync method and data sync system
US9984056B2 (en) Display of user comments to timed presentation
CN106162298B (en) Method and system for realizing bullet screen
CN108391075B (en) Method for refreshing video playing Cell without interval
GB2579453A (en) Device and method for switching between message threads
CN103914458A (en) Mass data migration method and device
CN102843603A (en) Intelligent television and method for controlling caption thereof
US20110067021A1 (en) Electronic device and method of updating software thereof
US20130024422A1 (en) Methods for tracking database changes and devices thereof
CN110322833A (en) A kind of display driving method controls the display panel luminous method and display panel
CN104021200A (en) Data synchronizing method and device of database
CN106293953B (en) A kind of method and system of the shared display data of access
CN104090755A (en) Vertical scrolling display method for long application names in Android Launcher interface
CN106547584A (en) A kind of backing method and device of application program
CN105912270A (en) PM-oriented memory access request analysis apparatus and method
US20090248620A1 (en) Interacting methods of data extraction
US20090248691A1 (en) Interacting methods of data summarization
KR20180125797A (en) Foreign language learning system
CN112069332A (en) Real-time efficient advertisement material putting and obtaining method and system
CN101309372A (en) Television historic state enquiring method and television adopting the method

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