Giter VIP home page Giter VIP logo

Comments (15)

casatwy avatar casatwy commented on June 25, 2024

复用是为了降低内存消耗,以及加快帧率用的,否则滑动会非常卡。

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

对了,补充一下,你看到的红色的View其实只是Cover View,这个可以是任意View的,例如UIImageView,是视频的封面。

from ctvideoplayerview.

smhjsw avatar smhjsw commented on June 25, 2024

我之前没有表述清楚,我这边不应该说复用。

问题应该是,在复用的时候,会出现 cell 里显示的视频内容重复,在 prepare 的时候,不会马上播放,这里可能需要先隐藏下 CTVideoView。具体可以看下这个视频

http://weibo.com/p/230444d08218d1308aed2cc1209b64c5213d46

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

我看了一下视频,然后自己尝试复现了一下,并没有复现出来,初步判断感觉是网速问题?

我想问一下你这边复现几率有多大?以及复现步骤?

发自我的 iPhone

在 2016年10月13日,09:45,George Shen <[email protected]mailto:[email protected]> 写道:

我之前没有表述清楚,我这边不应该说复用。

问题应该是,在复用的时候,会出现 cell 里显示的视频内容重复,在 prepare 的时候,不会马上播放,这里可能需要先隐藏下 CTVideoView。具体可以看下这个视频

http://weibo.com/p/230444d08218d1308aed2cc1209b64c5213d46


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com//issues/17#issuecomment-253389255, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA9Y1WV-sTdAbdP7xx_EdkBPjuoYYn4gks5qzY08gaJpZM4KUeyy.

from ctvideoplayerview.

smhjsw avatar smhjsw commented on June 25, 2024

复现的步骤是:进入列表页之后,等到最上面的两个视频中任意一个快要准备好播放时,向下滑动。

复现概率不确定。

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

??我没复现出来…可以写一个能复现bug的test case然后给个pull request我么…我断断续续快速滑了好几次,都没看到你视频上发生的场景…你是在慢网络下测试的么?

发自我的 iPhone

在 2016年10月13日,12:20,George Shen <[email protected]mailto:[email protected]> 写道:

复现的步骤是:进入列表页之后,等到最上面的两个视频中任意一个快要准备好播放时,向下滑动。

复现概率不确定。


You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com//issues/17#issuecomment-253410886, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AA9Y1eyxstnUqCf4Ow6W5Zd42a9E-QkFks5qzbGJgaJpZM4KUeyy.

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

已经在Demo中修复了,在demo中添加willDisplayCell的delegate方法,然后prepare就好了。CTVideoView本身的代码跟这个bug是无关的,我demo没写好。

from ctvideoplayerview.

smhjsw avatar smhjsw commented on June 25, 2024

感谢!

from ctvideoplayerview.

smhjsw avatar smhjsw commented on June 25, 2024

刚刚又测试了下,问题还存在。暂时还没找到 100% 复现的方法,但是不断上下滑动过程中,会有三四成可能性出现。

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

诶?我也再看看,我改过之后测试时,已经并没有复现了~

from ctvideoplayerview.

smhjsw avatar smhjsw commented on June 25, 2024

我写得那个 test case 不能复现问题了,暂时需要手动。

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

那能够提供一个新的test case么?

from ctvideoplayerview.

smhjsw avatar smhjsw commented on June 25, 2024

已发 PR,如果没有出现的话,建议拖动几次看下,或者退出再进入,我这边基本上必现了。

from ctvideoplayerview.

casatwy avatar casatwy commented on June 25, 2024

我已经合并PR了,重现之后我会重新开启这个issue

from ctvideoplayerview.

lianleven avatar lianleven commented on June 25, 2024

我发现了这个问题,经过调试发现:与库的本身是没问题的,是因为第一次tableView,DataSource刷新的时候,会willdisplaycell 最多15次(DataSource count > 15),tableView重用原理就是一个队列,当将要显示下个cell的时候就会从队列里取最后一个, 因为有可能最后一个是已经prepare的,显示的是其他的视频帧,如果网速不好的情况下就很明显,解决方案就是在didEndDisplayingCell中去移除掉prepare

from ctvideoplayerview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.