How to select <source> inside of <video>?

I’m having a hard time figuring how could I prop src inside of the <source> if the this.$element is <video>?

HTML

Here’s my code:

this.$element.prop('src', vidsrc === '#' ? inputElement.value : vidsrc );

Since my code just adding the src inside the <video>

Take note that the html can’t be changed.

135 thoughts on “How to select <source> inside of <video>?”