0

我无法使用 video.js 设置视频大小

我做了一个视频节点:

        videoNode = $('<video>');
        videoNode.attr('id', 'simulationVideo');
        $('#' + _config.videoTargetId).append(videoNode);

我设置播放器:

    //create new player
    myPlayer = _V_("simulationVideo", {
        'id': _config.id,
        'preload': "auto",
        'controls': false,
        'autoplay': _config.autoplay

    }, function () {

        //set listeners for our controlbar
        //if (_config.controls) {
            controls = new Doczero.VideoPlayer.Controlbar();

            //$('#' + _config.controlbarTargetId).append(controls.html());

            //put listeners in place
            this.addEvent('timeupdate', controls.onTimeUpdate);
            this.addEvent('progress', controls.onBufferUpdate);
            this.addEvent('play', controls.onPlay);
            this.addEvent('pause', controls.onPause);

            //listen to controlls
            controls.CustomEvents.AddListener('onPressPlay', _self);

        //}
    });

我播放曲目:

    //set sources to play
    this.play = function (srcArray, newCallback) {
        //set source
        myPlayer.src(srcArray);
        myPlayer.play();

        //remove old callback
        if (callback != null) {
            myPlayer.removeEvent('ended', callback);
        }

        //add new ended callback
        myPlayer.removeEvent('ended', newCallback);
    }

一切似乎都很好,直到视频弹出 3 倍大(它保持原来的大小)

4

0 回答 0