Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify Offline module API #3275

Merged

Conversation

bbert
Copy link
Contributor

@bbert bbert commented Jun 3, 2020

This PR modifies the Offline module API in order to access offline module using MediaPlayer.getOfflineController()
Types have been declared in index.d.ts to resolve issue #3261
JSDoc has also been fixed

Bertrand Berthelot added 6 commits June 3, 2020 15:44
- access offline module using MediaPlayer.getOfflineController()
- modify OfflineController API ("record" instead of "download")
- inject dependencies when creating OfflineController
- use MediaInfo type to get and select the available tracks representations to record/download
- add offline module types in index.d.ts
- update jsdoc
- update sample
- store original manifest as a string in indexedDB instead of full object (can lead to DataCloneError)
- use DashParser to parse stored manifest when loading/resuming download of a record
(cherry picked from commit 5e6b73e)
@dsilhavy dsilhavy self-requested a review June 8, 2020 07:36
@dsilhavy dsilhavy added this to the 3.1.2 milestone Jun 8, 2020
@@ -1028,23 +1027,23 @@ app.controller('DashController', function ($scope, $timeout, $q, sources, contri
//
////////////////////////////////////////

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing ";" on 1107

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -5,45 +5,46 @@ angular.module('DashPlayer').
service('DownloadService', function () {

player = undefined;
var downloads = [];
offlineController = undefined;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Define variables offlineController and player or should they be in global scope

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes offlineController can be removed from global scope since we can get it from player

@dsilhavy
Copy link
Collaborator

dsilhavy commented Jun 8, 2020

@bbert I checked functionality regarding download of video, audio and texttracks. Looks good to me, just added two minor comments above.

@dsilhavy dsilhavy merged commit d968368 into Dash-Industry-Forum:development Jun 8, 2020
@bbert bbert deleted the offline-module-api branch June 8, 2020 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants