mediaelement / mediaelement

HTML5 <audio> or <video> player with support for MP4, WebM, and MP3 as well as HLS, Dash, YouTube, Facebook, SoundCloud and others with a common HTML5 MediaElement API, enabling a consistent UI in all browsers.
http://mediaelementjs.com/
MIT License
8.18k stars 1.57k forks source link

duplicate src attribute in video tag when using closed captioning with source tag #2493

Open jklue opened 6 years ago

jklue commented 6 years ago

I'm following the directions for closed captioning, but somehow a src="" attribute gets added to the video tag. It's already in it's own <source> element as illustrated in the docs, next to the <track> tag. This results in a skip and a double src download. The site is here: riverviewschool.org. Thanks in advance!

Here's what it outputs:

<mediaelementwrapper id="video-banner" autoplay="autoplay">
    <video id="video-banner_html5" autoplay="true" muted="muted" loop="loop" preload="auto" poster="https://path/to/poster.jpg?r=pad" class="video-banner" src="https://path/to/video.mp4">
        <source type="video/mp4" src="https://path/to/video.mp4">        
        <track srclang="en" label="English" kind="subtitles" src="https://riverviewschool.org/content/1-home/welcome-video_2018.01.11.vtt">
    </video>
</mediaelementwrapper>
rafa8626 commented 6 years ago

@lukehatfield I'll take a look. Thanks and please star the project to support it