I believe what you are seeing is the behavior of console.log()
displaying undefined
as its return value. You should see this even if you do
>console.log('foo')
foo
undefined
This is explained in detail in Why does console.log say undefined, and then the correct value?
In comparison, you can also see that undefined
is not printed if you just enter:
player.mediainfo.name
into the console. For example, this is the output on one of our sample players in our docs:
>player.mediainfo.name
"Displaying a Pre-Roll Ad in a Brightcove Player"
But you will see undefined
after this using console.log()
>console.log(player.mediainfo.name)
Displaying a Pre-Roll Ad in a Brightcove Player
undefined