Video with Captions/Subtitles (JW Player)

Re: 回复: Video with Captions/Subtitles (JW Player)

by Nagy Gábor Zsolt -
Number of replies: 1

This code works for me in Moodle 2.6:

<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
    playlist: [{
        file: "http://www.example.org/draftfile.php/171/user/draft/927794117/Getting_Started.mp(four)",
        image: "/assets/sintel.jpg",
        tracks: [{
            file: "http://www.example.org/draftfile.php/171/user/draft/927794117/Getting_Started.srt",
            label: "English",
            kind: "captions",
            "default": true
        },{
            file: "http://www.example.org/draftfile.php/171/user/draft/927794117/Getting_Started.srt", 

            kind: "captions",
            label: "Hungarian"
        }]
    }]
});
</script>

Please note to copy jwplayer under the root directory and add the following two lines into the <head> section of you theme:

<script src="/jwplayer/jwplayer.js" ></script>
<script>jwplayer.key="your_jwplayer_token_key";</script>

Also turn off QuickTime player on the SITE ADMINISTRATION / APPEARANCE / MEDIA   EMBEDDING page.

Cheers

In reply to Nagy Gábor Zsolt

Re: 回复: Video with Captions/Subtitles (JW Player)

by Brija Gentian -

hello. i would like to have your help. thank