def play_media(key, user_agent = nil, http_cookies = nil, view_offset = nil)

      if !key.is_a?(String) && key.respond_to?(:key)
        key = key.key
      end

      url = player_url+'/application/playMedia?'
      url += "path=#{CGI::escape(server.url+key)}"
      url += "&key=#{CGI::escape(key)}"
      url += "&userAgent=#{user_agent}" if user_agent
      url += "&httpCookies=#{http_cookies}" if http_cookies
      url += "&viewOffset=#{view_offset}" if view_offset

      ping url
    end
def play_media(key, user_agent = nil, http_cookies = nil, view_offset = nil)

      if !key.is_a?(String) && key.respond_to?(:key)
        key = key.key
      end

      url = player_url+'/application/playMedia?'
      url += "path=#{CGI::escape(server.url+key)}"
      url += "&key=#{CGI::escape(key)}"
      url += "&userAgent=#{user_agent}" if user_agent
      url += "&httpCookies=#{http_cookies}" if http_cookies
      url += "&viewOffset=#{view_offset}" if view_offset

      ping url
    end
Plays a video that is in the library

 @param [String, Object] the key of the video that we want to play.  Or an
   Object that responds to :key (see Episode#key) (see Movie#key)
 @param [String] no clue what this does, its the Plex Remote Command API though
 @param [String] no clue what this does, its the Plex Remote Command API though
 @param [String] no clue what this does, its the Plex Remote Command API though
 @return [True, nil] true if it worked, nil if something went wrong check
   the console for the error message