Skip to content

Getting it to work #210

@ordokr

Description

@ordokr

Hello, I'm a bit new to Meteor, and I guess this is a simple question but I have no idea where to start.

I tried to follow this

> Because of how meteor renders templates reactively you will need to initialize manually for the templates you want to use vide in.
> Template.templateName.onRendered(function() {
>   this.$('#elementName').vide('path/to/video');
> });

But am not sure where I put this code. Do I put it in a .js file on the client folder, or in the .html file? Do I change templateName to another name? I know I change the path to the current path.

I tried

Template.video.onRendered(function() {
this.$('#video1').vide('1.mp4');
});

In both .js file and html in the section and in the , with a

<div id="video1" style="width: 100%; height: 500px;" data-vide-bg="1.mp4" data-vide-options="position: 0% 50%"></div>

in the body.

I'm new to this, and even Javascript, please help me with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions