开发者

JS - Ooyala API: How do I return this objects title property?

开发者 https://www.devze.com 2022-12-14 08:36 出处:网络
I\'m using the Ooyala API (http://www.ooyala.com/support/docs/player_api) to embed videos and want to dynamically change the titles as the videos change.

I'm using the Ooyala API (http://www.ooyala.com/support/docs/player_api) 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&height=312&embedCode=dwbjp-XdAc-w6mATLnMIuwBRxHfF5vRK"></script>

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

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

As th开发者_运维技巧e 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


Have you tried adding parenthesis on the end?

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消