Reputation: 5766
I'm using videojs with flash fallback to display mp4 videos. I omit the video dimensions so the html5 video area can be autosized to the width and height of the video using JQuery $.find("#video_html5_api").width(), however the flash fallback has no attributes like this and so always stays at the default size (300 x 150).
Is there a way to make the flash fallback also autosize, or is there a way to get the width/height from the metadata and pass it to player.width() etc.
It seems the "loadedmetadata" event contains no actual metadata information, and the published api has no method to get metadata information.
Upvotes: 0
Views: 1545
Reputation: 5766
After trawling through the swf fallback source I found a way to do it.
$("#video_flash_api").get(0).vjs_getProperty("videoWidth")
Upvotes: 3