Forum

Thread tagged as: Question, Suggestions, Blog

Videos on Blogs

Is there a way to upload video into a blog post?

Brittany Lewis

Brittany Lewis 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes - are you hosting it yourself or using a video service (YouTube, Vimeo, Wista etc)?

It would be both wanting to upload from computer and youtube videos.

Drew McLellan

Drew McLellan 2638 points
Perch Support

If uploading then you basically just handle it like a file, and output the path into your markup. You'll need to make sure you're encoding whichever video formats your views need for their browsers.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video

For YouTube, you can use the YouTube field type, or just paste in the embed code by enabling HTML on the field you want to use.

I went to youtube route and added the define('PERCH_YOUTUBE_API_KEY', 'your API key'); to the config file with the api key then this happened

Perch Error: Could not connect to the database Please check that the access details specified in /login/config/config.php file are correct.

Try again

I removed and it still broken

CRISIS AVERTED please disregard

I do have a question about what this means

Warning: Division by zero in /home/twhospitality/public_html/login/addons/fieldtypes/youtube/youtube.class.php on line 123

Drew McLellan

Drew McLellan 2638 points
Perch Support

That means a number is being divided by zero, which isn't something that can be done. Can you show us the context of what you're doing?

I was trying to do an auto height! But I got it fixed!