Module: Course::Video::UrlConcern

Extended by:
ActiveSupport::Concern
Included in:
Course::Video
Defined in:
app/models/concerns/course/video/url_concern.rb

Constant Summary collapse

YOUTUBE_FORMAT =

Current format captures youtube's video_id for various urls.

[
  %r{(?:https?://)?youtu\.be/(.+)},
  %r{(?:https?://)?(?:www\.)?youtube\.com/watch\?v=(.*?)(&|#|$)},
  %r{(?:https?://)?(?:www\.)?youtube\.com/embed/(.*?)(\?|$)},
  %r{(?:https?://)?(?:www\.)?youtube\.com/v/(.*?)(#|\?|$)}
].freeze