{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/26767","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/26767/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/26767/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/26767/events","html_url":"https://github.com/flutter/flutter/issues/26767","id":400841916,"node_id":"MDU6SXNzdWU0MDA4NDE5MTY=","number":26767,"title":"Video playback within a ListView","user":{"login":"wemped","id":10466104,"node_id":"MDQ6VXNlcjEwNDY2MTA0","avatar_url":"https://avatars0.githubusercontent.com/u/10466104?v=4","gravatar_id":"","url":"https://api.github.com/users/wemped","html_url":"https://github.com/wemped","followers_url":"https://api.github.com/users/wemped/followers","following_url":"https://api.github.com/users/wemped/following{/other_user}","gists_url":"https://api.github.com/users/wemped/gists{/gist_id}","starred_url":"https://api.github.com/users/wemped/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wemped/subscriptions","organizations_url":"https://api.github.com/users/wemped/orgs","repos_url":"https://api.github.com/users/wemped/repos","events_url":"https://api.github.com/users/wemped/events{/privacy}","received_events_url":"https://api.github.com/users/wemped/received_events","type":"User","site_admin":false},"labels":[{"id":581964819,"node_id":"MDU6TGFiZWw1ODE5NjQ4MTk=","url":"https://api.github.com/repos/flutter/flutter/labels/d:%20examples","name":"d: examples","color":"0e8a16","default":false},{"id":283479235,"node_id":"MDU6TGFiZWwyODM0NzkyMzU=","url":"https://api.github.com/repos/flutter/flutter/labels/severe:%20new%20feature","name":"severe: new feature","color":"ffff00","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/flutter/flutter/milestones/22","html_url":"https://github.com/flutter/flutter/milestone/22","labels_url":"https://api.github.com/repos/flutter/flutter/milestones/22/labels","id":2270094,"node_id":"MDk6TWlsZXN0b25lMjI3MDA5NA==","number":22,"title":"Goals","description":"P2: These are tasks we think are worth fixing in the coming years. It includes issues we've identified that might block fully shipping broad consumer-facing apps, correctness issues, and bugs relating to polish and quality.\r\n\r\nThe date on this milestone is utterly arbitrary and just intended to sort the milestone appropriately.","creator":{"login":"Hixie","id":551196,"node_id":"MDQ6VXNlcjU1MTE5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/551196?v=4","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"open_issues":2423,"closed_issues":2101,"state":"open","created_at":"2017-01-23T00:27:59Z","updated_at":"2019-06-20T00:05:21Z","due_on":"2031-01-01T08:00:00Z","closed_at":null},"comments":4,"created_at":"2019-01-18T18:37:55Z","updated_at":"2019-06-20T08:16:32Z","closed_at":null,"author_association":"NONE","body":"A common pattern in apps is having video playing within infinite lists, playing/pausing/stopping as the user scrolls specific views on/off screen. Examples would be the muted autoplay videos on Facebook or Instagram's main feeds.\r\n\r\nBest case scenario I think a pattern like this would be a good candidate for one the cookbooks on  https://flutter.io/docs/cookbook\r\nAdditionally, I would love to get some insight/suggestions from the community about implementing this kind of feature.\r\n\r\nBuilding similar things on native iOS/Android I would just\r\n1) listen for scroll events\r\n2) check which cells are visible\r\n3) do some math to decide which item should play\r\n4) and push a video player onto that item and play it.\r\n\r\nAs far as I know - Flutter doesn't have anyway of telling me which Widgets in a ListView are the ones currently visible. The only solution I could come up with was\r\n1. putting a key on every item in the List View\r\n2. using the [https://pub.dartlang.org/packages/rect_getter](RectGetter) package and getting the rect of the ListView\r\n3. get the rect of each item and check if it's within the rect of the ListView\r\n\r\nIf there's a better way to do this, I'd love to know. I know ListView must be keeping track of what it has rendered somewhere, I just don't know how to access it.\r\n\r\nThanks in advance"},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/503926582","html_url":"https://github.com/flutter/flutter/issues/26767#issuecomment-503926582","issue_url":"https://api.github.com/repos/flutter/flutter/issues/26767","id":503926582,"node_id":"MDEyOklzc3VlQ29tbWVudDUwMzkyNjU4Mg==","user":{"login":"yuridiniz","id":5683101,"node_id":"MDQ6VXNlcjU2ODMxMDE=","avatar_url":"https://avatars1.githubusercontent.com/u/5683101?v=4","gravatar_id":"","url":"https://api.github.com/users/yuridiniz","html_url":"https://github.com/yuridiniz","followers_url":"https://api.github.com/users/yuridiniz/followers","following_url":"https://api.github.com/users/yuridiniz/following{/other_user}","gists_url":"https://api.github.com/users/yuridiniz/gists{/gist_id}","starred_url":"https://api.github.com/users/yuridiniz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuridiniz/subscriptions","organizations_url":"https://api.github.com/users/yuridiniz/orgs","repos_url":"https://api.github.com/users/yuridiniz/repos","events_url":"https://api.github.com/users/yuridiniz/events{/privacy}","received_events_url":"https://api.github.com/users/yuridiniz/received_events","type":"User","site_admin":false},"created_at":"2019-06-20T08:16:32Z","updated_at":"2019-06-20T08:16:32Z","author_association":"NONE","body":"For now, this can help us\r\n(https://github.com/rvamsikrishna/inview_notifier_list/blob/master/README.md)[https://github.com/rvamsikrishna/inview_notifier_list/blob/master/README.md]"}}
{"actor":{"display_login":"yuridiniz"}}