tags:

views:

122

answers:

2

Hi,

I'm using the Ooyala API (http://www.ooyala.com/support/docs/player%5Fapi) to embed videos and want to dynamically change the titles as the videos change.

I've embebbed the video in the html using the following code;

   <script src="http://www.ooyala.com/player.js?width=750&amp;height=312&amp;embedCode=dwbjp-XdAc-w6mATLnMIuwBRxHfF5vRK"&gt;&lt;/script&gt;

In the js file, I can then then reload the player by using;

document.getElementById('player').setQueryStringParameters({embedCode:'pzcDAxMTrAKV8Y7ClV7VbyLZE6kY4Q8d',autoplay:'1'});

As the API provides getCurrentItemTitle, I thought it would as easy as assigning this property to a var and spitting it out again like so;

$title = document.getElementById('player').getCurrentItemTitle;

.. but, this doesn't seem to work. :(

Anyone any ideas?

Many thanks,

Barry

A: 

Have you tried adding parenthesis on the end?

$title = document.getElementById('player').getCurrentItemTitle();

Jason
A: 

doh..of course, it's a function..so needs () appended on the end..just figured it out all on my tod..

Barry McGee
Is this a comment to Jason's answer?
JPot