A long-lived project that still receives updates
Pagetype for embedded youtube/vimeo videos
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0, < 3
>= 14, < 18
~> 12.0
~> 1.0

Runtime

>= 15.7, < 18
 Project Readme

Pageflow Embedded Video

Gem Version Build Status

Page type showing Youtube/Vimeo videos in an embedded iframe.

Installation

Add this line to your application's Gemfile:

# Gemfile
gem 'pageflow-embedded-video'

Run bundle install

Register the plugin:

# config/initializers/pageflow.rb
Pageflow.configure do |config|
  config.plugin(Pageflow::EmbeddedVideo.plugin)
end

Include javascript/stylesheets:

# app/assets/javascripts/pageflow/application.js
//= require pageflow/embedded_video

# app/assets/javascripts/pageflow/editor.js
//= require pageflow/embedded_video/editor

# app/assets/stylesheets/pageflow/application.scss;
@import "pageflow/embedded_video";

# app/assets/stylesheets/pageflow/editor.scss;
@import "pageflow/embedded_video/editor";

# app/assets/stylesheets/pageflow/themes/default.scss
@import "pageflow/embedded_video/themes/default";

Configuration

Optionally, configure Pageflow Embedded Video by creating an initializer in your app config/initializers/pageflow_embedded_video.rb.

Example:

Pageflow::EmbeddedVideo.configure do |config|
  # Remove items to disallow hosts
  # The listed hosts are supported by default:
  # config.supported_hosts = %w(https://www.youtube.com http://www.youtube.com https://vimeo.com http://vimeo.com)
end

Troubleshooting

If you run into problems while installing the page type, please also refer to the Troubleshooting wiki page in the Pageflow repository. If that doesn't help, consider filing an issue.

Contributing Locales

Edit the translations directly on the pageflow-embedded-video locale project.