Creating Custom Mixer Layout

Discussion in 'Web Call Server 5' started by MM2 Mutlimedia, Mar 26, 2020.

  1. MM2 Mutlimedia

    MM2 Mutlimedia New Member

    I would like to create a custom mixer layout using the instructions on the following page:
    The instructions said to run this line:
    javac -cp/usr/local/FlashphonerWebCallServer/lib/tbs-flashphoner.jar ./com/flashphoner/mixerlayout/

    But tbs-flashphoner.jar does not exist in my /usr/local/FlashphonerWebCallServer/lib folder.

    When I run the command, the following error appears: error: package does not exist

    1) Should tbs-flashphoner.jar be in the lib folder? How can I get it there?
    2) If I fix the tbs-flashphoner.jar issue, will it also fix the missing package?

    Thank you!
  2. MM2 Mutlimedia

    MM2 Mutlimedia New Member

    I see the FP team has changed the documentation from:
    javac -cp/usr/local/FlashphonerWebCallServer/lib/tbs-flashphoner.jar ./com/flashphoner/mixerlayout/
    javac -cp/usr/local/FlashphonerWebCallServer/lib/wcs-core.jar ./com/flashphoner/mixerlayout/

    This works fine now!
    Many thanks you for the quick change.
  3. MM2 Mutlimedia

    MM2 Mutlimedia New Member

    One more question regarding this topic.
    The documentation in mentioned to set the following parameter in

    But when I initiate a mixer the flashphoner.log shows this error:
    ERROR A - HTTPS-pool-4-thread-2 Can't load class com.flashphoner.mixerlayout.myLayout

    These work good:
    It looks like the class reference for custom templates in isn't correct.

    This is file:

    package com.flashphoner.mixerlayout;
    import java.awt.*;
    import java.util.ArrayList;
    public class myLayout implements IVideoMixerLayout {
        private static final int PADDING = 5;
        public Layout[] computeLayout(YUVFrame[] yuvFrames, String[] strings, int canvasWidth, int canvasHeight) {
            ArrayList<IVideoMixerLayout.Layout> layout = new ArrayList<>();
            for (int c = 0; c < yuvFrames.length; c++) {
                Point prevPoint = new Point();
                Dimension prevDimension = new Dimension(canvasWidth, canvasHeight);
                if (layout.size() > 0) {
                Point currentPoint = new Point((int) (prevPoint.getX()+prevDimension.getWidth()+PADDING),
                layout.add(new IVideoMixerLayout.Layout(currentPoint, new Dimension(canvasWidth/yuvFrames.length,
                                                        canvasHeight/yuvFrames.length), yuvFrames[c]));
            return layout.toArray(new IVideoMixerLayout.Layout[layout.size()]);
    Thanks in advance!
  4. Max

    Max Administrator Staff Member

    Good day.
    We checked your mixer layout sample build by this manual, and it was correctly loaded. Please check if you copied mylayout.jar to /usr/local/FlashphonerWebCallServer/lib
    cp mylayout.jar /usr/local/FlashphonerWebCallServer/lib
    Please note that there are the mixer tickets WCS-2419 and WCS-2490 we're working on.

Share This Page