<commit_before>package goplayer
{
  public class StreamioTranscoding implements RTMPStream
  {
    private var json : Object

    public function StreamioTranscoding(json : Object)
    { this.json = json }

    public function get rtmpURL() : URL
    {
      // Always try port 443 first.  If this fails, the player will
      // fall back to trying all the standard ports and protocols.
      return $rtmpURL.withPort(443)
    }

    private function get $rtmpURL() : URL
    { return URL.parse("rtmp://" + json.rtmp_base_uri) }

    public function get httpURL() : URL
    { return URL.parse("http://" + json.http_uri) }

    public function get name() : String
    { return json.rtmp_stream_uri }

    public function get bitrate() : Bitrate
    { return Bitrate.kbps(json.bitrate) }

    public function get dimensions() : Dimensions
    { return new Dimensions(json.width, json.height) }
  }
}<commit_msg>Don't crash on transcodings with no rtmp support.<commit_after>package goplayer
{
  public class StreamioTranscoding implements RTMPStream
  {
    private var json : Object

    public function StreamioTranscoding(json : Object)
    { this.json = json }

    public function get rtmpURL() : URL
    {
      // Always try port 443 first.  If this fails, the player will
      // fall back to trying all the standard ports and protocols.
      return json.rtmp_base_uri ? $rtmpURL.withPort(443) : null
    }

    private function get $rtmpURL() : URL
    { return URL.parse("rtmp://" + json.rtmp_base_uri) }

    public function get httpURL() : URL
    { return URL.parse("http://" + json.http_uri) }

    public function get name() : String
    { return json.rtmp_stream_uri }

    public function get bitrate() : Bitrate
    { return Bitrate.kbps(json.bitrate) }

    public function get dimensions() : Dimensions
    { return new Dimensions(json.width, json.height) }
  }
}
{'fraction_non_alphanumeric': 0.09501061571125266, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 2.9600840336134455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3086763', 'n_tokens_mistral': 582, 'n_tokens_neox': 549, 'n_words': 177}