Controlling When Players Load

Product
Video Cloud
Applies to Roles
Publisher, Developer
Version
Brightcove 5
Modules
Publishing Module
Edition
All

You can modify a Video Cloud player's JavaScript/HTML player publishing code to require the player to wait until page load completion before writing the player to the page. This was the default behavior for players published before the Brightcove 4.0.4 release. This former behavior was implemented in order to overcome an error in Microsoft Internet Explorer 6, where writing Flash content dynamically to a page heavy with other content, especially images, would sometimes result in the other content not loading.

If you want to restore the former default behavior and make the player wait for the rest of the page to load, remove this line from the end of the player publishing code: 

<script type="text/javascript">brightcove.createExperiences();</script> 

If you want to load one or a few players on a page and leave those players below the page fold until after page load, then you can insert this line after the players you want to load initially. For example, this pseudo-HTML would load player1 and player2 immediately, and then load player3 and player4 once the whole page has completed loading:

<html>
 <body>
  <player1 publishing code />
  <player2 publishing code />
  <script type="text/javascript">brightcove.createExperiences();</script>
  <player3 publishing code />
  <player4 publishing code />
 </body> 
</html>