English 中文(简体)
如何控制媒体。 j)
原标题:How are controls sized in mediaelement.js

Im利用媒体,为拥有有限空间的音响角色使用。 我需要列入管制的关税分类,并且大多数安保部都做了工作。 在我遇到麻烦的地方,媒体用品。 我愿意修改我的特别安全局,以对此进行补偿,但我不相信调解进程。

因此,步骤是调解的。 j 用来计算其控制规模?

最佳回答

解决我的问题,我需要做的是: 该文件没有在网站上记录,而是在媒体上加以记载。 作出这种规定,就可以将进展限制在具体规模上,从而使得我的控制更加贴近、<>、>。

问题回答

The problem:

我想要用这种对人发援的友好控制来取代对我所有客户的教堂和部委网站的旧的闪光控制,但旧的控制只用180px的宽度进行罚款,而这种控制肯定不会用更长的剪辑。

Initial tests:

“见于180px和240px宽”/


The solution:

如果控制规模太小,足以容纳它们,那么,你可以programmatically

After making these changes, the control is still usable at widths down as low as 160px wide (if a bit tight)


CSS settings for volume control width:

最初的横向数量控制宽度(如以录音方式使用)载于mediaelementplayer.cs。 这里:

/* horizontal version */
.mejs-controls div.mejs-horizontal-volume-slider {
    height: 26px;
    width: 60px;         /* <== this line */
    position: relative;
}

... and here:

.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total {
    position: absolute;
    left: 0;
    top: 11px;
    width: 50px;        /* <== and this line */

页: 1


How to do it:

First, to have the duration control hide automatically if the display is less than 260px, make this change to mediaelement-and-player.js:

buildduration: function(player, controls, layers, media) {
    var t = this;
    if (parseInt(t.width)<260){ return; } // Add this to hide duration if width < 260px

如果总宽度低于220px,则电传量控制将从60px降至30px,将这两处改动改为mediaelement-and-player.js:

Change this:

 <div class="mejs-horizontal-volume-slider"> + // outer background
     <div class="mejs-horizontal-volume-total" ></div> + // line background

......

 <div class="mejs-horizontal-volume-slider" +
  (parseInt(t.width)<220 ?   style="width:30px"  :   )+
   > + // outer background
     <div class="mejs-horizontal-volume-total" +
      (parseInt(t.width)<220 ?   style="width:20px"  :   )+
       ></div> + // line background

Tests after code modifications described:

这里看一看不同大小的长效切片(超过1小时),所有时间都在大约30分钟内暂停使用,以便你能够看到:

“mediaelement.js

我希望这得到利用,并衷心感谢约翰·迪耶尔这一令人惊讶的制度,并向我们大家提供这一系统。





相关问题
MediaElement.js jquery bug

I have an gwt application and I use MediaElement.js to show multimedia contents. If I put on the main page this script <script> // using jQuery $( video,audio ).mediaelementplayer(); <...

FancyBox + MediaElement player + IE

Trying to incorporate the mediaelement.js player into a lightbox (fancybox.net). Player works in IE without FancyBox. FancyBox works in IE with regular text content. But The player + fancybox ...

Still trying to stop video from rewinding in mediaelement.js

I am still having problems with the code not stopping the video from rewinding to the beginning. The code that John posted doesn t seem to be working for me. He said: I believe that the default ...

Continuous play for Mediaelement.js

I have a music blog (http://www.lowerfrequencies.com/) in which I have and embed Mediaelement.js audio file in every post. It works great and I have no complaints. However, I would like it if I could ...

Mediaelement.js javascript error in IE

I m using MediaElement.js as my HTML5 video player for a site in progress. It works fine in Chrome, Safari, and Firefox, even with the fallback player, but in Internet Explorer I get the Javascript ...