Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record Multiple Videos - Identify stream #214

Closed
SalvatoreAD opened this issue Feb 15, 2017 · 3 comments
Closed

Record Multiple Videos - Identify stream #214

SalvatoreAD opened this issue Feb 15, 2017 · 3 comments

Comments

@SalvatoreAD
Copy link

I tried recording multi video, and I wonder if I can enter the name of the person on the video that speaks when stopped recording.

@muaz-khan
Copy link
Owner

Yep, it is in my todo list to support watermarks and texts/logos. (only if we use canvas.captureStream)

We can force captureStream for single-video-recording as well, ONLY_if watermarks/logos/ads are requested.

E.g.

var options = {
    type: 'video',
    overlay: {
        image: HTMLImageElement,
        src: 'image-src or DataURL',
        text: 'string',
        fontSize: 'pixels',
        fontFamily: 'Arial',
        color: 'foreground-color-for-text',
        backgroundColor: 'for-text',
        pageX: 'position-x-of-the-text/logo',
        pageY: 'position-y-of-the-text/logo',
        etc: ''
    }
};

var recorder = RecordRTC(stream, options);

We can use term overlay or watermark etc.

@SalvatoreAD
Copy link
Author

Ok thanks. Can I use interval for uploading files?

@muaz-khan
Copy link
Owner

Please try this demo:

stream.onRender = function(context, x, y, width, height) {
    context.font = '20px Georgia';

    var userName = 'User Name';
    var measuredTextWidth = parseInt(context.measureText(userName).width);

    x = x + (parseInt((width - measuredTextWidth)) / 2);
    y = height - 40;

    context.strokeStyle = 'rgb(255, 0, 0)';
    context.fillStyle = 'rgba(255, 255, 0, .5)';
    roundRect(context, x - 20, y - 25, measuredTextWidth + 40, 35, 20, true);

    var gradient = context.createLinearGradient(0, 0, width * 2, 0);
    gradient.addColorStop('0', 'magenta');
    gradient.addColorStop('0.5', 'blue');
    gradient.addColorStop('1.0', 'red');
    context.fillStyle = gradient;

    context.fillText(userName, x, y);
};

AndersDJohnson pushed a commit to AndersDJohnson/RecordRTC that referenced this issue Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants