Player APIs (BrightScript & Ja...
...
Object Reference
Networking Objects

roMediaStreamer

11min
the current implementation of this object allows a player to stream ts files over udp and rtp for more information, see the brightsign media server docid\ b6e8mgh 2yp06llh1aha section object creation the romediastreamer object is created with no parameters createobject("romediastreamer") ifmediastreamer getfailurereason() as string setpipeline(pipeline as string) as boolean specifies a streaming pipeline the source (a file uri) and destination (an ip address) of the stream are specified in the passed stream this method replaces the setsource() and setdestination() methods from firmware version 4 7 to stream media as before, use the filesimple source designation and the udpsimple/rtpsimple destination designations example m = createobject("romediastreamer") m setpipeline("filesimple ///data/clip ts, udpsimple //239 192 0 0 1234/") m start() initialize() as boolean progresses the pipeline into the initialized state this allocates some resources for the pipeline, but does not begin a stream connect() as boolean progresses the pipeline into the connected state this allows the script to create a memory stream without starting it start() as boolean begins streaming stop() as boolean stops the pipeline stream some internal pipeline stages may continue running disconnect() as boolean regresses the steam back to the connected state reset() as boolean resets the pipeline stream all internal pipeline stages are terminated inject(a as integer) as boolean 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 messages of type romediastreamerevent to the attached message port source specifications the string passed to the romediastreamer setpepline() method can have unique parameters that determine the source type and playback behavior looping by default, a stream from a media file will not loop when it ends you can specify a looping parameter at the end of the source string as follows """filesimple ///data/example mp4?loop" it is also possible to loop the stream using end of stream messages from romediastreamerevent however, the slightly longer restart gap that results from using brightscript may cause problems with the streaming client this is especially true if you attempt to set a new media file source upon looping the function