How to get video source in jquery

hi there i need to get the video src in jquery ,and after takin the value converting it to base 64 heres my code thanks :slight_smile:

<p> Video</p>
               <div class="form-group">
                 <div class="fileinput fileinput-new" data-provides="fileinput">
          <video poster="img/vid2.png" height="166px"width="190px;" id="advideo">
           <source src="" type="video/mp4"/>
          </video>
     <span class="btn btn-default btn-file" style="background:transparent;color:#e6e6e6; border:1px solid #f1890f;">
                                    
     <span class="fileinput-new">Select Video</span>
                                        <span class="fileinput-exists">Change</span>
                                        <input type="file">
                                    </span>
                                    <span class="fileinput-filename" ></span>
                                    <a href="#" class="fileinput__close fileinput-exists" data-dismiss="fileinput">
                                        <i class="zmdi zmdi-close-circle"></i>
                                    </a>
                                </div>
                                    </div>'

You mean to set the src?

$('source').attr('src','here put the source');

yess the src as when the user chooses video in jquey it should show the value like abc.mp4 when in checking in console mode

If you want to take a value with JQuery you can use

$('source').val();

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.