Вопрос

With this below code. i want to do something different.

When the page will load i want to load video "xyz.mp4" instead first "sintel.mp4". means the video playing should start from 3rd video instead of 1st video which are set in playlist in below code..

JW Player link here.

If anyone familer with this JWPLAYER then please give me solution.

Question : how could i do this ? What advancement needed ?

Code

jwplayer("myElement").setup({
    playlist: [{
    image: "/assets/sintel.jpg",
    file: "/assets/sintel.mp4",
    title: "Sintel Movie Trailer"
    },{
    image: "/assets/bunny.jpg",
    file: "/assets/bunny.mp4",
    title: "Big Buck Bunny Movie Trailer"
    },{
    image: "/assets/xyz.jpg",
    file: "/assets/xyz.mp4",
    title: "test xyz video."
    },{
    image: "/assets/abc.jpg",
    file: "/assets/abc.mp4",
    title: "abc video."
    },{
    image: "/assets/tuv.jpg",
    file: "/assets/tuv.mp4",
    title: "TUV video"
    }]
    });

Thank you.

Update :

problem is little bit solved with playlistItem(index) as answered by Spokey . but the video should not start play. i need just load not start. means no playback only load.

Это было полезно?

Решение

jwplayer("myElement").setup({
    playlist: [{
        image: "/assets/sintel.jpg",
        file: "/assets/sintel.mp4",
        title: "Sintel Movie Trailer"
    }, {
        image: "/assets/bunny.jpg",
        file: "/assets/bunny.mp4",
        title: "Big Buck Bunny Movie Trailer"
    }, {
        image: "/assets/xyz.jpg",
        file: "/assets/xyz.mp4",
        title: "test xyz video."
    }, {
        image: "/assets/abc.jpg",
        file: "/assets/abc.mp4",
        title: "abc video."
    }, {
        image: "/assets/tuv.jpg",
        file: "/assets/tuv.mp4",
        title: "TUV video"
    }]
}).playlistItem(2).stop(); // index of the video

Found at http://www.longtailvideo.com/support/jw-player/28851/javascript-api-reference/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top