Sha256: 8b590623ec76dc281fc49710a742b61ac763c31d6fd7dac9f56e6f7d2cb24268
Contents?: true
Size: 632 Bytes
Versions: 32
Compression:
Stored size: 632 Bytes
Contents
require 'uri' require_relative 'global' require_relative 'error' module RTSP module Helpers include RTSP::Global # Takes the URL given and turns it into a URI. This allows for enforcing # values for each part of the URI. # # @param [String] url The URL to turn in to a URI. # @return [URI] def build_resource_uri_from url if url.is_a? String url = "rtsp://#{url}" unless url =~ /^rtsp/ resource_uri = URI.parse url resource_uri.port ||= DEFAULT_RTSP_PORT resource_uri else raise RTSP::Error, "url must be a String." end end end end
Version data entries
32 entries across 32 versions & 2 rubygems