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
  • 7,864
  • 17
  • 50
  • 92

1 Answers1

2

Try checking the following...

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