Search code examples
javascripturlvideogetjwplayer

how to get a source url in jw player withe javascript command


im new in javascript and i try to get a video url from a site using java script without looking for it in the page source the page source is like this

<html>
<body>
<script type="text/javascript">
jwplayer("myJwVideo").setup({
    playlist: [{
        image: "http://www.blabla.com/back.jpg",
        sources: [{ 
            file: "http:www.videourl.mp4"   
        }]
    }],
});
</script>
</body>
</html>

is there is a way to get the http:www.videourl.mp4 url using javascript in firefox or google chrome console


Solution

  • jwplayer("myJwVideo").getPlaylist().

    Documentation at http://support.jwplayer.com/customer/en/portal/articles/1413089-javascript-api-reference#all