lib.php 21.6 KB
Newer Older
Penny Leach's avatar
Penny Leach committed
1
2
3
4
5
<?php
/**
 *
 * @package    mahara
 * @subpackage blocktype-internalmedia
6
 * @author     Catalyst IT Ltd
7
8
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later
 * @copyright  For copyright information on Mahara, please see the README file distributed with this software.
Penny Leach's avatar
Penny Leach committed
9
10
11
12
13
 *
 */

defined('INTERNAL') || die();

14
class PluginBlocktypeInternalmedia extends MaharaCoreBlocktype {
Penny Leach's avatar
Penny Leach committed
15

16
17
18
19
20
21
22
23
24
    /**
     * @DEPRECATED: Default width & height. Not currently used, because we
     * use CSS to make all videos scale to fill the width of their container
     * while maintaining their aspect ratio. Kept here so we don't have to
     * tear out all the width/height display code.
     */
    const DEFAULT_WIDTH = 900;
    const DEFAULT_HEIGHT = 600;

Penny Leach's avatar
Penny Leach committed
25
26
27
28
29
30
31
32
33
    public static function get_title() {
        return get_string('title', 'blocktype.file/internalmedia');
    }

    public static function get_description() {
        return get_string('description', 'blocktype.file/internalmedia');
    }

    public static function get_categories() {
34
        return array('fileimagevideo' => 7000);
Penny Leach's avatar
Penny Leach committed
35
36
37
38
39
40
41
42
    }

    public static function has_config() {
        return true;
    }

    public static function postinst($oldversion) {
        if ($oldversion == 0) {
43
            set_config_plugin('blocktype', 'internalmedia', 'enabledtypes', serialize(array('flv', 'mp3', 'mp4')));
Penny Leach's avatar
Penny Leach committed
44
45
46
        }
    }

47
    public static function render_instance(BlockInstance $instance, $editing=false, $versioning=false) {
48
49
        list($artefact, $width, $height) = self::get_mediaplayer_details($instance);
        if (!$artefact) {
Penny Leach's avatar
Penny Leach committed
50
51
            return '';
        }
52
53
54

        $playerclass = self::get_player_class_for_artefact($artefact);
        if (!$playerclass) {
55
            return get_string('typeremoved', 'blocktype.file/internalmedia');
Penny Leach's avatar
Penny Leach committed
56
        }
Lisa Seeto's avatar
Lisa Seeto committed
57
58
59
        $smarty = smarty_core();
        $smarty->assign('artefactid', $artefact->get('id'));
        $smarty->assign('blockid', $instance->get('id'));
60
61
62
63

        require_once(get_config('docroot') . 'artefact/comment/lib.php');
        require_once(get_config('docroot') . 'lib/view.php');
        $view = new View($instance->get('view'));
Lisa Seeto's avatar
Lisa Seeto committed
64
65
66
67
        $smarty->assign('allowcomments', $artefact->get('allowcomments'));
        if (!$artefact->get('allowcomments')) {
            $smarty->assign('justdetails', true);
        }
68
        list($commentcount, $comments) = ArtefactTypeComment::get_artefact_comments_for_view($artefact, $view, $instance->get('id'), true, $editing, $versioning);
69
70
        $smarty->assign('commentcount', $commentcount);
        $smarty->assign('comments', $comments);
Lisa Seeto's avatar
Lisa Seeto committed
71
72
73
74
75
76
        $blockheader = $smarty->fetch('header/block-comments-details-header.tpl');
        $result = $blockheader;
        $result .= '<div class="mediaplayer-container card-body flush"><div class="mediaplayer">';
        $result .= call_static_method($playerclass, 'get_html', $artefact, $instance, $width, $height);
        $result .= '</div></div>';

77
78
        $smarty->assign('html', $result);
        return $smarty->fetch('blocktype:internalmedia:internalmedia.tpl');
Penny Leach's avatar
Penny Leach committed
79
80
81
82
83
84
    }

    public static function has_instance_config() {
        return true;
    }

Son Nguyen's avatar
Son Nguyen committed
85
    public static function instance_config_form(BlockInstance $instance) {
Penny Leach's avatar
Penny Leach committed
86
        $configdata = $instance->get('configdata');
87
88
        safe_require('artefact', 'file');
        $instance->set('artefactplugin', 'file');
89
        $filebrowser = self::filebrowser_element($instance, (isset($configdata['artefactid'])) ? array($configdata['artefactid']) : null);
90
        return array(
91
92
93
94
95
            'artefactfieldset' => array(
                'type'         => 'fieldset',
                'collapsible'  => true,
                'collapsed'    => true,
                'legend'       => get_string('media', 'blocktype.file/internalmedia'),
96
                'class'        => 'last select-file with-formgroup',
97
98
99
100
                'elements'     => array(
                    'artefactid' => $filebrowser
                )
            ),
Penny Leach's avatar
Penny Leach committed
101
        );
102
103
    }

104
105
    public static function filebrowser_element(&$instance, $default=array()) {
        $element = ArtefactTypeFileBase::blockconfig_filebrowser_element($instance, $default);
106
        $element['title'] = get_string('media', 'blocktype.file/internalmedia');
107
        $element['name'] = 'artefactid';
108
        $element['config']['selectone'] = true;
109
        $element['config']['selectmodal'] = true;
110
        $element['filters'] = array(
111
            'artefacttype'    => array('file', 'audio', 'video'),
112
            'filetype'        => self::get_allowed_mimetypes(),
113
        );
114
        $element['accept'] = implode(',', self::get_allowed_mimetypes());
115
116
117
        return $element;
    }

118
    public static function artefactchooser_element($default=null) {
Penny Leach's avatar
Penny Leach committed
119
120
121
122
123
124
125
126
        return array(
            'name' => 'artefactid',
            'type'  => 'artefactchooser',
            'title' => get_string('media', 'blocktype.file/internalmedia'),
            'defaultvalue' => $default,
            'blocktype' => 'internalmedia',
            'limit' => 5,
            'selectone' => true,
127
            'artefacttypes' => array('file', 'audio', 'video'),
Penny Leach's avatar
Penny Leach committed
128
129
130
131
            'template' => 'artefact:file:artefactchooser-element.tpl',
        );
    }

132
133
134
135
136
    public static function artefactchooser_get_element_data($artefact) {
        $artefact->icon = call_static_method(generate_artefact_class_name($artefact->artefacttype), 'get_icon', array('id' => $artefact->id));
        return $artefact;
    }

Son Nguyen's avatar
Son Nguyen committed
137
    public static function save_config_options(Pieform $form, $values) {
Penny Leach's avatar
Penny Leach committed
138
139
        $enabledtypes = array();
        foreach ($values as $type => $enabled) {
140
            if (!in_array($type, self::get_all_filetypes())) {
141
142
                continue;
            }
Penny Leach's avatar
Penny Leach committed
143
144
145
146
147
148
149
150
151
152
153
            if (!empty($enabled)) {
                $enabledtypes[] = $type;
            }
        }
        set_config_plugin('blocktype', 'internalmedia', 'enabledtypes', serialize($enabledtypes));
    }

    public static function get_config_options() {
        $elements = array();
        // Allowed file types
        $filetypes = array();
154
        $currenttypes = self::get_allowed_filetypes();
Penny Leach's avatar
Penny Leach committed
155

156
        foreach (self::get_all_filetypes() as $filetype) {
157
            $filetypes[$filetype] = array(
158
                'type'  => 'switchbox',
159
160
161
                'title' => get_string($filetype, 'artefact.file'),
                'defaultvalue' => in_array($filetype, $currenttypes),
            );
Penny Leach's avatar
Penny Leach committed
162
        }
163
        uasort($filetypes, function($a, $b) { return $a["title"] > $b["title"]; });
164
        $options = array_merge(
Penny Leach's avatar
Penny Leach committed
165
166
            array(
                'description' => array(
167
                    'value' => get_string('configdesc1', 'blocktype.file/internalmedia'),
Penny Leach's avatar
Penny Leach committed
168
169
170
171
172
173
                ),
            ),
            $filetypes
        );

        return array(
174
            'elements' => $options,
Penny Leach's avatar
Penny Leach committed
175
176
177
        );
    }

178
179

    private static function get_allowed_filetypes() {
Penny Leach's avatar
Penny Leach committed
180
181
182
183
184
185
        if ($data = get_config_plugin('blocktype', 'internalmedia', 'enabledtypes')) {
            return unserialize($data);
        }
        return array();
    }

186
187
188
189
190
191
192
193
194
195
196
197
198
199
200

    private static function get_allowed_mimetypes() {
        return array_keys(self::get_allowed_mimetype_filetypes());
    }


    private static function get_allowed_mimetype_filetypes() {
        if ($data = self::get_allowed_filetypes()) {
            if ($mimetypes = get_records_sql_assoc('
                SELECT mimetype, description
                FROM {artefact_file_mime_types}
                WHERE description IN (' . join(',', array_map('db_quote', $data)) . ')', array())) {
                foreach ($mimetypes as &$m) {
                    $m = $m->description;
                }
201
202
203
204
205
206
207
208
                // Hack to allow .wmv and .wma files to also use the .asf mimetype as well
                // See http://en.wikipedia.org/wiki/Advanced_Systems_Format
                if (in_array('wmv', $data)) {
                    $mimetypes['video/x-ms-asf'] = 'wmv';
                }
                if (in_array('wma', $data)) {
                    $mimetypes['video/x-ms-asf'] = 'wma';
                }
209
210
211
212
213
214
215
                return $mimetypes;
            }
        }
        return array();
    }


216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
    /**
     * Get the MaharaMediaPlayer class appropriate for this artefact.
     * Or boolean false if there is none.
     *
     * @param ArtefactType $artefact
     * @return string|false
     */
    private static function get_player_class_for_artefact($artefact) {
        $mimetype = $artefact->get('filetype');
        $mimetypefiletypes = self::get_allowed_mimetype_filetypes();
        if (!isset($mimetypefiletypes[$mimetype])) {
            return false;
        }
        else {
            $callbacks = self::get_all_filetype_players();
            $classname = 'MaharaMediaPlayer_' . $callbacks[$mimetypefiletypes[$mimetype]];
            if (class_exists($classname)) {
                return $classname;
            }
            else {
                return false;
            }
        }
    }

241
242
243
244
245
246
247
    private static function get_all_filetypes() {
        return array_keys(self::get_all_filetype_players());
    }


    private static function get_all_filetype_players() {
        /* Keyed by the file type descriptions from the artefact_file_mime_types table */
Penny Leach's avatar
Penny Leach committed
248
        return array(
249
250
251
252
253
254
            'mp3'       => 'html5audio',
            'flv'       => 'html5video',
            'quicktime' => 'qt',
            'wmv'       => 'wmp',
            'mpeg'      => 'qt',
            'avi'       => 'wmp',
255
            'mp4'       => 'html5video',
Son Nguyen's avatar
Son Nguyen committed
256
            'oga'       => 'html5audio',
257
            'ogg'       => 'html5audio',
Son Nguyen's avatar
Son Nguyen committed
258
            'ogv'       => 'html5video',
259
260
            'webm'      => 'html5video',
            '3gp'       => 'html5video',
261
262
            'wav'       => 'html5audio',
            'm4a'       => 'html5audio',
Penny Leach's avatar
Penny Leach committed
263
264
265
        );
    }

266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
    public static function get_download_link(ArtefactTypeFile $artefact, BlockInstance $instance) {
        return get_config('wwwroot') . 'artefact/file/download.php?file='
            . $artefact->get('id') . '&view=' . $instance->get('view');
    }

    public static function get_instance_javascript(BlockInstance $instance) {
        list($artefact, $width, $height) = self::get_mediaplayer_details($instance);
        if (!$artefact) {
            return array();
        }

        $playerclass = self::get_player_class_for_artefact($artefact);
        if (!$playerclass) {
            return array();
        }

        $jsfile = call_static_method($playerclass, 'get_js_library');
        $jsblock = call_static_method($playerclass, 'get_js_initjs', $artefact, $instance, $width, $height);
284
        $extrafilejs = call_static_method($playerclass, 'get_js_library_extra');
285
286
287
288
289
290
291
292

        $js = array();
        if ($jsfile) {
            $js['file'] = $jsfile;
        }
        if ($jsblock) {
            $js['initjs'] = $jsblock;
        }
293
294
295
        if ($extrafilejs) {
            $js['extrafilejs'] = $extrafilejs;
        }
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
        if ($js) {
            return array($js);
        }
        else {
            return array();
        }
    }

    public static function default_copy_type() {
        return 'full';
    }

    /**
     * Fetches the details needed by the mediaplayer renderers
     *
     * @param BlockInstance $instance
     * @return mixed array(ArtefactType $artefact, width, height) or false if no artefact on this block
     */
    public static function get_mediaplayer_details(BlockInstance $instance) {
        $configdata = $instance->get('configdata');
        $viewid = $instance->get('view');
        $artefactid = isset($configdata['artefactid']) ? $configdata['artefactid'] : null;

        // If there is no artefact, then return false
        if (empty($artefactid)) {
            return array(false, false, false);
Penny Leach's avatar
Penny Leach committed
322
323
        }

324
325
        require_once(get_config('docroot') . 'artefact/lib.php');
        $artefact = $instance->get_artefact_instance($artefactid);
326
327
328
329
330
331
332
333

        /**
         * @DEPRECATED: Not currently using configurable heights; instead height & width
         * are dynamically scaled using CSS. Keeping these as placeholders so we don't
         * have to tear out all the width & height display code.
         */
        $width  = self::DEFAULT_WIDTH;
        $height = self::DEFAULT_HEIGHT;
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362

        return array($artefact, $width, $height);
    }
}


/**
 * Hierarchy of classes that hold the code for the different media players
 * we use. See BlocktypeInternalMedia::get_all_filetype_players() for how
 * we map mimetypes to media players.
 */
abstract class MaharaMediaPlayer {

    /**
     * Returns a unique identifier to use in the "id" attributes of the media player. Should be
     * deterministic so that the HTML function can print it, and the script can then find it.
     *
     * @param ArtefactType $artefact
     * @param BlockInstance $block
     */
    protected static function get_unique_id(ArtefactType $artefact, BlockInstance $block) {
        return $block->get('id') . '_' . $artefact->get('id');
    }

    /**
     * Returns the HTML to display the a mediaplayer of this type
     *
     * @param ArtefactType $artefact
     * @param BlockInstance $block
363
364
     * @param int $width @DEPRECATED: Not currently used
     * @param int $height @DEPRECATED: Not currently used
365
366
367
368
369
370
371
372
373
374
375
376
377
     * @return string
     */
    abstract public static function get_html(ArtefactType $artefact, BlockInstance $block, $width, $height);

    /**
     * Returns JS library used to display a mediaplayer of this type.
     * Because Mahara currently ties one init block to one Javascript library loading, this can
     * only currently support one file per player type.
     *
     * @return array
     */
    public static function get_js_library() { return false; }

378
379
380
381
382
383
384
385
386
    /**
     * Returns extra JS library needed display a mediaplayer of this type.
     * in case we need to include more than one js file, eg lang files
     *
     * @return array
     */

    public static function get_js_library_extra() { return false; }

387
388
389
390
391
    /**
     * Returns a JS snippet needed to initialize a mediaplayer of this type (or boolean false if none)
     *
     * @param ArtefactType $artefact
     * @param BlockInstance $block
392
393
     * @param int $width @DEPRECATED: Not currently used
     * @param int $height @DEPRECATED: Not currently used
394
395
396
397
398
399
400
401
402
403
     * @return string|false
     */
    public static function get_js_initjs(ArtefactType $artefact, BlockInstance $block, $width, $height) { return false; }
}

/**
 * Windows Media Player browser plugin
 */
class MaharaMediaPlayer_wmp extends MaharaMediaPlayer {
    public static function get_html(ArtefactType $artefact, BlockInstance $block, $width, $height) {
Penny Leach's avatar
Penny Leach committed
404

405
        $url = hsc(PluginBlocktypeInternalmedia::get_download_link($artefact, $block));
Penny Leach's avatar
Penny Leach committed
406
407
408
409
410
411
412

        $size = 'width="' . $width . '" height="' . $height . '"';
        $autosize = 'false';

        $mimetype = 'video/x-ms-wmv'; // hardcode this
        $autostart = 'false';

413
        return '<span class="mediaplugin mediaplugin_wmp">
Penny Leach's avatar
Penny Leach committed
414
415
416
    <object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" ' . $size . '
      standby="Loading Microsoft(R) Windows(R) Media Player components..."
      type="application/x-oleobject">
417
418
419
420
421
422
423
424
425
426
427
428
     <param name="Filename" value="' . $url . '">' /* hsc($artefact->get('title')) . '"> */ . '
     <param name="src" value="' . $url . '">
     <param name="url" value="' . $url . '">
     <param name="ShowControls" value="true">
     <param name="AutoRewind" value="true">
     <param name="AutoStart" value="' . $autostart . '">
     <param name="Autosize" value="' . $autosize . '">
     <param name="EnableContextMenu" value="true">
     <param name="TransparentAtStart" value="false">
     <param name="AnimationAtStart" value="false">
     <param name="ShowGotoBar" value="false">
     <param name="EnableFullScreenControls" value="true">
429
     <param name="Wmode" value="opaque">
Penny Leach's avatar
Penny Leach committed
430
431
    <!--[if !IE]>-->
      <object data="' . $url . '" type="' . $mimetype . '" ' . $size . '>
432
433
434
435
436
437
       <param name="src" value="' . $url . '">
       <param name="url" value="' . $url . '">
       <param name="controller" value="true">
       <param name="autoplay" value="' . $autostart . '">
       <param name="autostart" value="' . $autostart . '">
       <param name="resize" value="scale">
438
       <param name="wmode" value="opaque">
Penny Leach's avatar
Penny Leach committed
439
440
441
442
      </object>
    <!--<![endif]-->
    </object></span>';
    }
443
}
Penny Leach's avatar
Penny Leach committed
444

445
446
447
448
449
/**
 * Quicktime browser plugin
 */
class MaharaMediaPlayer_qt extends MaharaMediaPlayer {
    public static function get_html(ArtefactType $artefact, BlockInstance $block, $width, $height) {
Penny Leach's avatar
Penny Leach committed
450

451
        $url = PluginBlocktypeInternalmedia::get_download_link($artefact, $block);
Penny Leach's avatar
Penny Leach committed
452
453
454
455

        $size = 'width="' . $width . '" height="' . $height . '"';

        require_once('file.php');
456
        $mimetype = $artefact->get('filetype');
Penny Leach's avatar
Penny Leach committed
457
458
        $autostart = 'false';

459
        return '<span class="mediaplugin mediaplugin_qt">
Penny Leach's avatar
Penny Leach committed
460
461
    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
      codebase="http://www.apple.com/qtactivex/qtplugin.cab" ' . $size . '>
462
463
     <param name="pluginspage" value="http://www.apple.com/quicktime/download/">
     <param name="src" value="' . $url . '">
464
     <param name="controller" value="true">
465
466
467
468
     <param name="loop" value="false">
     <param name="autoplay" value="' . $autostart . '">
     <param name="autostart" value="' . $autostart . '">
     <param name="scale" value="aspect">
Penny Leach's avatar
Penny Leach committed
469
470
    <!--[if !IE]>-->
      <object data="' . $url . '" type="' . $mimetype . '" ' . $size . '>
471
472
473
474
475
476
477
       <param name="src" value="'.$url.'">
       <param name="pluginurl" value="http://www.apple.com/quicktime/download/">
       <param name="controller" value="true">
       <param name="loop" value="false">
       <param name="autoplay" value="' . $autostart . '">
       <param name="autostart" value="' . $autostart . '">
       <param name="scale" value="aspect">
478
       <param name="wmode" value="transparent">
Penny Leach's avatar
Penny Leach committed
479
480
481
482
      </object>
    <!--<![endif]-->
    </object></span>';
    }
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
}


/**
 * HTLM5 audio player
 */
class MaharaMediaPlayer_html5audio extends MaharaMediaPlayer {

    /**
     * The (current) height, in pixels, of the VideoJS controls.
     * HACK: This height was just found through observation. There's probably
     * a more reliable way to get or control this.
     */
    const VIDEOJS_CONTROL_HEIGHT = 30;

498
    protected static function get_unique_id(ArtefactType $artefact, BlockInstance $block) {
499
500
        return 'audio_' . parent::get_unique_id($artefact, $block);
    }
Penny Leach's avatar
Penny Leach committed
501

502
503
504
505
506
507
508
509
510
    /**
     * Returns html5 code to play the artefact audio
     *
     * @param ArtefactTypeFile $artefact
     * @param BlockInstance $block
     * @param int $width
     * @param int $height
     * @return string
     */
511
    public static function get_html(ArtefactType $artefact, BlockInstance $block, $width, $height) {
512

513
        $url = PluginBlocktypeInternalMedia::get_download_link($artefact, $block);
514
515
516
517
518
519

        require_once('file.php');
        $mimetype = $artefact->get('filetype');
        $filesize = round($artefact->get('size') / 1000000, 2) . 'MB';

        return '
520
521
522
523
524
525
        <audio
            id="' . self::get_unique_id($artefact, $block) . '"
            class="video-js vjs-default-skin vjs-big-play-centered vjs-audio"
            width="' . $width . '"
            height="'.self::VIDEOJS_CONTROL_HEIGHT.'"
        >
526
            <source src="' . $url . '" type="' . $mimetype . '"/>
527
            ' . get_string('browsercannotplay1', 'blocktype.file/internalmedia') . '
528
529
530
531
532
533
534
        </audio>';
    }

    public static function get_js_library() {
        return 'videojs/video.js';
    }

535
    public static function get_js_initjs(ArtefactType $artefact, BlockInstance $block, $width, $height) {
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
        return 'videojs(
            "' . self::get_unique_id($artefact, $block) . '",
            {
                "controls": true,
                "preload": "auto",
                "width": "1000",
                "height": "'.self::VIDEOJS_CONTROL_HEIGHT.'"
            }
        );';
    }
}

/**
 * HTML5 video player
 */
class MaharaMediaPlayer_html5video extends MaharaMediaPlayer {

553
    protected static function get_unique_id(ArtefactType $artefact, BlockInstance $block) {
554
        return 'video_' . parent::get_unique_id($artefact, $block);
555
556
557
558
559
560
561
562
563
564
565
    }

    /**
     * Returns html5 code to play the artefact video
     *
     * @param ArtefactTypeFile $artefact
     * @param BlockInstance $block
     * @param int $width
     * @param int $height
     * @return string
     */
566
    public static function get_html(ArtefactType $artefact, BlockInstance $block, $width, $height) {
567

568
        $url = PluginBlocktypeInternalMedia::get_download_link($artefact, $block);
569
570
571
572
573

        require_once('file.php');
        $mimetype = $artefact->get('filetype');

        return '
574
575
576
577
578
579
        <video
            id="' . self::get_unique_id($artefact, $block) . '"
            class="video-js vjs-default-skin vjs-big-play-centered"
            width="' . $width . '"
            height="' . $height . '"
        >
580
            <source src="' . $url . '" type="' . $mimetype . '"/>
581
            ' . get_string('browsercannotplay1', 'blocktype.file/internalmedia') . '
582
        </video>';
583
584
    }

585
586
    public static function get_js_library() {
        return 'videojs/video.js';
Penny Leach's avatar
Penny Leach committed
587
588
    }

589
590
591
592
593
594
595
596
597
    public static function get_js_library_extra() {
        global $USER;

        $lang = get_user_language($USER->get('id'));
        $lang = str_replace('.utf8', '', $lang);

        return array("videojs/lang/$lang.js");
    }

598
    public static function get_js_initjs(ArtefactType $artefact, BlockInstance $block, $width, $height) {
599
600
601
602
603
604
605
606
607
608
609
610
        global $CFG;
        return 'videojs(
            "' . self::get_unique_id($artefact, $block) . '",
            {
                "controls": true,
                "preload": "auto",
                "fluid": true,
                "width": ' . $width . ',
                "height": ' . $height . ',
                "swf": "' . $CFG->wwwroot . '/artefact/file/blocktype/internalmedia/videojs/video-js.swf"
            }
        );';
611
    }
Penny Leach's avatar
Penny Leach committed
612
}