{"action":"opened","issue":{"url":"https://api.github.com/repos/react-native-community/react-native-video/issues/1320","repository_url":"https://api.github.com/repos/react-native-community/react-native-video","labels_url":"https://api.github.com/repos/react-native-community/react-native-video/issues/1320/labels{/name}","comments_url":"https://api.github.com/repos/react-native-community/react-native-video/issues/1320/comments","events_url":"https://api.github.com/repos/react-native-community/react-native-video/issues/1320/events","html_url":"https://github.com/react-native-community/react-native-video/issues/1320","id":379275607,"node_id":"MDU6SXNzdWUzNzkyNzU2MDc=","number":1320,"title":"Infinite buffering on Android (Exoplayer) caused by seeking","user":{"login":"aalzanki","id":971622,"node_id":"MDQ6VXNlcjk3MTYyMg==","avatar_url":"https://avatars3.githubusercontent.com/u/971622?v=4","gravatar_id":"","url":"https://api.github.com/users/aalzanki","html_url":"https://github.com/aalzanki","followers_url":"https://api.github.com/users/aalzanki/followers","following_url":"https://api.github.com/users/aalzanki/following{/other_user}","gists_url":"https://api.github.com/users/aalzanki/gists{/gist_id}","starred_url":"https://api.github.com/users/aalzanki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalzanki/subscriptions","organizations_url":"https://api.github.com/users/aalzanki/orgs","repos_url":"https://api.github.com/users/aalzanki/repos","events_url":"https://api.github.com/users/aalzanki/events{/privacy}","received_events_url":"https://api.github.com/users/aalzanki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-09T18:38:34Z","updated_at":"2018-11-09T18:38:34Z","closed_at":null,"author_association":"NONE","body":"### Current behavior\r\nIf I have a very long video (45+ mins), and scrub a lot, the video player on Android will get stuck in an infinite buffering state. I initially thought it might be an HLS bug, but it happens on mp4 video too.\r\n\r\n### Reproduction steps\r\n1) Have a very long video on android Exoplayer\r\n2) have a scrubber\r\n3) scrub a lot\r\n\r\n### Expected behavior\r\nI expect the video to not get stuck.\r\n\r\n### Platform\r\nWhich player are you experiencing the problem on:\r\n* Android ExoPlayer\r\n\r\n### Video sample\r\nAny long video.\r\n\r\n\r\nI found a way to fix the issue, but I'm not sure if the fix has any bad repercussions. I do not understand the mechanics of this code, so any feedback would be appreciated! My fix is to replace the contents of `buildHttpDataSourceFactory` with:\r\n\r\n```\r\nDefaultHttpDataSourceFactory factory = new DefaultHttpDataSourceFactory(getUserAgent(context));\r\n\r\nif (requestHeaders != null)\r\n    factory.getDefaultRequestProperties().set(requestHeaders);\r\n\r\nreturn factory;\r\n```"}}
{"actor":{"display_login":"aalzanki"}}