---
title: roMimeStream
slug: develop/romimestream
docTags: 
createdAt: 2025-03-11T07:07:18.732Z
---

This object passes an MJPEG stream in MIME format to the *roVideoPlayer.PlayFile()* method. There are some limitations to what MJPEG streams this object will play correctly. *roMimeStream* has been optimized to play streaming video from a local source with the smallest possible delay. The result is a short buffering window that is not appropriate for playing MJPEG streams from URLs outside of a local network. We are currently optimizing *roMimeStream* to work with different IP camera brands: see [this page](docId:0er0hhTcryaPJTXszy_55) for more details. 

Object Creation: To play an RTSP stream, first instantiate an *roUrlTransfer* object. Then wrap it in an *roMimeStream* object and pass the `PictureStream` to `PlayFile`, as shown in the following example.

```text
u=createobject("roUrlTransfer")
u.seturl("http://mycamera/video.mjpg")
r=createobject("roMimeStream", u)
p=createobject("roVideoPlayer")
p.PlayFile({ PictureStream: r })
```

## ifPictureStream

### GetUrl() As String

## ifUserData

### SetUserData(user\_data As Object)

Sets the user data that will be returned when events are raised.

### GetUserData() As Object

Returns the user data that has previously been set via `SetUserData()`. It will return `Invalid` if no data has been set.

## ifMessagePort

### SetPort(port As roMessagePort)

Posts event messages to the attached message port. The event messages are of the type *roMimeStreamEvent*. There are currently two possible event messages:

- PICTURE\_STREAM\_FIRST\_PICTURE\_AVAILABLE = 0: The first picture is now available for decoding.
- PICTURE\_STREAM\_CONNECT\_FAILED: The object is unable to connect to the specified URL.

