Skip to content

Video player branding addition for XuetangX - #6575

Merged
downzer0 merged 1 commit into
masterfrom
clrux/xuetangx-branding-update
Jan 28, 2015
Merged

downzer0 merged 1 commit into
masterfrom
clrux/xuetangx-branding-update

Conversation

@downzer0

Copy link
Copy Markdown
Contributor

Video player host/CDN branding

The (sandbox) [http://xuetangx.m.sandbox.edx.org] should have everything configured to demo the site/video player as if you're viewing from a location in China. Both the CMS and LMS use the same video player code and both have the 'CN' location forced meaning both platforms should show the branding for XuetangX.

All work is derived from (JIRA UX-1232) [https://openedx.atlassian.net/browse/UX-1232].

Updates included in this work

  • Appending branding information (as the last <li> in .wrapper-downloads) under the player
  • Added styles to handle the additional branding
  • Added Removed configuration files specific to lms and cms though these are really only for the sandbox
  • Updated some Python files for the video which handle the new variables
  • Squashed
  • Rebased

Notables

  • The branding info has been set in the JSON files per country code, so this branding can be applied to any country code that's added to the array (yay future-proofing). Meaning, this update will work for providers in addition to XuetangX.

Notes on configuration

For sandbox viewing, there are Django configurations which must be created. Those instructions are below.

Adding configurations

  • Ensure you have superuser permissions on the sandbox
  • Create a new configuration for Branding info configs
  • Paste the below snippet (valid JSON)
  • Click Save

Note: This has already been configured.

Snippet

{
    "CN": {
        "url": "http://www.xuetangx.com",
        "logo_src": "http://www.xuetangx.com/static/images/logo.png",
        "logo_tag": "Video hosted by XuetangX.com"
    }
}

We also need to make an edit to lms.env.json and cms.env.json on the sandbox:

"VIDEO_CDN_URL": {
    "CN": "http://api.xuetangx.com/edx/video?s3_url="
}

Note: Updating both of these files should only be done on sandboxes. XuetangX (and others) will have these necessary configurations already setup.

Forcing viewing from [location]

We need to fake our location. To do this, follow these steps:

  • SSH into the sandbox
  • Edit /edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/video_module.py
  • Temporarily update both instances of .get(self.system.user_location) to .get('CN')
  • Save the file
  • Restart the sandbox sudo /edx/bin/supervisorctl restart edxapp:

Note: This has already been configured.


Thanks to everyone who helped:
@olmar @polesye @tymofij

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch 2 times, most recently from 2bca53f to 683ff73 Compare January 13, 2015 19:35
@frrrances

Copy link
Copy Markdown
Contributor

Two quick thoughts from a UX perspective:

  1. I think the Xuetang link should maybe open in a new window/tab.
  2. Can we get some context (tooltip that says "Video hosted by Xuetang") on hover?

I'll take a look at the code one more time now.

@frrrances

Copy link
Copy Markdown
Contributor

Front-end code looks good (I can't speak to the python). Once you address the UX notes above and get the python reviewed, 👍

Comment thread lms.env.json Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@clrux seems adding LMS configuration .json file here is not the right way of updating them. Please ask someone from devops, may be @e0d .

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch 4 times, most recently from 0b72126 to ed5249f Compare January 15, 2015 03:09
@downzer0

Copy link
Copy Markdown
Contributor Author

@olmar The only tests that are failing now are related to a video location not being found. Code-wise, everything seems ok. Would you mind verifying and maybe giving me a thumbs-up to merge?

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch from d0b5edb to 93b4a5a Compare January 15, 2015 15:56
@explorerleslie

Copy link
Copy Markdown

@clrux can you add a screenshot of what the final styling looks like, so everyone looking at the ticket has it as a reference? Thanks!

@explorerleslie

Copy link
Copy Markdown

👍 to merge.

@downzer0

Copy link
Copy Markdown
Contributor Author

Here is the final styling and updates of the video player. The CDN/host branding appears in the bottom right as a link to the CDN/host website.

screen shot 2015-01-16 at 3 01 49 pm

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch from 821141b to 01de58a Compare January 20, 2015 17:02
@downzer0

Copy link
Copy Markdown
Contributor Author

Tests passed. Awaiting work from TNL-1233.

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch from 9e1fb47 to 8024986 Compare January 23, 2015 15:47
@downzer0

Copy link
Copy Markdown
Contributor Author

@polesye @olmar How do I test this outside of China? Previously, we were using the env.json variables to force the location to 'CN', but since those were removed, what's the best way to achieve this?

It also looks as if one of the video tests is failing. Could you guys take a look at that?

@olmar

olmar commented Jan 23, 2015

Copy link
Copy Markdown
Contributor

@clrux Also please look at tests for example to add appropriate string in Admin to Branding config.

@downzer0

Copy link
Copy Markdown
Contributor Author

@frrrances @explorerleslie Finally got all the configurations done and a new sandbox spun up for preview. If you navigate to http://xuetangx.m.sandbox.edx.org and view a video, you should see the branding on both the LMS and the CMS side.

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch from 8024986 to db40572 Compare January 27, 2015 13:57
@explorerleslie

Copy link
Copy Markdown

@clrux so this includes the changes to configuration modules that the Kiev team made?

@explorerleslie

Copy link
Copy Markdown

@clrux other than my above question, I took a look at the sandbox and this looks good to ship. 👍

@downzer0

Copy link
Copy Markdown
Contributor Author

@explorerleslie This does indeed contain the updates from the Kiev team. I'm getting a single Unit test error. I'll investigate. Gah, so close!

@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch from dda2cf0 to e4af261 Compare January 28, 2015 11:38
@downzer0
downzer0 force-pushed the clrux/xuetangx-branding-update branch from e4af261 to 9e2494b Compare January 28, 2015 11:39
downzer0 pushed a commit that referenced this pull request Jan 28, 2015
Video player branding addition for XuetangX
@downzer0
downzer0 merged commit e871df5 into master Jan 28, 2015
@downzer0
downzer0 deleted the clrux/xuetangx-branding-update branch February 2, 2015 15:18
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.

4 participants