code: def getStreamURL(self, **params):
          
          if self.TYPE not in ('movie', 'episode', 'track'):
              raise Unsupported('Fetching stream URL for %s is unsupported.' % self.TYPE)
          mvb = params.get('maxVideoBitrate')
          vr = params.get('videoResolution', '')
          params = {
              'path': self.key,
              'offset': params.get('offset', 0),
              'copyts': params.get('copyts', 1),
              'protocol': params.get('protocol'),
              'mediaIndex': params.get('mediaIndex', 0),
              'X-Plex-Platform': params.get('platform', 'Chrome'),
              'maxVideoBitrate': max(mvb, 64) if mvb else None,
              'videoResolution': vr if re.match('^\d+x\d+$', vr) else None
          }
          # remove None values
          params = {k: v for k, v in params.items() if v is not None}
          streamtype = 'audio' if self.TYPE in ('track', 'album') else 'video'
          # sort the keys since the randomness fucks with my tests..
          sorted_params = sorted(params.items(), key=lambda val: val[0])
          return self._server.url('/%s/:/transcode/universal/start.m3u8?%s' %
              (streamtype, urlencode(sorted_params)), includeToken=True)
docs: Returns a stream url that may be used by external applications such as VLC.
  
              Parameters:
                  **params (dict): optional parameters to manipulate the playback when accessing
                      the stream. A few known parameters include: maxVideoBitrate, videoResolution
                      offset, copyts, protocol, mediaIndex, platform.
  
              Raises:
                  :class:`plexapi.exceptions.Unsupported`: When the item doesn't support fetching a stream URL.