Method: SparkApi::Models::Video#is_supported_type?

Defined in:
lib/spark_api/models/video.rb

#is_supported_type?Boolean

Returns:

  • (Boolean)


31
32
33
34
35
# File 'lib/spark_api/models/video.rb', line 31

def is_supported_type?
  # Unfortunately there are so many formats of vimeo videos that we canot support all vimeo videos
  # Therefore, we need to do a little more checking here and validate that we can get video codes out of the urls
  (self.ObjectHtml.include?('youtu') && youtube_video_code.present?) || (self.ObjectHtml.include?('vimeo') && vimeo_video_code.present?)
end