I simply want to get the duration of a vimeo video. I don't want to use froogaloop.
The API states: "You interact with the player by sending a serialized JSON object with postMessage() to the . The following format should be used: { "method": "methodName", "value": "value" } Omit the value key if the method requires no value.""
I tried this bit of code:
*$wrapper.find('#parpap')[0].contentWindow.postMessage(JSON.stringify('method', 'getDuration'));*
Firefox tells me: NS_ERROR_XPC_NOT_ENOUGH_ARGS: Not enough arguments [nsIDOMWindow.postMessage]
Chrome tells me: Failed to execute 'postMessage' on 'Window': Invalid target origin '' in a call to 'postMessage'.
Safari tells me: [Error] SyntaxError: DOM Exception 12: An invalid or illegal string was specified. fixVideoSize
Anyone got any advice? Thanks. :)