1. Home
  2. Integrations
  3. Dynamic Video Player Integration

Dynamic Video Player Integration

This guide will show you how to implement the Treepodia Dynamic Video Player integration code and show your videos. Embedding the video is recommended for best viewing quality, and a best practice for working with online video.

Including Treepodia Dynamic Video Player script

In order to integrate with Treepodia’s platform, the Treepodia script should be included in the body of the relevant pages required for integration. Note the below script is suitable for both secure (https) and non-secure (http) pages.

<!-- Treepodia Dynamic Video Player 6.0.0 Script -->
<script type="text/javascript" src="//static.treepodia.com/dynamicplayer/js/6.0.0/dynamic.video.player.min.js" defer></script>

Creating “initTreepodiaDynamicVideoPlayer(player)”

Once the “dynamic.video.player.min.js” script has loaded, it will automatically invoke the function “initTreepodiaDynamicVideoPlayer(player)” on the loading page. The function will run only after the page has completed loading.

<script type="text/javascript">
function initTreepodiaDynamicVideoPlayer(player) {
	player.load({
		//Required Parameters
		account: "{Account UUID}",
		videoUUID: "{Video UUID}",
		playerContext: "{Player Context}"
	});
} 
</script> 

Creating a placeholder to display the video

The last step to embed the video is to create a placeholder for it. The placeholder is video element and should have a trpd-player attribute.

<video id="trpdPlayer" trpd-player></video>
Updated on September 9, 2021

Was this article helpful?

Related Articles