Home
Random example
Search
Applications
Chemistry
Economy
Famous theorems
Geography
Physics
Sports
Test
Assessment
Calculus
3D
Applied calculus
Basic calculus
Differential equations
Function plotting
Implicit plotting
Sequences and series
Charts and data
Charts
Statistics
Curves
Interpolation
Intersection, Union, Difference
Lindenmayer Systems
Splines
Geometry
3D
Analytic
Euclidean
Basic constructions
Mappings
Non-Euclidean
Projective
Symmetry
Technical
Animation
Roulettes
Board options
First steps
Images
JSXGraph objects
Arcs and angles
Axes
Circles
Groups
Lines and arrows
Point
Polygons
Slider
Turtle
Vectors
JessieCode
Texts
Transformations
Video
jsxgraph.org
JSXGraph logo
JSXGraph
JSXGraph share

Share

Video embedding
Show plain example
QR code
<iframe 
    src="https://www.jsxgraph.org/share/iframe/video-embedding" 
    style="border: 1px solid black; overflow: hidden; width: 550px; aspect-ratio: 55 / 65;" 
    name="JSXGraph example: Video embedding" 
    allowfullscreen
></iframe>
This code has to
<style>
   .JXGtext {
        background-color: rgba(255, 255, 255, 0.6);
        padding: 5px;
        border-radius: 5px;
    }
</style>

<div id="board-0-wrapper" class="jxgbox-wrapper " style="width: 100%; ">
   <div id="board-0" class="jxgbox" style="aspect-ratio: 1 / 1; width: 100%;" data-ar="1 / 1"></div>
</div>

<script type = "text/javascript"> 
    /*
    This example is licensed under a 
    Creative Commons Attribution ShareAlike 4.0 International License.
    https://creativecommons.org/licenses/by-sa/4.0/
    
    Please note you have to mention 
    The Center of Mobile Learning with Digital Technology
    in the credits.
    */
    
    const BOARDID = 'board-0';

    var board = JXG.JSXGraph.initBoard(BOARDID, {
        boundingbox: [-6, 4, 6, -4],
        axis: false,
        grid: false,
        showNavigation: false,
        showCopyright: false,
        zoom: {
            enabled: false,
            wheel: false
        },
        pan: {
            enabled: false,
            needTwoFingers: false
        }
    });;
    
    board.options.point.showInfobox = false;
    board.options.elements.highlight = false;
    
    var points = [],
        t0x = -2, t0y = 3.5,
        t1x = 0, t1y = 3.5,
        t2x = 2, t2y = 3.5;
    
    points.push(board.create('point', [-2, 3.5], {
        fixed: false,
        color: 'yellow',
        size: 6,
        name: '6 am'
    }));
    points.push(board.create('point', [0, 3.5], {
        fixed: false,
        color: 'yellow',
        size: 6,
        name: '12 pm'
    }));
    points.push(board.create('point', [2, 3.5], {
        fixed: false,
        color: 'yellow',
        size: 6,
        name: '6 pm'
    }));
    
    var fo = board.create('fo', [
        '<video width="100%" height="100%" src="https://benedu.net/moodle/aaimg/ajx_img/astro/tr/1vd.mp4" type="html5video" controls>',
        [-6, -4], // lower left corner
        [12, 8]   // width, height
    ], {
        layer: 0,
        fixed: true
    });
    
    var f = JXG.Math.Numerics.lagrangePolynomial(points);
    var graph = board.create('functiongraph', [f, -10, 10], {
        fixed: true,
        strokeWidth: 3,
        layer: 8
    });
 </script> 
/*
This example is licensed under a 
Creative Commons Attribution ShareAlike 4.0 International License.
https://creativecommons.org/licenses/by-sa/4.0/

Please note you have to mention 
The Center of Mobile Learning with Digital Technology
in the credits.
*/

const BOARDID = 'your_div_id'; // Insert your id here!

var board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-6, 4, 6, -4],
    axis: false,
    grid: false,
    showNavigation: false,
    showCopyright: false,
    zoom: {
        enabled: false,
        wheel: false
    },
    pan: {
        enabled: false,
        needTwoFingers: false
    }
});;

board.options.point.showInfobox = false;
board.options.elements.highlight = false;

var points = [],
    t0x = -2, t0y = 3.5,
    t1x = 0, t1y = 3.5,
    t2x = 2, t2y = 3.5;

points.push(board.create('point', [-2, 3.5], {
    fixed: false,
    color: 'yellow',
    size: 6,
    name: '6 am'
}));
points.push(board.create('point', [0, 3.5], {
    fixed: false,
    color: 'yellow',
    size: 6,
    name: '12 pm'
}));
points.push(board.create('point', [2, 3.5], {
    fixed: false,
    color: 'yellow',
    size: 6,
    name: '6 pm'
}));

var fo = board.create('fo', [
    '<video width="100%" height="100%" src="https://benedu.net/moodle/aaimg/ajx_img/astro/tr/1vd.mp4" type="html5video" controls>',
    [-6, -4], // lower left corner
    [12, 8]   // width, height
], {
    layer: 0,
    fixed: true
});

var f = JXG.Math.Numerics.lagrangePolynomial(points);
var graph = board.create('functiongraph', [f, -10, 10], {
    fixed: true,
    strokeWidth: 3,
    layer: 8
});

Video embedding

Physics
Technical
Video
Videos can be embedded as `foreignobject` and placed in an arbitrary layer. That means, objects can be placed "above" the video, too.
<style>
   .JXGtext {
        background-color: rgba(255, 255, 255, 0.6);
        padding: 5px;
        border-radius: 5px;
    }
</style>
// Define the id of your board in BOARDID

var board = JXG.JSXGraph.initBoard(BOARDID, {
    boundingbox: [-6, 4, 6, -4],
    axis: false,
    grid: false,
    showNavigation: false,
    showCopyright: false,
    zoom: {
        enabled: false,
        wheel: false
    },
    pan: {
        enabled: false,
        needTwoFingers: false
    }
});;

board.options.point.showInfobox = false;
board.options.elements.highlight = false;

var points = [],
    t0x = -2, t0y = 3.5,
    t1x = 0, t1y = 3.5,
    t2x = 2, t2y = 3.5;

points.push(board.create('point', [-2, 3.5], {
    fixed: false,
    color: 'yellow',
    size: 6,
    name: '6 am'
}));
points.push(board.create('point', [0, 3.5], {
    fixed: false,
    color: 'yellow',
    size: 6,
    name: '12 pm'
}));
points.push(board.create('point', [2, 3.5], {
    fixed: false,
    color: 'yellow',
    size: 6,
    name: '6 pm'
}));

var fo = board.create('fo', [
    '',
    [-6, -4], // lower left corner
    [12, 8]   // width, height
], {
    layer: 0,
    fixed: true
});

var f = JXG.Math.Numerics.lagrangePolynomial(points);
var graph = board.create('functiongraph', [f, -10, 10], {
    fixed: true,
    strokeWidth: 3,
    layer: 8
});

license

This example is licensed under a Creative Commons Attribution ShareAlike 4.0 International License.
Please note you have to mention The Center of Mobile Learning with Digital Technology in the credits.