Video player doesn't show

I use a video player framework . I create a javascript function that get video url and send it to json array.

Here is a part of my javascript code:

        var tvp_settings;

    function get_video_urls(hurl , durl , lurl) {
        alert(durl);
        /* SETTINGS */
        tvp_settings = {
            video:[
                {
                    type:'local',
                    path:{
                        Default: durl
                    },
                    previewImage:'https://elixirforum.com/uploads/default/original/2X/c/c7df6a9814561c3b152270e0f82fd01bf4f60564.jpg',

                    /* optional below */
                    showControls:true,/* show controls while video plays */
                    disableSeekbar:true,/* disable seekbar in controls */
                    showSkipBtn:true,/* show skip button */
                    skipBtnText:'باقیمانده',/* skip button message. */
                    skipEnableTime:5,/* time until skip button is enabled, in seconds */
                    link:'http://www.persianstacks.ir',/* click on video url link. Leave empty for none. */
                    target:'_blank',/* _blank/_parent (opens in new/same window)  */
                },

But video player doesn't show video . when i create this variable into function , video player work very good !

durl = 'sample video url';

what is problem ?

UPDATE: This is my fully code :

<script>
    var tvp_settings;

    function get_video_urls(hurl , durl , lurl) {
        alert(durl);
        /* SETTINGS */
        tvp_settings = {
            video:[
                {
                    type:'local',
                    path:{
                        Default: durl
                    },
                    previewImage:'https://elixirforum.com/uploads/default/original/2X/c/c7df6a9814561c3b152270e0f82fd01bf4f60564.jpg',

                    /* optional below */
                    showControls:true,/* show controls while video plays */
                    disableSeekbar:true,/* disable seekbar in controls */
                    showSkipBtn:true,/* show skip button */
                    skipBtnText:'باقیمانده',/* skip button message. */
                    skipEnableTime:5,/* time until skip button is enabled, in seconds */
                    link:'http://www.persianstacks.ir',/* click on video url link. Leave empty for none. */
                    target:'_blank'/* _blank/_parent (opens in new/same window)  */
                },
                {
                    type:'local',
                    path:{
                        High: 'https://hw20.asset.aparat.com/aparat-video/5239d6e217bb2c2dc156b033141566358949397-144p__68773.mp4',
                        Default: 'https://hw20.asset.aparat.com/aparat-video/5239d6e217bb2c2dc156b033141566358949397-144p__68773.mp4',
                        Low: 'https://hw20.asset.aparat.com/aparat-video/5239d6e217bb2c2dc156b033141566358949397-144p__68773.mp4'
                    },
                    previewImage:'https://www.w3schools.com/w3css/img_lights.jpg',

                    /* optional below */
                    showControls:true,/* show controls while video plays */
                    disableSeekbar:false,/* disable seekbar in controls */
                    showSkipBtn:false,/* show skip button */
                    skipBtnText:'',/* skip button message. */
                    skipEnableTime:10,/* time until skip button is enabled, in seconds */
                    link:'',/* click on video url link. Leave empty for none. */
                    target:'_blank',/* _blank/_parent (opens in new/same window)  */
                    downloadPath:'../videos/fv.mp4',
                    captions:'',/* subtitles */
                    events: ''/*timed events over video */
                }
            ],

            endAction: 'stop',/* stop/loop/link (applies to last video in sequence) */
            endLink:'',/* end link action. Leave empty for none. */
            endTarget:'_parent',/* _blank/_parent (opens in new/same window)  */
            useWebmVideoFormat:false,/* true/false (Browser support for html5 video requires minimum of 2 video formats to cover all browsers, mp4 and ogv being preferred. If useWebmVideoFormat is true, then webm will be used instead of a ogv.) */
            useYoutubeApi:false,/* use youtube api to get video title, description, thumbnail */
            useYoutubeHighestQuality:false,/* true/false (use highest available quality for youtube video, if false, then it set to default chosen by youtube)  */
            defaultVolume:1,/* 0-1 */
            autoPlay:false,/* true/false (defaults to false on mobile)*/
            useContextMenu:true,/* true/false (use right click custom context menu, defaults to false on mobile)  */
            contextMenuText:'FURY_STUDIO',/* Custom text link in context menu. Leave empty for none like.  */
            contextMenuLink:'http://www.persianstacks.ir',/* url link  */
            contextMenuTarget:'_blank',/* _blank/_parent (opens in new/same window)  */
            useLogo:true,/* true/false  */
            logoPath:'http://localhost/mysite/wp-content/themes/furytemplate/videoplayer/data/logo.png',/* path to logo image  */
            logoLink:'http://codecanyon.net/user/Tean/portfolio',/* url link. Leave empty for none. */
            logoTarget:'_blank',/* _blank/_parent (opens in new/same window)  */
            logoTooltipText:'فیوری استودیو',/* logo tooltip text. */

            useControls:true,/* true/false (use video controls) */
            autoHideControls:false,/* auto hide controls: true/false. Defaults to false on mobile. */
            controlsTimeout:5000,/* time after which controls hide in fullscreen if mouse inactive, in miliseconds. */

            useEmbedCode:true,/* true/false (use embed code)  */
            useSharing:false,/* true/false (use social sharing)  */
            autoReuseMailForDownload: true,/* true/false. download backup for mobile, save email after first use and auto send all emails to the same address */
            closeRemovesEvents:true,/* true/false (when event is closed via close btn, it doesnt show in the same video any more)  */

            useTooltips:true,/* true/false (use tooltips on buttons)  */
            volumeTooltipText:'صدا',/* volume button tooltip text. */
            fullscreenTooltipText:'تمام صفحه',/* fullscreen button tooltip text. */
            captionsTooltipText:'Captions',/* caption button tooltip text. */
            qualityTooltipText:'کیفیت',/* quality button tooltip text. */
            downloadTooltipText:'دانلود',/* download button tooltip text. */
            videoInfoTooltipText:'اظلاعات ویدئو',/* video info button tooltip text. */
            shareTooltipText:'انتشار',/* share button tooltip text. */
            closeTooltipText:'بستن',/* close video info/share button tooltip text. */

            media_id:'player1'/* unique string for player identification (if multiple player instances were used, then strings need to be different!) */
        };
    }

    var hap_player;
    jQuery(document).ready(function($) {

        hap_player = $('#mainWrapper').videoGallery(tvp_settings);
        //initDemo();
    });
</script>

Relevant tags