Video HTML5 Source Tags Auto Closed and Duplicated
<input type="button" id="btnInsertVid" value="Do It" />
<script type="text/javascript">
$().ready(function() {
$('#btnInsertVid').click(function() {
var videoHTML = $("#hiddenVideo").html();
// Get the editor instance that we want to interact with.
var oEditor = CKEDITOR.instances.strCampaignFreeformHTML;
// Check the active editing mode.
if ( oEditor.mode == 'wysiwyg' )
{
// Insert HTML code.
// http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.editor.html#insertHtml
oEditor.insertHtml( videoHTML );
}
else
alert( 'You must be in WYSIWYG mode!' );
});
});
<div id="hiddenVideo" style="display:none;"><video width="320" height="240" controls="controls">
<source src="movie.ogg" type="video/ogg" />
<source src="movie.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video></div>
<table border="1" cellpadding="1" cellspacing="1" style="width: 500px;">
<tbody>
<tr>
<td>
<video controls="controls" height="240" width="320">
<source src="movie.ogg" type="video/ogg"> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </source></source></video>
</td>
</tr>
</tbody>
</table>
<p>
<source src="movie.ogg" type="video/ogg"><source src="movie.mp4" type="video/mp4">
<p>
</p>
</source></source></p>
Re: Video HTML5 Source Tags Auto Closed and Duplicated
Of course, some browser might behave correctly and handle everything ok, but that's not your concern.
So you'll have to use a plugin to handle those issues.
Re: Video HTML5 Source Tags Auto Closed and Duplicated
This is not valid/satisfactorily explanation. I used all my browser like: Mozilla Firefox, Google Chrome, Opera, Internet Explorer,... everything is too bad. Code was duplicated many times. Ex:
It made me crazy. Who knows how to solve the problem?
Thank you very much!
Best regards,
SuperThin
Re: Video HTML5 Source Tags Auto Closed and Duplicated
Hello, I am seeing this issue
Hello, I am seeing this issue as well with the source tag residing in an "audio controls" tag. The source tag parts get duplicated. Any updates on how to fix this? Thanks.
It's been 4 years since I've
It's been 4 years since I've messed around with this, but the problem was either the code or a real player plugin, can't remember which.