ableplayer / ableplayer-wordpress

Able Player plugin for WordPress
Other
5 stars 4 forks source link

Load videos from Vimeo with ableplayer-wordpress? #2

Closed JamesBuell closed 4 years ago

JamesBuell commented 4 years ago

I've had good experiences when loading videos and sync'd .vtt captions from my shared hosting provider (inmotionhosting) on a WordPress site, using the latest version (0.1.1) of your ableplayer-wordpress plugin. I've also been able to load videos from youtube the same way, using the "data-youtube-id" parameter. However, I'm having no success loading Vimeo-hosted videos using "data-vimeo-id", even though Vimeo is supported on your standalone ableplayer this way, as in your example at https://ableplayer.github.io/ableplayer/demos/vimeo.html.

Instead, the javascript console in my browser throws the errors below. Is loading of Vimeo videos possible, using ableplayer-wordpress?

Uncaught ReferenceError: Vimeo is not defined at window.AblePlayer.AblePlayer.initVimeoPlayer (ableplayer.js?ver=5.2.2:15291) at window.AblePlayer.AblePlayer.initPlayer (ableplayer.js?ver=5.2.2:1181) at window.AblePlayer.AblePlayer.recreatePlayer (ableplayer.js?ver=5.2.2:1098) at Object. (ableplayer.js?ver=5.2.2:494) at Object. (jquery.js?ver=1.12.4-wp:2) at i (jquery.js?ver=1.12.4-wp:2) at Object.add [as done] (jquery.js?ver=1.12.4-wp:2) at Array. (jquery.js?ver=1.12.4-wp:2) at Function.each (jquery.js?ver=1.12.4-wp:2) at Object. (jquery.js?ver=1.12.4-wp:2)

Thanks, Jim

JamesBuell commented 4 years ago

I've recently provided developer Terrill Thompson the URL and credentials for a temporary WordPress site on my hosted account, that illustrates these problems with AblePlayer and Vimeo videos. It also shows successful use with Able Player's own hosted video and caption sources, and with Able Player's YouTube-hosted content.

From what I can tell, the problem seems related to Vimeo's own player.js code, or to how the WordPress plugin calls it. I can achieve a partial workaround by using another WordPress plugin to make an explicit call to vimeo's script, in the head of the page that WordPress renders to the browser (i.e., a script tag with src = "https://player.vimeo.com/api/player.js", the same script that's called from https://ableplayer.github.io/ableplayer/demos/vimeo.html). That loads the Vimeo content into the Able player, but still does not display locally hosted closed captions or synch to the locally hosted .vtt transcript. This is all unlike the standalone AblePlayer example that shows successful hosting of Vimeo content.

Thanks, Jim

terrill commented 4 years ago

This is now fixed with version 1.0, which is now an official release on the WordPress Plugins site.