video.js视频大小

时间:2012-11-23 09:43:43

标签: size video.js

我无法使用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倍(它保持原始大小)

0 个答案:

没有答案