0

HTML

<video id="vdisk" controls poster="<?php echo $vposter ?>">
    <source src="" type="video/mp4">
</video>

jQuery

$("#vdisk source").attr("src", a); // a is a variable
console.log(a); //vdisk/01.mp4 - that's ok

When clicking on a "play" button nothing happens. There is no video in vdisk. The console is empty.

qadenza
  • 9,025
  • 18
  • 73
  • 126

1 Answers1

2

Try checking the following...

$("#vdisk > source").attr("src", "new_video.mp4"​​​​)​
$("#vdisk")[0].load();
Hardik Pithva
  • 1,729
  • 1
  • 15
  • 31