# All files / src/lib/markdown-it/plugins/markdown-it-block-embed/services PreziService.js

100% Statements 7/7
50% Branches 1/2
100% Functions 3/3
100% Lines 7/7

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32

    17x

    30x

    1x
    1x

    1x
    1x

    17x
     // Copyright (c) Rotorz Limited and portions by original markdown-it-video authors
    // Licensed under the MIT license. See LICENSE file in the project root.

    "use strict";

    const VideoServiceBase = require("./VideoServiceBase");

    class PreziService extends VideoServiceBase {

      getDefaultOptions() {
        return { width: 550, height: 400 };
      }

      extractVideoID(reference) {
        let match = reference.match(/^https:\/\/prezi.com\/(.[^/]+)/);
        return match ? match[1] : reference;
      }

      getVideoUrl(videoID) {
        let escapedVideoID = this.env.md.utils.escapeHtml(videoID);
        return "https://prezi.com/embed/" + escapedVideoID
            + "/?bgcolor=ffffff&amp;lock_to_path=0&amp;autoplay=0&amp;autohide_ctrls=0&amp;"
            + "landing_data=bHVZZmNaNDBIWnNjdEVENDRhZDFNZGNIUE43MHdLNWpsdFJLb2ZHanI5N1lQVHkxSHFxazZ0UUNCRHloSXZROHh3PT0&amp;"
            + "landing_sign=1kD6c0N6aYpMUS0wxnQjxzSqZlEB8qNFdxtdjYhwSuI";
      }

    }

    module.exports = PreziService;