
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Create video player for Youtube, Vimeo, İzlesene and Wistia videos for Ruby.
And it may support more video hoster with your contributions.
Add it to your Gemfile:
gem 'video_player'
and run on terminal:
$ bundle
or install the gem on terminal.
$ gem install video_player
url
Youtube, Vimeo, İzlesene and Wistia video link
http://www.youtube.com/watch?v=iEPTlhBmwRg
or
or
http://www.izlesene.com/video/feder-goodbye-feat-lyse/7886121
or
https://.wistia.com/medias/9ub91enoph
width (default = 420)
height (default = 315)
autoplay (default = true) - works only on Youtube
require 'video_player' # if you're not use Rails 4
VideoPlayer::player("http://vimeo.com/101419884")
# returns iframe player from Vimeo video
# <iframe width=\"420\" height=\"315\"
# src=\"//player.vimeo.com/video/101419884\"
# frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
VideoPlayer::player("http://www.youtube.com/watch?v=iEPTlhBmwRg", "1200", "800", true)
# returns iframe player which has 1200px width and 800px height with autoplay from Youtube video
# <iframe width=\"1200\" height=\"800\"
# src=\"//www.youtube.com/embed/iEPTlhBmwRg?autoplay=1&rel=0\"
# frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
VideoPlayer::player("http://www.izlesene.com/video/feder-goodbye-feat-lyse/7886121")
# returns iframe player from İzlesene video
# <iframe width=\"420\" height=\"315\"
# src=\"//www.izlesene.com/embedplayer/7886121/?autoplay=1&showrel=0&showinfo=0\"
# frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
VideoPlayer::player("https://example.wistia.com/medias/9ub91enoph")
# returns iframe player from Wistia video
# <iframe width=\"420\" height=\"315\"
# src=\"//fast.wistia.net/embed/iframe/9ub91enoph/?autoplay=1&showrel=0&showinfo=0\"
# frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
It gets you only raw data. You must handle it on erb, haml, slim, etc for output without HTML escaping.
video = VideoPlayer::player("http://vimeo.com/101419884")
# erb
<%= video.html_safe %>
# haml, slim
= video.html_safe
# or
== video
git checkout -b my-new-feature
)rake
git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that video_player demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.