Results 1 to 4 of 4

Thread: Playlist loop prevents Application to stop

  1. #1

    Default Playlist loop prevents Application to stop

    Hi Wowza Experts,

    I'm looping a Playlist Item:

    public void onAppStart(IApplicationInstance appInstance)
    {
    	app = appInstance;
    
    	Playlist playlist0 = new Playlist("intro");
    	playlist0.setRepeat(true);
    	playlist0.addItem("mp4:myintro.mp4", 0, -1);
    	
    
    	// Stream instance
    	Stream stream = Stream.createInstance(appInstance, "video");
    	appInstance.getProperties().setProperty("video", stream);
    	appInstance.getProperties().setProperty(playlist0.getName(), playlist0);
    }
    after the Playlist is started with:
    Stream stream = (Stream)app.getProperties().getProperty("video");
    if (stream != null){
    	Playlist playlist = (Playlist)app.getProperties().getProperty("intro");
    	playlist.open(stream);
    }
    Stream "video" is playable and shows the looping MP4 file. But the application will not stop after this and will be active even if there are no connected clients to the application! What has to be done, to get the application stopped after 90 Seconds automatically?

    There are also Log entries on every loop of the playlist Item.. Stream.switch[xxxx/xxxx]: index: 0 name:mp4:myintro.mp4 (...)

    Thanks for your support..

  2. #2

    Default

    Yes, as long as the Stream file is running the application will not unload. you could set repeat to (false) then it will play only once, and the app will unload.

    If you are looking for onAppStop to run after last playback client, it won't work while the stream is running. Can you tell us what it is you are trying to do so we may be able to figure out another way to accomplish it?

    Salvadore

  3. #3

    Default

    Quote Originally Posted by salvadore View Post
    Yes, as long as the Stream file is running the application will not unload. you could set repeat to (false) then it will play only once, and the app will unload.

    If you are looking for onAppStop to run after last playback client, it won't work while the stream is running. Can you tell us what it is you are trying to do so we may be able to figure out another way to accomplish it?

    Salvadore
    Hi Salvadore,

    Thank you for your answer! I have a solution now..

    My Usecase is:
    • i want to switch between 3 published live streams using following example: http://www.wowza.com/forums/content....tching-example
    • if the current active live-Stream of the playlist items is unpublishing, than i switch to the looping mp4 file (placeholder)
    • The module closes now "video" stream and removes all playlistitems from application if all live-streams are unpublished.. that solves the described issue..


    kind regards
    Martin

  4. #4

    Default

    Martin, thanks for the update, glad you have this sorted out.

    Salvadore

Similar Threads

  1. Loop playlist by Live stream
    By Oleg39 in forum Live Streaming and Encoders
    Replies: 9
    Last Post: 03-24-2016, 05:22 AM
  2. Return to playlist after stop live broadcast
    By lasauce22 in forum General Forum
    Replies: 1
    Last Post: 09-20-2013, 06:53 AM
  3. Return to playlist after stop live broadcast
    By lasauce22 in forum Live Streaming and Encoder Discussion
    Replies: 1
    Last Post: 09-20-2013, 06:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •