mobile app can't open video and html content

139 views
Skip to first unread message

Chris K

unread,
Oct 31, 2018, 2:46:16 AM10/31/18
to Open edX operations
hi all, 

I have compiled open edx android mobile app and have enabled the following setting on the mobile app: 
COURSE_VIDEOS_ENABLED = true 

Also in EDX studio, I have enabled the course setting as follow:
Mobile Course Available = true 

I can login using mobile app and view and enter the course. 

I have 2 problems right now:
1. Video is not displayed: I have put alternative url for video, with .webm and I confirm I can load the video if I type video URL directly on browser.
It will always display: The video isn't yet available on mobile
2. Multiple choices problem and html content can't be displayed. It always says "Page not found. The page that you were looking for was not found"

Anyone have a clue how to resolve these 2 issues? 

thanks,
Chris

Nguyễn Văn Tú

unread,
Oct 31, 2018, 2:58:20 AM10/31/18
to opene...@googlegroups.com
Hi Chris,
1. Could you try with a .mp4 video?
2. Beside Oauth2 client, did you add an application (with the same client id) in Django admin -> Django OAuth toolkit (DOT) -> Applications ? If not, pls add one, because DOT token is required. Set Client type to public, and grant type to Resource owner password-based.

--
You received this message because you are subscribed to the Google Groups "Open edX operations" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openedx-ops...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openedx-ops/14fe55a7-addc-4cd8-b183-092ee4e52fc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris K

unread,
Oct 31, 2018, 3:49:45 AM10/31/18
to Open edX operations
Hi Nguyen,

So I added 2 different URLs,  the mp4 for desktop and alternate url with webm. 
And there is one item under Django admin-> Django OAuth toolking -> Applications, which is Login Service for JWT Cookies.

I added another one with client id the same as OAuth client id for the mobile. Still the problem persists. 

Also there is this error in the mobile app console:
415 Unsupported Media Type
{"detail":"Unsupported media type \"application/merge-patch+json\" in request.

Nguyễn Văn Tú

unread,
Oct 31, 2018, 5:27:12 AM10/31/18
to opene...@googlegroups.com
Hi Chris,
Could you upload the full .yaml configuration you use?
This is my working configuration with a mp4 video stored on amazon S3. I assume that you enable the video pipeline.
About the problem "problem not found", is there any other error in the logcat, at the time you click to see the multiple choice problems?

API_HOST_URL: <...>
ENVIRONMENT_DISPLAY_NAME: ''
PLATFORM_NAME: '...'
PLATFORM_DESTINATION_NAME: '...'
FEEDBACK_EMAIL_ADDRESS: '...'
NEW_LOGISTRATION_ENABLED: true
COURSE_SHARING_ENABLED: true
DISCUSSIONS_ENABLED: true
CERTIFICATES_ENABLED: true
USER_PROFILES_ENABLED: true
COURSE_VIDEOS_ENABLED: true
COURSE_DATES_ENABLED: true
USING_VIDEO_PIPELINE: false
COURSE_ENROLLMENT:
  TYPE: 'native'


Chris K

unread,
Nov 1, 2018, 11:58:33 AM11/1/18
to Open edX operations
Hi Nguyen, 

Here is my config: 

COURSE_VIDEOS_ENABLED: true
USING_VIDEO_PIPELINE: false

if I set 
USING_VIDEO_PIPELINE: true 

video still not playable, but it can be downloaded. 

>>is there any other error in the logcat,

What do you mean by logcat? 

Thanks,
Chris

Nguyễn Văn Tú

unread,
Nov 1, 2018, 9:23:45 PM11/1/18
to opene...@googlegroups.com
Hi Chris,
I mean the Logcat tab in the Android Studio. Without the full log, it is hard for us to see what's wrong. If your service is available online, you can censor sensitive information, such as sessionid or authentication token,..
About the video problem, The USING_VIDEO_PIPELINE should be set to false. could you put the debug points at getItem (CourseUnitPagerAdapter.java) and getPreferredVideoInfo (EncodedVideos.java), and see what happens?
Also,   "Video Available on Web Only" (in advanced setting when adding video) option should be set to false.

Chris K

unread,
Nov 2, 2018, 2:24:18 AM11/2/18
to opene...@googlegroups.com
Hi Nguyen, 

Thank you for your input. 

Video Available on Web Only  already set to false.  It goes to fallback section 
if(isPreferredVideoInfo(fallback)){
return fallback;
}

Here is the logcat result

Nguyễn Văn Tú

unread,
Nov 2, 2018, 3:19:52 AM11/2/18
to opene...@googlegroups.com
Hi Chris,
It seems strange to me... At this point, getItem (CourseUnitPagerAdapter.java) should return an instance of CourseUnitVideoFragment, and either the video either played or some other errors may appear, but not "This video isn’t yet available on mobile" anymore. Could you try to replace your video URL with an example from edX: https://s3.amazonaws.com/edx-course-videos/edx-edx101/EDXSPCPJSP13-G030300.mp4
If it still not work, maybe we need to wait for some more experienced people to help.

Chris K

unread,
Nov 2, 2018, 4:13:51 AM11/2/18
to opene...@googlegroups.com
Hi Nguyen, I have changed the video to the S3 URL that you give me. Thank you. Still the same error displayed.

Does it have anything to do with this error in server (CMS module) : 

Nov  2 04:56:48 lms [service_variant=cms][xmodule.video_module.video_handlers][env:sandbox] ERROR [lms  12231] [video_handlers.py:344] - [Translation Dispatc
h] block-v1:CompanyName+PY02+2018_T1+type@video+block@f7d489ec213a494786b1dae7222191b7
Traceback (most recent call last):
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/video_handlers.py", line 333, in transcript
    youtube_id=request.GET.get('videoId'),
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 1020, in get_transcript
    transcripts_info=transcripts_info
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 66, in wrapper
    return func(*args, **kwds)
  File "/edx/app/edxapp/edx-platform/common/lib/xmodule/xmodule/video_module/transcripts_utils.py", line 973, in get_transcript_from_contentstore
    lang=language
NotFoundError: No transcript for `en` language

Nguyễn Văn Tú

unread,
Nov 2, 2018, 4:20:03 AM11/2/18
to opene...@googlegroups.com
Hi Chris. I also see this error in my Open edX instance. This is a warning for not having transcript, but in my case, the video is still played normally.

Reply all
Reply to author
Forward
0 new messages