{"action":"created","issue":{"url":"https://api.github.com/repos/google/shaka-player/issues/1297","repository_url":"https://api.github.com/repos/google/shaka-player","labels_url":"https://api.github.com/repos/google/shaka-player/issues/1297/labels{/name}","comments_url":"https://api.github.com/repos/google/shaka-player/issues/1297/comments","events_url":"https://api.github.com/repos/google/shaka-player/issues/1297/events","html_url":"https://github.com/google/shaka-player/issues/1297","id":296478550,"number":1297,"title":"suggestion: create standalone offline download manager","user":{"login":"OrenMe","id":5461862,"avatar_url":"https://avatars1.githubusercontent.com/u/5461862?v=4","gravatar_id":"","url":"https://api.github.com/users/OrenMe","html_url":"https://github.com/OrenMe","followers_url":"https://api.github.com/users/OrenMe/followers","following_url":"https://api.github.com/users/OrenMe/following{/other_user}","gists_url":"https://api.github.com/users/OrenMe/gists{/gist_id}","starred_url":"https://api.github.com/users/OrenMe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrenMe/subscriptions","organizations_url":"https://api.github.com/users/OrenMe/orgs","repos_url":"https://api.github.com/users/OrenMe/repos","events_url":"https://api.github.com/users/OrenMe/events{/privacy}","received_events_url":"https://api.github.com/users/OrenMe/received_events","type":"User","site_admin":false},"labels":[{"id":159144978,"url":"https://api.github.com/repos/google/shaka-player/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-02-12T18:29:49Z","updated_at":"2018-02-18T21:56:19Z","closed_at":null,"author_association":"NONE","body":"I see that the only thing required by the offline class from the player instance is `getConfiguration` and `getNetworkingEngine`.\r\n\r\nThe`getNetworkingEngine` in the player class gets a callback for on segment download \r\nhttps://github.com/google/shaka-player/blob/35d8838ed38ea798cb3b63065d1ce05e364b3bab/lib/player.js#L805-L807\r\n\r\nBut it is not used in offline mode as there's no ABR(right? I don't see anyone calling `player.load` which initialises the abrManager_ member):\r\nhttps://github.com/google/shaka-player/blob/35d8838ed38ea798cb3b63065d1ce05e364b3bab/lib/player.js#L2422-L2427\r\n\r\nSo it actually can be exposed and used directly, no?\r\n\r\nI'm asking this as I'm trying to understand how can I relate to the following use case:\r\nUsually for offline an app will showcase a gallery window where potentially no player is initialised in it yet.\r\nThe user will see a mosaic of videos and might want to download from this screen.\r\nIf I follow the Shaka offline guide I see that a player instance needs to be created, and I would like to avoid this.\r\nTo add to this - an app might want to create the logic of a queue manager and download simultaneously a few entries and for this it would have to initialise a couple of players, each one with it's own video tag.\r\nSo my question - is there any necessity for the player instance to be passed to the offline class?\r\n\r\nMaybe I'm oversimplifying things and there are other considerations you took into account.\r\nMaybe creating the offline as a separate component will yield a smaller lib that takes care of download, that as I mentioned above, can happen without any player being loaded, then this can help an app load less code for as it would only have to load the offline download library for just downloading.\r\n\r\nThe offline requires mainly classes from the offline directory and utils.\r\nThe two main classes it requires from the player is the ManifestParser and DrmEngine, both requiring the NetworkingEngine, which is also required by the offline(as mentioned in the start here above).\r\nIn addition there's the configuration management but this can also be separated to its own class and then used by the offline class directly.\r\nI think this can lead to major decrease in size of the offline and create an offline manager which can be used in tandem with the player but serve the purpose of actual offline download use case.\r\n\r\nWDYT?\r\n\r\nThanks,\r\n\r\nOren M."},"comment":{"url":"https://api.github.com/repos/google/shaka-player/issues/comments/366551455","html_url":"https://github.com/google/shaka-player/issues/1297#issuecomment-366551455","issue_url":"https://api.github.com/repos/google/shaka-player/issues/1297","id":366551455,"user":{"login":"OrenMe","id":5461862,"avatar_url":"https://avatars1.githubusercontent.com/u/5461862?v=4","gravatar_id":"","url":"https://api.github.com/users/OrenMe","html_url":"https://github.com/OrenMe","followers_url":"https://api.github.com/users/OrenMe/followers","following_url":"https://api.github.com/users/OrenMe/following{/other_user}","gists_url":"https://api.github.com/users/OrenMe/gists{/gist_id}","starred_url":"https://api.github.com/users/OrenMe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrenMe/subscriptions","organizations_url":"https://api.github.com/users/OrenMe/orgs","repos_url":"https://api.github.com/users/OrenMe/repos","events_url":"https://api.github.com/users/OrenMe/events{/privacy}","received_events_url":"https://api.github.com/users/OrenMe/received_events","type":"User","site_admin":false},"created_at":"2018-02-18T21:56:19Z","updated_at":"2018-02-18T21:56:19Z","author_association":"NONE","body":"Starting with not having to associate a player with storage would be good.\r\nWhy wouldn’t you be able to call loadInternal? Because of the getMetworkingEngine call? Cause that’s exactly what I was wondering about in the original question - is it mandatory to get networking engine from the player instance? I don’t see any reason to not use the network engine directly. Maybe it is just not exposed as public in the lib?"}}
{"actor":{"display_login":"OrenMe"}}