Finally got it working.. here's how!
Hi there, I see some of the issues people are having here and I thought I would show what I had to do to get it working.
1. At first, the plugin wouldn’t find any of my videos in the bucket. I triple checked the keys, but it still couldn’t find the videos. I then remembered that I had used the same s3.php program for other projects, so I copied the main source in github.com,
and compared them. They were different so I simply overlayed the version in the plugin with the latest version from github. The videos now appeared for me! I have no idea how it worked for others, but that is what I had to do to get them to appear.
2. Now the problem was to get the videos to play! After many failed efforts, I took a look at the source code. For some unknown reason, the generated URL’s weren’t correct. Again, I have no idea how others got the videos to play, or if there was something different about my setup, S3 account, etc. but I had to change the URL format in s3-video.php. I had to change it in 4 places (lines 316, 352, 360, and 452). The existing URL had the bucket name before the Amazon URL which just didn’t work??? I edited those lines to put the amazon_url before the video bucket. Something like:
'http://' . $pluginSettings['amazon_url'] .'/'. $pluginSettings['amazon_video_bucket'] . '/' .
Now finally I wasn’t getting the failure messages.
3. My last issue was the type of video. I was testing with some old .wmv videos I had but those didn’t work at all. I then tried a .flv video and that worked fine! I never did get the preview button in the admin of the plugin to work, but the shortcode on a page worked.
4. Make sure you just use the bucket name (exact spelling, punctuation) in the plugin settings. Even if you create folders within the bucket to organize your videos, don’t put the folder names. The plugin will find the subfolders.
5. You can possibly use the Amazon S3 bucket policy to restrict hotlinking, etc. The free S3 explorer from cloudberry.com can also generate a timed Web URL.
I’ve been a developer for many decades and have used Amazon S3 successfully many times. I was somewhat surprised when this didn’t work out of the box. Hopefully this can help others. Anthony, if you see anything crazy, please chime in!
- The topic ‘Finally got it working.. here's how!’ is closed to new replies.