-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Peter fogg/remove video xml #132
Conversation
TODO: This breaks the 1.5x and .75x speeds. I'm still looking into why. TODO: VideoDescriptor inherits from RawDescriptor in order to use the from_xml and export_to_xml methods. This seems really ugly, though; I'd rather find a better way to do this.
position = Integer(help="Current position in the video", scope=Scope.user_state, default=0) | ||
show_captions = Boolean(help="Whether or not captions are shown", display_name="Show Captions", scope=Scope.settings, default=True) | ||
youtube_id_1_0 = String(help="Youtube ID for normal speed video", display_name="Normal Speed", scope=Scope.settings, default="OEoXaMPEzfM") | ||
youtube_id_0_75 = String(help="Youtube ID for .75x speed video", display_name=".75x", scope=Scope.settings, default="JMD_ifUUfsU") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need better display names for these properties (and help text). I recommend crafting the display names in such a way that they alphabetically appear together.
Toddi is our documentation person, and she's out this week. I'd recommend having Marco help you in the interim, both with display names and help text.
/home/christina/mitx_all/edx-platform/common/lib/xmodule/xmodule/templates/video/default.yaml needs to be updated. You will want to remove the XML data stub there (though I'm not sure you can entirely delete it, as described in https://edx-wiki.atlassian.net/browse/STUD-146. You may need to make it an empty String or something). Don would be a good person to talk to about this, as the work he's doing may allow us to actually remove the data from the template entirely. You should also remove data_dir in that template, as it's no longer a metadata field. To update templates, run django-admin.py update_templates --traceback --settings=cms.envs.dev --pythonpath=. |
@videos[speed] = video[1] | ||
@videos = | ||
'0.75': @el.data('youtube-id-0-75') | ||
'1.0': @el.data('normal-speed-video-id') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What should the behavior be if not all of these speeds are specified? When I tried it, I still got all the speed options in the LMS, but "An Error Occurred" when I select the unspecified ones. Is that the current behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could change this to only show a speed if @el.data('youtube-id-x') != ''
; that is, if the speed is actually specified by the course author.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would be oh so nice.
module_class = VideoModule | ||
stores_state = True | ||
template_dir_name = "video" | ||
|
||
metadata_attributes = RawDescriptor.metadata_attributes + ('youtube_id_1_0', | ||
'youtube_id_0_75', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this for?
if @el.data('youtube-id-1-25') | ||
@videos['1.25'] = @el.data('youtube-id-1-25') | ||
if @el.data('youtube-id-1-5') | ||
@videos['1.50'] = @el.data('youtube-id-1-5') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this PR hard codes that only up to 4 speeds can exist - which is the case in practice, but this change may make it harder to change that. Is this OK from a Product Management standpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markchang You are OK with just the 4 speeds, right? With videoalpha, the interpolation will happen automatically, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cahrens in videoalpha you will need xblock fields for storing any number of speeds. It is possible to add fields to xblocks dynamically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that with videoalpha the video speed would be interpolated for you (so you wouldn't need to specify multiple speeds). That is not correct?
You could use a xblock field of type List. However, that would not allow you to specify which speed corresponds to each entry.
There is an xblock field of type Dict. That would allow you to specify the key (speed) and the video.
We currently don't have metadata editors for either of these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cahrens @peter-fogg In HTML5 player youtube you need only one video link and one subtitles link.
In HTML5 player non-youtube you will need 3 fields for different sources of video for cross-browser compatibility.
All speeds for video and subtitles will be adjusted automatically in player itself.
My question was related to videoalpha supporting not-html5 youtube. In that case we use same speeds that video player does, it was misunderstanding. Don't mind about this.
@peter-fogg @cahrens @chrisndodge Are you aware of Video Alpha ( https://edx-wiki.atlassian.net/wiki/display/BLD/Video+Alpha )? Should this also be worked into Video Alpha, since it is the future player of the system... |
@valera-rozuvan yea we discussed this yesterday in our standup, so we're aware that this is applicable to the Video Alpha. Peter's working on the old video player first. |
👍 Oh, but remember to follow up on that LMS/CMS videoalpha/normal video step naming problem. |
Just merged in master to get the |
Please, use @rocha suggestion and cleanup commits history using |
@@ -1 +1 @@ | |||
<video youtube="1.0:1bK-WdDi6Qw" display_name="Video Resources"/> | |||
<video youtube_id_1_0=""1bK-WdDi6Qw"" display_name="Video Resources"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not leave old xml format? Just when reading inside descriptor, you can parse it to proper xblocks fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 Cause now you change interface and create possible problems in future (for new branches, tests, etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Peter's code reads in the old format-- he has unit tests around this. Can you explain more you think it is necessary to keep the old format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cahrens I see not reason to implement new format in xml if we just can change parsing logics in descriptor from_xml, as have been already done by @peter-fogg . Please explain me why we need new format of xml?
@peter-fogg Please rebase with current master. |
Just a note about interactive rebase-- we do not require an interactive rebase before merging a pull request. Some people do prefer it, but in the case where you have been doing merges with master along the way, interactive rebase is very difficult. I do not think we should require Peter to do it. |
@cahrens When you mentioned interactive rebase, did you mean common rebase like "git rebase master"? It this particular case, there are lot of tests in master that tests video module, and they are not included in current branch. They need to be included and passing before merge. |
@peter-fogg why you merged master in but not rebasing on top of it? If you use rebase, you will have same changes you need, but you will not have commits in git history with "merged master to you branch" message, which will be hard to merge again in master. (this is just a suggestion) |
@auraz Alex, it is true that either a merge or rebase must be done so that the PR can be cleanly merged with master. What I meant was that it is not currently required to do a rebase where multiple commits are "squashed" together and the commit history cleaned up/altered. @vaxXxa had suggested that. |
Peter fogg/remove video xml
I'll go ahead and merge this, since it fixes nearly all the issues we had with problem and html css, and this should go in before more changes. The table borders can be fixed in another round.
…-preferences-delete mattdrayer/api-user-preferences-delete: Added new Detail view, GET/DELET...
Change Carnegie's help tab to a mailto
identical to PR openedx#132 * live oauth support (openedx#115) * Updated message for Certificates * Update test_views.py (cherry picked from commit ab88963)
…re/fix-activation-email-for-sites Use site_configuration helper to get url base for activation email
Removes XML from the video component. Maintains backwards compatibility on export/import from XML-based courses.