Course introduction video link other than youtube

Hi. I’m running open edx olive with tutor. Recently I’ve realized that in the studio > course > settings > timing and details > course introduction video I have to provide a youtube video ID. What if my video is not uploaded on youtube? Is there any way of using any other format? Honestly we can’t use youtube for this purpose as we have our own video hosting.

I’m having the same problem. If you find out how to do this please let me know & I’ll do likewise. Best - Arthur

I’m having a guess but I’m not sure how this solution will impact the system. Please have a look at these three methods in CourseDetails located in openedx/core/djangoapps/models/course_details. The code currently looks like this:

@classmethod
def fetch_youtube_video_id(cls, course_key):
    """
    Returns the course about video ID.
    """
    raw_video = cls.fetch_about_attribute(course_key, 'video')
    if raw_video:
        return cls.parse_video_tag(raw_video)

@classmethod
def fetch_video_url(cls, course_key):
    """
    Returns the course about video URL.
    """
    video_id = cls.fetch_youtube_video_id(course_key)
    if video_id:
        return f"http://www.youtube.com/watch?v={video_id}'

@staticmethod
def recompose_video_tag(video_key):
    """
    Returns HTML string to embed the video in an iFrame.
    """
    # TODO should this use a mako template? Of course, my hope is
    # that this is a short-term workaround for the db not storing
    #  the right thing
    result = None
    if video_key:
        result = (
            HTML('<iframe title="YouTube Video" width="560" height="315" src="//www.youtube.com/embed/{}?rel=0" '
                 'frameborder="0" allowfullscreen=""></iframe>').format(video_key)
        )
    return result

Check for the usages of these methods. For example in the CourseDetails.populate method we have

    ...
    course_details.intro_video = cls.fetch_youtube_video_id(course_key)
    ....

You need to have a look at the CourseDetails.parse_video_tag method as well. So yes, I guess these three methods must be changed but I’m not sure about the impact of changing them on playing, analytics, reports or any other functionality. When you search for youtube in the project, most of the results are test files and some js files (mostly in cms/static/js/spec directory). Please let me know if you have any idea about this, specially the impact and those js files.
@Arthur_Schneider

I was able to get an “external” .mp4 file to play by embedding the .mp4 video as a link within the html page. Hope this helps!

Sorry I don’t get it. Can you please explain in more details that which part of which html page you changed?

I went into the page that allows you to create content. Once there, I used basic text to link my URL link using the system’s link feature. Perhaps if you can share another email address with me, I can provide you a screenshot of what I’m talking about. The OpenedX platform doesn’t allow me to paste media within responses.

Best,
Arthur@xraoid.com

Yes that would be great! Please contact me at fateme.khodayari97@gmail.com

Hi everyone! I hope all is well.

I don’t know if you have already found an answer to this question but I would like to share another option to add a video within a course ‘about’ page aside from using the ‘Course Introduction Video’ option.

You can attach a video by adding HTML code in the Course Overview under Settings > Schedule and Details.

Below is an example. I added the following code highlighted in red:

And then, it will appear in the course ‘about’ page like this:

Note that you can add videos from any other video hosting sites with this option, not just YouTube. And you can also configure how it looks according to your liking.

I hope this information is helpful to you.

Thanks @annesulpico
We use YT for course “about-videos” BUT: With Quince (and Indigo) we seem to have lost the intuitive “play” button from course card for some reason (screenshot from our dev instance). I don’t know if it has been removed, or if we messed up our css or something :melting_face:

So if anyone knows how to add the play-button to course card, please ELI5 :heart_hands:
If there is no easy fix, I will use the iframe in text. I put too much effort into those videos to have them be viewed by accident :clapper:

It looks like the course card image ends up sitting in front of the play button. You can use the following to bring the play button in front again:

.course-info.about .intro-inner-wrapper .profile-top .media .hero .play-intro {
z-index: 1;
}