def getStreamURL(self, **params):
if self.TYPE not in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>raise Unsupported('<STR_LIT>' % self.TYPE)<EOL><DEDENT>mvb = params.get('<STR_LIT>')<EOL>vr = params.get('<STR_LIT>', '<STR_LIT>')<EOL>params = {<EOL>'<STR_LIT:path>': self.key,<EOL>'<STR_LIT>': params.get('<STR_LIT>', <NUM_LIT:0>),<EOL>'<STR_LIT>': params.get('<STR_LIT>', <NUM_LIT:1>),<EOL>'<STR_LIT>': params.get('<STR_LIT>'),<EOL>'<STR_LIT>': params.get('<STR_LIT>', <NUM_LIT:0>),<EOL>'<STR_LIT>': params.get('<STR_LIT>', '<STR_LIT>'),<EOL>'<STR_LIT>': max(mvb, <NUM_LIT:64>) if mvb else None,<EOL>'<STR_LIT>': vr if re.match('<STR_LIT>', vr) else None<EOL>}<EOL>params = {k: v for k, v in params.items() if v is not None}<EOL>streamtype = '<STR_LIT>' if self.TYPE in ('<STR_LIT>', '<STR_LIT>') else '<STR_LIT>'<EOL>sorted_params = sorted(params.items(), key=lambda val: val[<NUM_LIT:0>])<EOL>return self._server.url('<STR_LIT>' %<EOL>(streamtype, urlencode(sorted_params)), includeToken=True)<EOL>
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.