Wowza Community

Stream class stream controller

Ok. So you mean that if I change SMIL file content and call openPlaylistOnStream(), controller won’t read SMIL ?

Controller works with in memory playlist ?

Ok. Let’s say ServerListener starts with streamschedule.smil, playing 1 stream Stream1, containing 1 playlist pl1.

I want to change something during playback, no matter what, using a Controller and without having to restart WMS.

For now, I can rewrite streamschedule.smil with a Flex app to reflect the changes.

In controller, could I code a specific openPlaylistOnStream() to open a new Stream ?

When I write “new”, I mean a Stream which was not previously in streamschedule.smil when ServerListener starts ?

And what about opening a new Playlist ?

I know we talk about this earlier and I’m sure my questions drive you crazy :wink:

By the way, hope you see what I’m trying to do …

Seems that switching from playlist containing files to playlist with live stream does not work on iPad. Works great with Flash.

Each file and live stream work on iPad. Switch operation between them don’t.

More to come …

I know Richard, I’m using a Flex app built from your FLA code.

Switching works on Flash client but not on iPad … Once again, more to come later …

Ok, this confirms what I experienced earlier.

Where does come this info ? Your own tests ? Apple ?

Just received your answer Richard. Don’t know where to go now :frowning:

I read all the postings in that thread and didn’t find how to make specific Stream entity common to both way to handle it.

Also, I don’t know where the error line in logs come from … Will investigate more on this …

Sorry, I don’t understand. To be clear, when I read this :

You can use this with (or without) the server listener stream scheduler. If this application module is used in the same application that the scheduler populates with Streams and Playlists, you can use this application can be used to control those Streams and Playlists.

I understand that if “Stream1” is created in scheduler with “pl1”, I can for instance add items to “pl1” from controller. “Stream1” and “pl1” are shared between scheduler and controller. Is it right ?

Hi Richard,

I would like to know if possible DELETE files from a playlist.

We have one module than allow to AddItems to one playlist dynamically without problems, but we have some doubt about how we can Remove items from this list on the fly.

Can you tell me if have some function for doing this with the API?

SORRY: The answer is in a old post: http://www.wowza.com/forums/showpost.php?p=35672&postcount=19

Boolean success = stream.removeFromPlaylist("Extremists.flv");

Thanks in advance,

Alejandro

Thanks for your quick reply.

I am assuming the module is "ServerPublisher (Wowza Media Server 2 Advanced required)

Server Listener that uses the new Stream class to publish live streams from static content. You can also schedule streams, like a TV station".

If this is the module, I have already have this done. It worked using the scheduler but am not able to use this with this http://www.wowza.com/downloads/forums/collection/client/StreamClassControl.zip.

I am trying to follow this instructions "Enter a Stream (I filled in “StreamNew”), then click “add stream”

Enter a Playlist (I filled in “playlistNew”), then click “add playlist”

Add at least one item to the playlist (I filled in “mp4:Extremists.m4v” with start of 0 and length -1), click “add Item to playlist”

Then click “open playlist on stream”

Then in above, enter the streamname, “StreamNew” and click “Play”

To add a new item, enter a new video name with start and length, and click “add item to playlist”, then click open “open playlist on stream again”. If the video is currently playing, the new item will start playing after the current one or when it cycles through to the end. You can also click “play next item”

Thanks.

The /conf/live/Application.xml now looks like this:

true

localhost

live

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

cupertinostreaming,smoothstreaming

-1

*

*

*

*

digest

digest

senderreport

12000

*

base

Base

com.wowza.wms.module.ModuleCore

properties

Properties

com.wowza.wms.module.ModuleProperties

logging

Client Logging

com.wowza.wms.module.ModuleClientLogging

flvplayback

FLVPlayback

com.wowza.wms.module.ModuleFLVPlayback

ModuleMediaCasterStreamManager

ModuleMediaCasterStreamManager

com.wowza.wms.plugin.mediacasterstreammanager.ModuleMediaCasterStreamManager

mediaCasterStreamManagerPassword

!()$£&^%"!901

Does that seems right?

Thanks.

Thanks fot your help.

This is now the amended version.

true

live

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

cupertinostreaming,smoothstreaming

-1

*

*

*

*

digest

digest

senderreport

12000

*

base

Base

com.wowza.wms.module.ModuleCore

properties

Properties

com.wowza.wms.module.ModuleProperties

logging

Client Logging

com.wowza.wms.module.ModuleClientLogging

flvplayback

FLVPlayback

com.wowza.wms.module.ModuleFLVPlayback

ModuleMediaCasterStreamManager

ModuleMediaCasterStreamManager

com.wowza.wms.plugin.mediacasterstreammanager.ModuleMediaCasterStreamManager

streamcontroller

ModuleStreamControl

com.wowza.wms.plugin.collection.module.ModuleStreamControl

streamcontroller

ModuleStreamControl

com.wowza.wms.plugin.collection.module.ModuleStreamControl

mediaCasterStreamManagerPassword

!()$£&^%"!901

Does this sound right now?

Thanks again.

The new version is like this:

true

live

${com.wowza.wms.context.VHostConfigHome}/content

${com.wowza.wms.context.VHostConfigHome}/keys

cupertinostreaming,smoothstreaming

-1

*

*

*

*

digest

digest

senderreport

12000

*

base

Base

com.wowza.wms.module.ModuleCore

properties

Properties

com.wowza.wms.module.ModuleProperties

logging

Client Logging

com.wowza.wms.module.ModuleClientLogging

flvplayback

FLVPlayback

com.wowza.wms.module.ModuleFLVPlayback

ModuleMediaCasterStreamManager

ModuleMediaCasterStreamManager

com.wowza.wms.plugin.mediacasterstreammanager.ModuleMediaCasterStreamManager

streamcontroller

ModuleStreamControl

com.wowza.wms.plugin.collection.module.ModuleStreamControl

mediaCasterStreamManagerPassword

!()$£&^%"!901

"

But now am even getting this error:

WARN server comment 2009-12-21 13:51:42 - - - - - 307.825 - - - - - - - Missing function: createStream

WARN server comment 2009-12-21 13:51:52 - - - - - 318.18 - - - - - - - Missing function: deleteStream

WARN server comment 2009-12-21 13:51:54 - - - - - 320.007 - - - - - - - Missing function: releaseStream

WARN server comment 2009-12-21 13:51:54 - - - - - 320.007 - - - - - - - Missing function: FCPublish

WARN server comment 2009-12-21 13:51:54 - - - - - 320.008 - - - - - - - Missing function: createStream

WARN server comment 2009-12-21 13:52:04 - - - - - 330.362 - - - - - - - Missing function: deleteStream

WARN server comment 2009-12-21 13:52:06 - - - - - 332.211 - - - - - - - Missing function: releaseStream

WARN server comment 2009-12-21 13:52:06 - - - - - 332.211 - - - - - - - Missing function: FCPublish

WARN server comment 2009-12-21 13:52:06 - - - - - 332.212 - - - - - - - Missing function: createStream

WARN server comment 2009-12-21 13:52:16 - - - - - 342.552 - - - - - - - Missing function: deleteStream

WARN server comment 2009-12-21 13:52:18 - - - - - 344.395 - - - - - - - Missing function: releaseStream

WARN server comment 2009-12-21 13:52:18 - - - - - 344.395 - - - - - - - Missing function: FCPublish

WARN server comment 2009-12-21 13:52:18 - - - - - 344.396 - - - - - - - Missing function: createStream

WARN server comment 2009-12-21 13:52:29 - - - - - 354.753 - - - - - - - Missing function: deleteStream

WARN server comment 2009-12-21 13:52:30 - - - - - 356.565 - - - - - - - Missing function: releaseStream

WARN server comment 2009-12-21 13:52:30 - - - - - 356.566 - - - - - - - Missing function: FCPublish

WARN server comment 2009-12-21 13:52:30 - - - - - 356.566 - - - - - - - Missing function: createStream

Thanks so much. That works now.

Much appreciated.

Hi Richard,

Is there a way i can recompile the “Modified Live Stream Player”. I have added secure token and the changed the url to “rtmpe” plus 1 or 2 things. - This is a modified version of Wowza Live Player with these features.

Thanks.

In the following function of openPlaylistOnStream, I do not know how to handle exception. It assumes the stream/file in the playlist is available. But this is not always the case. I hope it will raise some exception when the file is deleted or the live stream is not published yet.

I did find that for a live stream, if it is not published yet, it will start playing once the live stream is published. But if it can raise some exception, I think developer may need that for some handling. For my case, the streaming just hangs on one frame of last static video and waits there. This is not good. I hope it continues playing the static video and alerts a warning that live streaming is not published yet. And for static video, the same. I have two sets of static video, one is uploaded by the customer, one is the system default. Customers usually forget their videos or deleted their videos, if I can detect an exception while opening playlist on stream, I will let the progam automatically switch to my system default, which is usually there.

What I am asking is that playlist.open(stream) will raise exceptions in one way or another. Please consider my requirement.

public void openPlaylistOnStream(IClient client, RequestFunction function, AMFDataList params) {

String streamName = getParamString(params, PARAM1);

String playlistName = getParamString(params, PARAM2);

Stream stream = (Stream)client.getAppInstance().getProperties().getProperty(streamName);

Playlist playlist = (Playlist)client.getAppInstance().getProperties().getProperty(playlistName);

playlist.open(stream);

}

When using LiveStudio.html I ran into 2 problems.

  1. I got this security issue:

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller file:///C:/Wowza2.1.1_Development/examples/StreamClassControl/LiveStudio.swf cannot access file:///C:/Wowza2.1.1_Development/examples/StreamClassControl/LiveStudio.html.

  1. How can I add my secureToken’s shared secret? I changed in Player.as the shared secret. But how to compile?

Maybe somebody else can help me.

I’m able to compile Player.as into LifeStudio.swf and LiveStudio.mxml into LifeStudio.swf. But both have a much smaller filesize than the original LiveStudio.swf. So I assume that something is wrong.

How do the 2 files (Player.as & LiveStudio.mxml) relate to each other? Do I need to compile both or only one?

I only want to change the shared secret and get a new swf file.

Is the source code of class ModuleStreamControl at the beginning of the thread the latest u have? Is it updated?

Also, to your 1st question: yes, you can remove a PlaylistItem like this:

Boolean success = stream.removeFromPlaylist("Extremists.flv");

Richard

This I dont understand.

Shouldn’t be instead of “Extremists.flv” a stream name?

In the docu it says:

Remove all items matching the given stream name from the playlist.

But a playlist is only attached to one stream anyway. Isn’t it?

These all I understood.

But what about my questions?