Brightcove video code snippet keeps disappearing

5 posts by 2 authors in: Forums > CMS Builder
Last Post: September 5, 2012   (RSS)

Whenever I copy and paste some Brightcode video code into the HTML window of a wysiwyg field, it allows me to save it, but when I view the live page, the video dosn't appear. Then, when I go back to the CMSB page, most of the code snippet has disappeared, and only a portion of it remains. Any idea why this might be? The video appears if I drop into place manually.

http://www.brightcove.com/en/

This is the Brightcove code I'm trying to add via CMSB:

<!-- Start of Brightcove Player -->

<div style="display:none"></div>

<!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at https://accounts.brightcove.com/en/terms-and-conditions/. -->

<script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script>

<object id="myExperience1775837379001" class="BrightcoveExperience">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="493" />
<param name="height" value="270" />
<param name="playerID" value="1772806633001" />
<param name="playerKey" value="AQ~~,AAABk1iD-AE~,Py6pTczJptv2_GyedbHlFZAtD0jIMgr1" />
<param name="isVid" value="true" />
<param name="isUI" value="true" />
<param name="dynamicStreaming" value="true" />

<param name="@videoPlayer" value="1777057484001" />
</object>

<!-- This script tag will cause the Brightcove Players defined above it to be created as soon as the line is read by the browser. If you wish to have the player instantiated only after the rest of the HTML is processed and the page load is complete, remove the line. --> <script type="text/javascript">brightcove.createExperiences();</script> <!-- End of Brightcove Player -->
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net

Re: [NigelGordijk] Brightcove video code snippet keeps disappearing

You need to make it a text field rather than WYSIWYG.
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

Re: [NigelGordijk] Brightcove video code snippet keeps disappearing

I just duplicated your problem on a test record. I used textbox as the field type for the code.
On the display page, if you use the code as such, it will display the HTML code:
<?php echo htmlencode($test_videoRecord['content']) ?>

On the other hand, if you use the following, it will display the video properly:
<?php echo $test_videoRecord['content'] ?>

I have always used textbox fields for forms, audio, video embed code and it always works fine.
Ron Conring
Conring Automation Services
----------------------------------------
Software for Business and Industry Since 1987

Re: [rconring] Brightcove video code snippet keeps disappearing

Aha - that worked! Thanks, Ron. I've had to delete the video for now as it's still being worked on, but the embedding code using your method works perfectly.

Cheers,
Nigel Gordijk

Common Sense Design: User-focused Web design
Tel: 001 519 342 5348 | Web: www.commonsensedesign.net