
Runtime File Attribute Value
How to fetch url of video from MYSQL for file attribute value?
'file': '<?php echo $row['url']; } ?>'
i try above code but it not work.
How to fetch url of video from MYSQL for file attribute value?
'file': '<?php echo $row['url']; } ?>'
i try above code but it not work.
Hi there,
Are you able to assign the output from your PHP call to a JavaScript variable? If so, you should be able to then pass that to the file player configuration option.
var videoFile = <?php echo json_encode($row['url']); ?>;
playerInstance.setup({ file: videoFile });
Note that I am encoding the PHP output as JSON in order to make sure it’s formatted properly for use in JavaScript.
Thank you.